/* Made with Gemini */
:root {
    --split-percent: 20%;
    --top-nav-height: 10vh;
}

@font-face {
    font-family: 'Anek Latin';
    src: url('../typeface/AnekLatin-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 800;
    font-stretch: 75% 125%;
}

@font-face {
    font-family: 'Newsreader';
    src: url('../typeface/Newsreader-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 200 800;
    font-style: normal;
}

@font-face {
    font-family: 'Newsreader';
    src: url('../typeface/Newsreader-Italic-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 200 800;
    font-style: italic;
}

/* Base resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Anek Latin', sans-serif;
}



/* Layout Structure */
.layout-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Top Nav (15% height) */
.top-nav {
    display: flex;
    height: var(--top-nav-height);
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    pointer-events: none; /* Allow clicking through to handle if needed, but buttons need pointer-events */
}

.nav-left, .nav-right {
    border: 0.5vw solid rgba(0, 0, 0, 0);
    background: transparent;
    height: 100%;
    container-type: size;
    pointer-events: auto; /* Re-enable for buttons */
}

.nav-left {
    width: var(--split-percent);
}

.nav-right {
    width: calc(100% - var(--split-percent));
}

.nav-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    height: 100%;
}

.button-wrapper {
    display: flex;
    width: auto;
}

.button-wrapper.right-aligned {
    justify-content: flex-end;
}

.button-wrapper.left-aligned {
    justify-content: flex-start; /* Changed from flex-start to align with right text box */
}

.nav-btn {
    background-color: #FFEFAF;
    border: none;
    border-radius: 0.5vw;
    padding: 0.5vw;
    font-family: 'Anek Latin', sans-serif;
    font-weight: 400;
    font-size: 20cqh; /* Scaled to container height */
    color: black;
    cursor: pointer;
    text-align: center;
    line-height: 0.8;
    margin: 0;
    transition: color 0.3s;
}

.nav-btn:hover {
    color: #FF5C00;
}

.nav-text-box {
    margin-top: 0;
    flex-grow: 1;
    flex-shrink: 0;
    overflow: visible; /* Changed to visible */
}

#name-box {
    font-family: 'Anek Latin', sans-serif;
    font-weight: 500;
    font-size: 9cqw;
}

#info-box {
    font-family: 'Anek Latin', sans-serif;
    font-weight: 400;
    font-size: 4cqw;
    line-height: 0.8;
}

#info-box {
    text-align: right;
}

#info-box a {
    color: black;
    text-decoration: none;
    transition: color 0.3s;
}

#info-box a:hover {
    color: #FF5C00;
}

/* Main Content (100% height) */
.main-content {
    display: flex;
    height: 100vh;
    width: 100vw;
    border-left: 0.5vw solid transparent;
    border-right: 0.5vw solid transparent;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
}

.content-left {
    width: var(--split-percent);
    background: transparent;
    overflow: hidden; /* Non-scrollable */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    container-type: size;
    padding-top: var(--top-nav-height);
    margin-top: 10vh; /* Keep the existing top offset for titles */
}

.content-right {
    width: calc(100% - var(--split-percent));
    background: transparent;
    overflow-y: scroll;
    overflow-x: visible; /* Content can visible overflow horizontally */
    display: flex;
    flex-direction: column;
    align-items: center;
    scrollbar-width: none; /* Firefox */
    container-type: size;
    padding-top: var(--top-nav-height);
}

.content-right::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Project Styling */
.project-title-box {
    font-family: 'Anek Latin';
    font-weight: 400;
    font-size: 6cqh; /* 6% container height */
    line-height: 0.8; /* Adjusted for readability on multiple lines */
    text-align: left;
    margin-bottom: 0.8; 
    transition: color 0.3s, opacity 0.3s;
    height: auto; /* Dynamic height */
    min-height: 8cqh;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
    color: rgba(0, 0, 0, 0.4); /* Dimmed by default */
}

.project-title-box:hover {
    text-decoration: line-through;
}

.project-title-box span {
    font-weight: 200;
}

.project-title-box.highlight {
    color: #FF5C00; /* Highlighted color */
    opacity: 1;
}

.project-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 25vh;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    opacity: 0;
    transform: translateY(20px);
}

.project-wrapper:first-child {
    margin-top: 10vh; /* 10vh padding-top on parent + 10vh margin = 20vh from top */
}

.project-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-img {
    display: block;
    width: 100%; /* Image width is controlled by wrapper */
    height: auto;
}

.project-desc {
    margin-top: 1vh;
    font-family: 'Anek Latin', sans-serif;
    font-weight: 400;
    font-size: 2cqw;
    line-height: 1;
    text-align: center;
    width: 100%;
}

.project-desc span {
    font-family: 'Newsreader', serif;
    font-weight: 200;
    font-style: italic;
}

/* Draggable Handle (Interaction) */
#draggable-handle {
    position: fixed;
    top: var(--top-nav-height);
    left: var(--split-percent);
    height: 10vh;
    transform: translate(-50%, -50%); /* Center center on the split intersection */
    cursor: grab;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

#draggable-handle.visible {
    opacity: 1;
}

#draggable-handle:active {
    cursor: grabbing;
}

#draggable-handle:hover #shadow-svg {
    /* Filter to change black/white SVGs to #FF5C00 (orange) */
    filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(351deg) brightness(100%) contrast(106%);
}

#shadow-svg {
    height: 100%;
    display: block;
    pointer-events: none;
    transition: filter 0.3s;
}

/* SVG Container inside handle */
.svg-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

#shadow-svg {
    height: 100%;
    display: block;
    pointer-events: none;
}

#letter-svg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    pointer-events: none;
}

.hover-arrow {
    font-family: 'Newsreader', serif;
    font-weight: 400;
    font-size: 4vw;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    margin: 0 0.5vw;
}

/* Only show hover arrows on devices that support hover and are wide enough */
@media (hover: hover) and (min-width: 769px) {
    #draggable-handle:hover .hover-arrow {
        opacity: 1;
    }
}

/* tablet */
@media (max-width: 768px) {

    :root {
    /*--split-percent: 20%;*/
    --top-nav-height: 5vh;
    }

    .hover-arrow {
        display: none;
    }
    

    .content-left {
        display: none;
    }

    .content-right {
        width: 100%;
    }

    #name-box {
        font-size: 9.5cqw;
    }

    #info-box {
        font-size: 4.5cqw;
    }

    .nav-btn {
        border-radius: 1vh;
        font-size: 18cqh;
    }

    .project-wrapper {
    margin-bottom: 12vh;
    }

    .project-desc {
        font-size: 4cqw;
        line-height: 1;
    }

    #draggable-handle {
    height: 6vh;
    }

}
