/* ----- BOOKCOVER.CSS ----- */

/* -------------------------------------------- */
/* GLOBAL LAYOUT                                */
/* -------------------------------------------- */
html, body {
    margin: 0;
    padding: 0;
    background-color: black;
    color: white;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
}

#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: black;
    z-index: 1500;
    padding: 10px 0;
}


/* -------------------------------------------- */
/* SITE TITLE                                   */
/* -------------------------------------------- */
#site-title {
    font-size: clamp(36px, 4vw, 60px);
    margin: 10px 0 0 75px;
    position: sticky;
    top: 0;
    background: black;
    z-index: 10;
}

/* -------------------------------------------- */
/* SOCIAL ICONS                                 */
/* -------------------------------------------- */
#social-bar {
    position: fixed;       /* place relative to nearest positioned ancestor */
    top: 20px;                /* same vertical offset as before */
    right: 20px;              /* same horizontal offset */
    display: flex;
    gap: 4px;
    z-index: 2000;
}

#social-bar a {
    width: clamp(28px, 6vw, 42px);
}

#social-bar img {
    width: 100%;
    transition: 0.2s;
}

#social-bar img:hover {
    filter: brightness(1.5);
    transform: scale(1.1);
}

.about-link{
    position: relative;
    top: -7px;
}

#site-subtitle {
    font-size: clamp(36px, 4vw, 40px);
    margin: 10px 0 0 75px;
    text-align: left;
    position: sticky;
    top: 0;
    background: black;
    z-index: 10;
}


/* -------------------------------------------- */
/* MAIN CONTENT LAYOUT (TWO COLUMNS)           */
/* -------------------------------------------- */
#main-content {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 4vw, 40px);
    padding: clamp(20px, 3vw, 60px);
    padding-top: 180px;
    z-index: 1;
    position: relative;
}

.content-row {
    display: flex;
    gap: 30px;
    align-items: flex-start; /* important! prevents flex from stretching image column */
}

.image-column, .text-column {
    flex: 1;
    position: relative;
}

.text-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.software-icons {
    display: flex;
    justify-content: center;
    align-self: flex-start;
    gap: 30px;
    margin-left: 100px;
}

.software-icons img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(0.9);
    transition: transform 0.2s;
}

.software-icons img:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.icon-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.icon-wrapper::after {
    content: attr(data-label);
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    white-space: nowrap;
}

.icon-wrapper:hover::after {
    opacity: 1;
}

.project-points {
    margin-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
}

.project-points li {
    list-style: none;
    position: relative;
    padding-left: 22px;
}

.project-points li::before {
    content: "✧";
    position: absolute;
    left: 0;
    top: 5px;
    color: white;
}



.image-column {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: auto; /* JS will override this */
    border-radius: 20px; /* match cards */
}

.carousel-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;


}
.image-carousel {
    width: 100%;
    max-width: 700px;
    aspect-ratio: 4 / 3;
    position: relative;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-track img {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.rationale-title {
    font-size: 28px;
    margin: 0 auto 20px auto;
    font-weight: bold;
    text-align: center;

    opacity: 0;
    transform: translateY(10px);
    animation: titleFade 0.6s ease forwards;
}

.rationale-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 2px;
    background: rgba(255,255,255,0.3);
    margin: 10px auto 0 auto;
    border-radius: 2px;

    transform: scaleX(0);
    transform-origin: center;
    opacity: 0;

    animation: dividerGrow 0.6s ease forwards;
    animation-delay: 0.4s; /* after title starts */
}

.rationale {
    margin-top: 40px;
    width: 100%;
    font-size: 20px;
    line-height: 1.25;
}

.rationale p {
    line-height: 1.7;
    margin-bottom: 16px;

    opacity: 0;
    transform: translateY(10px);
    animation: textFade 0.6s ease forwards;
    animation-delay: 0.8s; /* after divider */
}

@keyframes titleFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dividerGrow {
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes textFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rationale p:nth-of-type(1) { animation-delay: 0.8s; }
.rationale p:nth-of-type(2) { animation-delay: 1.0s; }
.rationale p:nth-of-type(3) { animation-delay: 1.2s; }

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: black;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.carousel-arrow:hover { background: white; }

.carousel-arrow.left { left: 10px; }
.carousel-arrow.right { right: 10px; }

/* Text styling */
.text-column p {
    font-size: 22px;
    line-height: 1.5;
    margin: 0;
    justify-content: center;
}

/* -------------------------------------------- */
/* FOOTER                                       */
/* -------------------------------------------- */
#site-footer {
    position: sticky;
    bottom: 0;
    width: 100%;
    padding: clamp(3px, 1vw, 6px) clamp(6px, 2vw, 12px);
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: clamp(10px, 2.5vw, 14px);
    letter-spacing: 0.5px;
    background-color: black;
    z-index: 100;
}

#site-footer .logo {
    width: clamp(50px, 5vw, 80px);
    opacity: 0.8;
}

#site-footer p {
    margin: 0;
    opacity: 0.85;
    text-align: right;
    flex: 1;
}

/* RESPONSIVE */
@media (max-width: 900px) { .content-row { flex-direction: column; } .image-column img { height: auto; } }
@media (max-width: 600px) {
    #site-header{background-color: black; height: 130px;}
    #site-title { margin: 16px 0 0 0; text-align: center;background-color: black;}
    #site-subtitle { margin: 0 10px 0; text-align: center; font-size: 24px; background-color: black;}
    #social-bar { position: fixed; top: 100px; right: 0; margin: 8px auto 0 auto; justify-content: center; width: 100%; height: 35px; background-color: black; }
    .software-icons {
    margin-left: 0;

    align-self: center;
    gap: 20px; /* optional: tighter spacing on mobile */
    }
}

#image-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 9999999;

    
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

#image-overlay.active {
    display: flex;
}

.overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;

    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;

    background: rgba(255,255,255,0.9);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
