/* RESET CSS */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* VARIABLES */
:root {
    --dark-color: rgb(2, 4, 8);
    --dark-hover: rgba(255, 255, 255, 0.1);

    --light-color: rgb(245, 245, 245);
    --light-hover: rgba(0, 0, 0, 0.1);
}


/* GENERAL */
body {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: monospace, sans-serif;
    font-size: 1rem;
    transition: background-color 0.3s;
}

body.light-mode {
    color: var(--dark-color);
    background-color: var(--light-color)
}

body.light-mode #toggle-mode-btn:hover {
    background-color: var(--light-hover);
}

body.dark-mode {
    color: var(--light-color);
    background-color: var(--dark-color);
}

body.dark-mode #toggle-mode-btn:hover {
    background-color: var(--dark-hover);
}

/* For GitHub link text color adaptation */
body.light-mode #github-link p {
    color: var(--dark-color);
}

body.dark-mode #github-link p {
    color: var(--light-color);
}


a {
    text-decoration: none;
    color: var(--dark-color);
}

.title{
    font-size:1.8rem;
    font-family:cursive;   
    margin-bottom:20px;
}

input {
    display: none;
}

/* MAIN */
#toggle-mode-btn {
    width: 2rem;
    height: 2rem;
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    border: none;
    border-radius: 0.5rem;
    background-color: transparent;
    transition: background-color 0.3s;
    cursor: pointer;
}

#portfolio-link {
    padding-right: 0.5rem;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    font-size: 0.75rem;
}

#github-link {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
}

/* RESPONSIVE WARNING */
#responsive-warning {
    width: 100%;
    height: 100%;
    padding: 2rem;
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 1rem;
    text-align: center;
    z-index: 9999;
}

.warning-icons {
    font-size: 10rem;
}

@media (max-width: 768px) {
    #responsive-warning.show {
        display: flex;
    }
}

/* FLIP BOOK */
#flip_book {
    width: 480px; /* base width */
    height: 700px; /* base height */
    position: relative;
    transition-duration: 1s;
    perspective: 2000px;
}

.front_cover,
.back_cover {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 2.5px 5px 5px 2.5px;
    /* background-image: url(./assets/images/flip_book_edge_shading.webp); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: mediumslateblue;
    box-shadow: 0 0 5px 0 rgb(25, 25, 25, 0.25);
}

.front_cover {
    position: absolute;
    cursor: pointer;
    transform-origin: center left;
    transition: transform 0.5s;
    z-index: 99;
}

.front_cover label {
    width: 100%;
    height: 100%;
    position: absolute;
    cursor: pointer;
    z-index:100;
}

.page {
    width: calc(100% - 10px);   /* 30px less than flip_book width to create margin */
    height: calc(100% - 10px);  /* 20px less than flip_book height for top/left margins */
    position: absolute;
    top: 10px;
    left: 2px;
    border-radius: 0 5px 5px 0;
    background-color: black;
    transform-origin: left;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    transition-duration: 0.5s;
}

.front_page,
.back_page {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
}

.back_page {
    transform: rotateY(180deg);
    z-index: 100;
}

.front_page label,
.back_page label {
    width: 100%;
    height: 100%;
    position: absolute;
    cursor: pointer;
    z-index: 100;
}


.front_content,
.back_content {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: inherit;
    z-index: 97;
}

.back_content {
    border-radius: 5px 0 0 5px;
}


.back_cover {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: -1;
    border-radius: 2.5px 5px 5px 2.5px;
}

.cover_image{ 
    width:100%;
    height: 100%;
    object-fit:cover;
    border-radius: inherit;
    z-index: 98;
    position: absolute;
}




#page1 {
    z-index: 10;
}

#page2 {
    z-index: 8;
}

#page3 {
    z-index: 7;
}

#page4 {
    z-index: 6;
}

#page5 {
    z-index: 5;
}

#page6{
    z-index:4;
}

#page7{
    z-index:3;
}

#page8{
    z-index:2;
}

#cover_checkbox:checked~#flip_book {
    transform: translateX(225px); /* half width for smooth opening */
}

#cover_checkbox:checked~#flip_book .front_cover {
    transform: rotateY(-180deg);
    transition: transform 1.5s, z-index 0.5s 0.5s;
    z-index: 1;
}

#cover_checkbox:checked~#flip_book #cover {
    width: 80%;
    height: 80%;
    position: absolute;
}

#page1_checkbox:checked~#flip_book #page1 {
    transform: rotateY(-180deg);
    z-index: 3;
}

#page2_checkbox:checked~#flip_book #page2 {
    transform: rotateY(-180deg);
    z-index: 4;
}

#page3_checkbox:checked~#flip_book #page3 {
    transform: rotateY(-180deg);
    z-index: 5;
}

#page4_checkbox:checked~#flip_book #page4 {
    transform: rotateY(-180deg);
    z-index: 6;
}

#page5_checkbox:checked~#flip_book #page5 {
    transform: rotateY(-180deg);
    z-index: 9;
}

#page6_checkbox:checked~#flip_book #page6 {
    transform: rotateY(-180deg);
    z-index: 10;
}

#page7_checkbox:checked~#flip_book #page7 {
    transform: rotateY(-180deg);
    z-index: 11;
}

#page8_checkbox:checked~#flip_book #page8 {
    transform: rotateY(-180deg);
    z-index: 12;
}

.click-btn{
    width:20%;
}