body {
    margin: 0;
    padding: 0;
    font-family: Figtree;
}


/* Fixed header */
#headerDiv {
    width: 100%;
    height: 140px;
    background: white;
    position: fixed;
    top: 0;
    z-index: 1000;
}


#photoDiv {
    width: 100%;
    height:56vw;
    background: white;
    z-index: 100;
    margin-top: 140px;
}

/* Sticky Div 3 */
#portfolioHeader {
    background-color: #F0F0F0;
    width: 100%;
    height: 110px;
    position: sticky;
    top: 135px;
    padding: 0;
    margin: 0;
}

#portfolioDiv {
    background-color: #F0F0F0;
    width: 100%;
    height: auto;
}

.logo-container {
    width: calc(max(24vw, 170px));
    position: fixed;
    top: 18vw;
    right: 30px;
    z-index: 1000;
    /* Removed gap — doesn't apply to block layout */
}

.logo_image {
    width: max(3vw, 18px);
    aspect-ratio: 1 / 1;
    border-radius: 0.5vw;
    object-fit: cover;
    display: inline-block;
    margin-left: 0.2vw; /* add spacing manually between images */
    vertical-align: middle; /* optional: keeps images aligned */
}

.title-text-container {
    padding: 10px;
}

.title-text {
    display: block;
    color: #244167;
    width: 100%;
    padding: 0px;
    text-align: center;
    font-size: 9vw; /* responsive to viewport width */
}

.title-sub-text {
    display: block;
    color: #4E6F99;
    margin-top: -5px;
    margin-right: 30px;
    text-align: right;
    font-size: 5vw; /* responsive to viewport width */
    font-weight: lighter;
}


.meIcon{
    display: inline-block;
    color: #F9952A;
    font-size: 5vw;
    margin-left: 10vw;
    position: relative;      /* add this */
    top: -7vw;              /* move it up */
}
.title-me {
    display: block;
    color:  #244167;
    margin-left: 5vw;
    margin-top: -7vw;
    text-align: left;
    font-size: 4vw; /* responsive to viewport width */
    font-weight: lighter;
}

.d3 {
    display: flex;
    justify-content: right;
    width: 98vw;
    position: relative;
    top: 0;
    align-items: baseline;
}

.title-d3 {
    color: #4E6F99;
    display: block;
    font-size: 4.5vw;
    font-weight: lighter;
}

.title-d3-since {
    color: #244167;
    display: block;
    font-size: 3vw;
    font-weight: lighter;
    margin-left: 5px;
    margin-right: 30px;
    margin-bottom: 0.4vw;
}
.anchor {
    position: relative;   /* The ONLY new rule you need */
    padding: 0;
    margin: 0;
}

.me-image {
    margin-top: -5vw;
    margin-left: 2vw;
    width: 40vw;
    border: 0.75vw solid #F0F0F0;
    border-radius: 1vw;
    position: relative;
    z-index: 500;
}

.dog-image {
    width: 65vw;
    border:  0.75vw solid #F0F0F0;
    border-radius: 1vw;
    position: relative;
    margin-top: -30vw;
    margin-left: 25vw;
}

.dog-text{
    margin-left: 27vw;
    margin-top: 28vw;
}
.bath-text{
    margin-left: 54vw;
    margin-top: -43vw;
}
.photocaption{
    font-size: 4.5vw;
    color: white;
    z-index: 500;
    position: relative;
}
.me-text{
    margin-left: 4vw;
    margin-top: -8vw;
}

.select-label {
    text-align: left;     /* align left */
    font-weight: bold;
    color: #244167;
    font-size: 1.5rem;
    margin: 0;
    padding: 0;
    padding-top: 10px;
    margin-top: 5px;
    margin-left: 3vw;
}

.select-row {
    padding: 1rem;
    display: flex;
    gap: 10px; /* space between selects */
    width: 100%; /* full width of parent */
    box-sizing: border-box;
}

/* Make each select take equal width and ignore content */
.responsive-select {
    flex: 1 1 0%;        /* equal widths, grow and shrink */
    min-width: 0;        /* prevents overflow in flex */
    padding: 0.5rem;     /* smaller padding to reduce influence on width */
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* includes padding/border in width */
    background-color: #fff;
    color: #244167;       /* default placeholder color */
    appearance: none;     /* optional: removes OS default arrow styling for uniformity */
}

.responsive-select:valid {
    color: #68788F;  /* placeholder color */
}



@media (min-width: 640px) {
    #photoDiv{
       height: 360px;
    }
    .logo_image{
        width: calc(min(3.5vw,30px));
    }
    .logo-container {
        padding-top: 5px;
        width: calc(min(3.5vw,30px) * 9);
        position: fixed;
        top: calc(min(60vw,750px) / 20);
        right: 10px;
    }
    .title-text {
        width: min(60vw,750px);
        padding-left: 10px;
        text-align: left;
        font-size: calc(min(60vw,750px) / 10); /* 20 is approx char count */
    }
    .title-sub-text {
        width: min(57vw,720px);
        text-align: right;
        margin-top: -5px;
        /* Trick: font-size = 50vw / number of characters in the text */
        font-size: calc(min(60vw,750px) / 17); /* 20 is approx char count */
        font-weight: lighter;
    }
    .meIcon{
        position: fixed;
        margin-left: 4vw;
        top: 7.5vw;
        font-size: 26px;
    }
    .title-me {
        margin-left: 0px;
        margin-top: 0px;
        position: fixed;
        left: 30px;
        top: 10vw;
        font-size: 26px;
    }
    .d3 {
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
    }
    .title-d3{
        width: min(57vw,720px);
        text-align: right;
        font-size: 30px;
    }
    .title-d3-since{
        margin-right: 0px;
        font-size: 20px;
    }
    .me-image {
        width: 232px;
        margin-left: 0px;
        margin-top: -60px;
        border: 4px solid #F0F0F0;
        left: 25px;
    }
    .dog-image {
        width: 400px;
        height: auto;
        margin-top: -160px;
        margin-left: 200px;
        border: 4px solid #F0F0F0;
    }
    .dog-text{
        margin-left: 215px;
        margin-top: 170px;
        font-size: 30px;
    }
    .bath-text{
        margin-left: 355px;
        margin-top: -265px;
        font-size: 30px;
    }
    .me-text{
        margin-left: 35px;
        margin-top: -50px;
        font-size: 30px;
    }
    .select-label {
        margin-left: 20px;
    }

    .responsive-select {
        font-size: 0.9rem;
        padding: 0.4rem;  /* slightly smaller padding for tiny screens */
    }
}

@media (min-width: 930px) {

    .logo_image{
        width: 30px;
    }
    .logo-container{
        width: 270px;
        top: 30px;
    }
    .title-text{
        font-size: 55.7px;
        width: 530px;
    }
    .title-sub-text{
        font-size: 32.7px;
        width: 530px;
    }
    .title-d3{
        font-size: 32.7px;
        width: 530px;
    }

    .title-me {
        top: 90px;
    }
    .meIcon{
        position: fixed;
        margin-left: 35px;
        top: 70px;
        font-size: 26px;
    }
}


.word-container {
    margin: 20px;
    left: 610px;
    top: -260px;
    position: relative;
    width: calc(100vw - 652px);       /* your div width */
    height: auto;      /* enough height for 6 lines */
    display: flex;
    flex-direction: column;
    justify-content: space-between;  /* even vertical spacing */
    font-size: 30px;
    line-height: 40px;
}

.word {
    position: relative; /* allows left-shifting */
    white-space: nowrap;
    color: #F9952A;
}

/* === Overlay === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;                /* hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Show class */
.modal-overlay.active {
    display: flex;
}

/* === Modal Box === */
.modal {
    background: white;
    border-radius: 12px;
    width: min(90vw, 700px);
    aspect-ratio: 3 / 2;
    padding: clamp(0.5rem, 1vw, 1rem);
    position: relative; /* required for absolute children */
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    overflow: hidden;        /* ensures the image cannot spill */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-size: 1.2rem;
    z-index: 3000;
    gap: 1rem;
}

/* === Close Button === */
.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4100; /* <— floats above everything */
}
.modal-close:hover {
    background: #f0f0f0;
}
.modal-image {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 95%;   /* <— as you wanted */
    width: auto;
    object-fit: contain; /* optional: ensures correct scaling */
    margin: 0;     /* ensure no accidental spacing */
    z-index: 3501;
}

#modalContent {
    padding-left: 6px;
    margin-top: 0;
    width: min(38%, 240px);
    z-index: 4000;
}

h2 {
    padding: 6px;
    margin: 0;
    z-index: 4000;
    padding-right: 25px;
}
#modalStage,#modalCharts,#modalSector {
    line-height: 1.8rem;
}
@media (orientation: portrait) {

    #modalContent {
        width: 100%;
    }

    #modalStage,#modalCharts,#modalSector {
        line-height: 1rem;
    }

    .modal {
        aspect-ratio: 2 / 3;
        font-size: 0.8rem;
    }

    .modal-image {
        right: 0;
        left: 0;
        width: 100%;     /* full width */
        height: auto;
        bottom: -20px;       /* anchored to the bottom */
        object-fit: contain;
    }
}
