@font-face{
    font-family: "Nunito-Regular";
    src: url("../font/Nunito/Nunito-Regular.ttf");
    font-display: swap;
}
@font-face{
    font-family: "Nunito-Bold";
    src: url("../font/Nunito/Nunito-Bold.ttf");
    font-display: swap;
}

html {
    scroll-behavior: smooth;
}
html.dark::before {
  opacity: 0.75;
  filter: brightness(0.6);
}
html.dark {
    --bg: #202730;
    --text-color: #d3dae0;
    --text-color2: #8B8A99;
}

:root {
    --font-regular: "Nunito-Regular", "Nunito", sans-serif;
    --font-bold: "Nunito-Bold", "Nunito", sans-serif;

    --text:tiny: 0.85rem;       /*13.6px*/
    --text-small: 1rem;         /* 16px */
    --text-regular: 1.125rem;   /* 18px */
    --text-big: 1.5rem;         /* 24px */
    --text-header: 2.5rem;      /* 40px */
    
    --bg: #E8EBEE;
    --text-color: #202730;
    --text-color2: #8B8A99;
}

h1 { font-size: var(--text-header); }
h2 { font-size: var(--text-big); } 

body {
    min-height: 100vh;
    font-size: var(--text-small);
    font-family: "Nunito-Regular";
    cursor: url("../image/cursor-default.svg"), auto;
    background-color: var(--bg);
    transition: opacity 0.6s ease;
    color: var(--text-color);
    margin: 0;
}

main {
    text-align: center;
        min-height: 100vh;
} 

nav { /* navigation bar */
    font-family: var(--font-bold);
    position: sticky;
    top: 0;
    display: flex;
    max-width: 70%;
    
    background-color: var(--bg);
    box-shadow: 0 8px 8px rgba(0, 0, 0, 0.05);

    justify-content: center;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: .5% 3% .5% 3%; /* top right bottom left */
    gap: 20px;  /* gap between text  */
    margin: auto;
}
/* dark mode */
#theme-toggle {
    width: 25px;
    height: 25px;
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: none;
    background: transparent;
    background-color: var(--bg);
    cursor: url("../image/cursor-pointer.svg"), auto;

    margin-right: -14px;
    z-index: 90;
}
#theme-toggle img {
    width: 100%;
    height: 100%;
    object-fit:contain;

    display:block;
}
#theme-toggle:hover {
    transform: scale(1.1);
}
#theme-toggle::after {
    content: attr(data-tooltip) "\A" attr(data-desc);
    white-space: pre;
    max-width: 500px;
    height: auto;
    position: absolute;

    background: var(--text-color);
    color: #fff;
    font-family: var(--font-regular);
    font-size: var(--text-small);
    padding: 10px 16px;
    border-radius: 12px;
    text-align: center;
    pointer-events: none;

    bottom: -55px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#theme-toggle:hover::after {
    opacity: 1; 
    transform: translateX(-50%) translateY(0);
}

a {
    color: var(--text-color2);
    text-decoration: none;
    font-weight: bold;
    cursor: url("../image/cursor-pointer.svg"), auto;
}
a.landing,
a.projects,
a.next-project,
a.contact {
    font-size: clamp(var(--text-small), 3vw, var(--text-regular)); /*scale down nav buttons based on screen size*/
}
a.landing:hover,
a.projects:hover,
a.next-project:hover,
a.contact:hover {
    color: var(--text-color);
}
a.landing {
    margin-right: auto; 
}

img {
    cursor: url("../image/cursor-pointer.svg"), auto;
}

.project-logo{
    aspect-ratio: auto;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: 40px;
    margin-bottom: 40px;
}
.project-about{
    display: grid;
    grid-template-columns: 2fr 1fr;
    width:60%;

    align-items: start;
    text-align: left;
    margin: auto;
    margin-bottom: 80px;
}
.project-description p{
    margin-top: 0;
    padding-right: 40px;
}
.project-meta {
    border-left: 3px solid #ccc;
    padding-left: 8px;
}
.meta .label{
    font-family: var(--font-bold);
}
.meta .value{
    padding-left: 8px;
}

.work-section{
    margin-bottom: 80px;
}
.section-title { /*all section headers */
    font-family: var(--font-bold);
    display: inline-block; /* keeps it tight around text */
    color: var(--text-color2);
    border-radius: 50px;
    border: 2px solid #8b8a99; /* border-width + border-style + color */
    padding: 0px 20px;
    margin-bottom: 40px;
}

/* Lightbox background */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.8);
    display: none;

    justify-content: center;
    align-items: center;
    z-index: 9999;
}
/* Enlarged image */
#lightbox img {
    max-width: 90%;
    max-height: 90%;
    cursor: url("../image/cursor-pointer.svg"), auto;
}
/* lightbox Close button */
#close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    cursor: url("../image/cursor-pointer.svg"), auto;
}

/*First image of the section*/
.section-hero {
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 1280px;
    
    gap: 8px;
    margin: auto;
    margin-bottom: 80px;
}
.hero-image img {
    height:auto;
    width:100%;
    aspect-ratio: auto;
    border-radius: 24px;
}
.hero-text {
    font-family: var(--font-regular);
    text-align: left;
    padding-left: 2%;
    padding-right: 2%;
}

/*Image with text on the right */
.section-workprogress-01 {
    display: flex;
    flex-direction: row;
    width: 90%;
    
    gap: 8px;
    margin: auto;
    margin-bottom: 80px;
}
.workprogress-01-image img {
    height:auto;
    width:100%;
    max-width: 960px;
    aspect-ratio: auto;
    border-radius: 12px;
}
.workprogress-01-text {
    font-family: var(--font-regular);
    text-align: left;
    max-width: 480px ;
    padding-left: 16px;
}

/*Image with text on the left */
.section-workprogress-02 {
    display: flex;
    flex-direction: row;
    width: 90%;
    justify-content: flex-end;
    
    gap: 8px;
    margin: auto;
    margin-bottom: 80px;
}
.workprogress-02-text {
    font-family: var(--font-regular);
    text-align: right;
    max-width: 480px ;
    padding-right: 16px;
}
.workprogress-02-image img {
    height:auto;
    width:100%;
    max-width: 960px;
    aspect-ratio: auto;
    border-radius: 12px;
}

/*3 images next to each other with centered text*/
.workprogress-03{
    display: grid;
    grid-template-columns: auto auto auto;
    width: 95%;
    gap: 8px;
    margin: auto;
    margin-bottom: 80px;
}
.workprogress-03-image img {
    height:auto;
    width:100%;
    max-width: 600px;
    aspect-ratio: auto;
    border-radius: 6px;
}
.workprogress-03-text {
    width: 70%;
    grid-column: 1 / -1;
    margin: auto;
}

/*video with center text*/
.workprogress-video {
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 1280px;
    
    gap: 8px;
    margin: auto;
    margin-bottom: 80px;
}
.workprogress-video video {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    margin: auto;
}
.video-text{
    font-family: var(--font-regular);
    text-align: left;
    padding-left: 2%;
    padding-right: 2%;
}

/*2 images next to each other with centered text*/
.workprogress-04{
    display: grid;
    grid-template-columns: auto auto;
    width: 80%;
    gap: 80px;
    margin: auto;
    margin-bottom: 80px;
}
.workprogress-04-image img {
    height:auto;
    width:100%;
    max-width: 850px;
    aspect-ratio: auto;
    border-radius: 6px;
}
.workprogress-04-text {
    width: 80%;
    grid-column: 1 / -1;
    margin:auto;
    margin-top: -70px;
}

/*2 wide images next to each other with centered text*/
.workprogress-itemicons {
    display: grid;
    grid-template-columns: auto auto;
    width: 90%;
    margin: auto;
    margin-bottom: 80px;
}
.workprogress-itemicons-image img {
    height:auto;
    width:100%;
    max-width: 859px;
    aspect-ratio: auto;
}
.workprogress-itemicons-text{
    width: 80%;
    grid-column: 1 / -1;
    margin:auto;
}

.workprogress-wide {
    width: 95%;
    margin: auto;
}
.workprogress-wide-image img {
    height:auto;
    width:100%;
    max-width: 1859px;
    aspect-ratio: auto;
}


/*halftone effect on both sides of the screen*/
.halftone-left {
    position: fixed;
    top: 0;
    left: 0;
    width: 172px;
    height: 100vh;
    aspect-ratio: 172 / 502;
    z-index: -1;

    background-image: url("../image/superfuse/halftoneleft.webp");
    background-repeat: repeat-y;
    background-size: contain;

}
.halftone-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 172px;
    height: 100vh;
    aspect-ratio: 172 / 502;
    z-index: -1;

    background-image: url("../image/superfuse/halftoneright.webp");
    background-repeat: repeat-y;
    background-size: contain;
}

#contact {  /* contact segment */   
    font-family: var(--font-regular);
    background: #202730;
    color: var(--text-color2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 50px;

}
    #contact .contact-segment {
        margin-top: -20px;
}
    #contact .contact-links {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap:40px;
}
    #contact .contact-links img {
        object-fit: contain;
        transition: transform 0.2s ease;
}
#contact .contact-links img:hover {
    transform: scale(1.1);
}
#contact .contact-links > a {
    position: relative;
    display: inline-block;
}

#contact .contact-links > a::after {
    content: attr(data-tooltip);
    position: absolute;

    bottom: -45px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);

    background: var(--text-color);
    color: #fff;
    font-size: var(--text-small);
    padding: 10px 16px;
    border-radius: 12px;

    white-space: pre;
    pointer-events: none;

    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#contact .contact-links > a:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0%);
}

body > footer {
    font-family: var(--font-regular);
    background: #202730;
    color: var(--text-color2);
    display: flex;
    width: 100%;
    padding: 40px 24px;
    box-sizing: border-box;
}

/* ============ TABLET — 900px ============ */
@media (max-width: 900px) {

    nav {
        max-width: 90%;
    }
    .project-logo img {
        width: 80%;
        max-width: 600px;
    }
    .project-about {
        grid-template-columns: 1fr;  /* stack description + meta vertically */
        width: 80%;
    }

    .section-workprogress-01,
    .section-workprogress-02 {
        flex-direction: column;      /* stack image + text vertically */
        width: 80%;
    }

    .workprogress-02-text {
        text-align: left;            /* left-align text when stacked */
        padding-right: 0;
        padding-left: 16px;
    }

    .workprogress-03 {
        grid-template-columns: auto auto;  /* 3 cols → 2 cols */
    }

    .workprogress-04 {
        grid-template-columns: 1fr;  /* 2 cols → 1 col */
        gap: 24px;
    }

    .workprogress-04-text {
        margin-top: 0;               /* remove the negative margin hack */
    }
}

/* ============ MOBILE — 600px ============ */
@media (max-width: 600px) {

    nav {
        max-width: 95%;
        padding: 2% 4%;
    }
    .project-logo img {
        width: 60%;
        max-width: 400px;
    }
    .project-about {
        width: 90%;
    }

    .section-hero,
    .section-workprogress-01,
    .section-workprogress-02,
    .workprogress-video {
        width: 95%;
    }

    .workprogress-03 {
        grid-template-columns: 1fr;  /* 2 cols → 1 col on phone */
    }

    .workprogress-itemicons {
        grid-template-columns: 1fr;  /* 2 cols → 1 col */
    }

    .workprogress-04 {
        width: 95%;
        gap: 16px;
    }

    .halftone-left,
    .halftone-right {
        display: none;               /* too narrow on mobile */
    }
}

/* ============ SMALL PHONE — 400px ============ */
@media (max-width: 400px) {

    .project-logo img {
    width: 80%;
    }
    .project-about {
        width: 95%;
    }

    nav {
        max-width: 100%;
        gap: 6px;
        border-radius: 0;            /* no rounded corners when full width */
    }
    #theme-toggle {
        width: 20px;
        height: 20px;
        position: relative;

        margin-right: 0px;
        margin:auto
    }
    #theme-toggle::after {
        display:none;
    }
    a.landing,
    a.projects,
    a.next-project,
    a.contact {
        font-family: var(--font-regular);
        font-size: var(--text-tiny);
        margin:auto;
    }
        .section-title {
    font-size: var(--text-regular);
    }

}
