@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* FONT SIZES */
    --SF: clamp(0.9rem, calc(0.84rem + 0.3vw), 1.08rem); /* Small Font */
    --MF: clamp(1.2rem, calc(1.2rem + 0.6vw), 1.7rem);   /* Medium Font */
    --LF: clamp(1.5rem, calc(1.3rem + 1vw), 2.2rem);   /* Large Font */

    /* FONT LINE HEIGHTS */
    --SF-lh: 1.6;   /* small text needs more breathing room */
    --MF-lh: 1.5;   /* body/ui text */
    --LF-lh: 1.2;   /* large headings sit tighter */

    /* COLORS */
    --color-links: var(--text-color);
    --text-color: rgba(112, 112, 112, 0.98);
    --text-color-alt: rgba(0, 0, 255, 0.98);
    --button-bg-gradient: linear-gradient(135deg, rgb(from var(--bg-color) r g b / 10%), rgb(from var(--text-color) r g b / 10%), rgb(from var(--bg-color) r g b / 10%));
    --accent-color: rgba(255, 0, 0, 0.96);
    --bg-color: rgba(225, 225, 225, 0.9);

    --cursor-blue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8' fill='%230000ff' fill-opacity='0.9'/%3E%3C/svg%3E") 10 10, auto;
    --cursor-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8' fill='%23e1e1e1' fill-opacity='0.98'/%3E%3C/svg%3E") 10 10, auto;

    /* SPACING */
    --margin: 0.5rem;
    --padding: 1rem;
    --gap: 0.3rem;
    /* EFFECTS */
    --border: 0.1rem solid transparent;
    --border-gradient: var(--button-bg-gradient);
    --border-radius: 0.75rem;
    --blur-filter: blur(10px);
    --box-shadow: 0rem 0rem 2rem var(--bg-color);
    --button-shadow: 0rem 0rem 2rem var(--text-color-alt);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: var(--cursor-blue);
}



html {
    scroll-behavior: smooth;
}

h1 {
    font-weight: normal;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* UTILITY CLASSES */
.text-center {
    text-align: center;
}

.max-width-container {
    max-width: 2048px;
    margin: 0 auto;
}

.nowrap {
    white-space: nowrap;
}

.description {
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

.description.fade-out {
    opacity: 0;
}

.section-title {
    font-size: var(--MF);
    color: var(--text-color);
    margin: 0 var(--padding) var(--gap) var(--padding);
    padding: 0.35rem 0.8rem;
    display: inline-block;
}

/* HEADER AND NAV STYLES */

.header-content {
    font-size: var(--LF);
    border-radius: var(--border-radius);
    justify-content: space-between;
    align-items: center;
    gap: var(--gap);
    display: grid;
    transition: height 0.35s ease;
}

header.header-expanded .header-content {
    height: auto;
    font-size: var(--LF);
    justify-content: space-between;
}

.header-content ul {
    display: contents;
}

.header-content li {
    width: max-content;
    border-radius: var(--border-radius);
    gap: var(--gap);   
    backdrop-filter: var(--blur-filter);
    background:
        linear-gradient(var(--bg-color), var(--bg-color)) padding-box,
        var(--border-gradient) border-box;
    padding: var(--padding);
    /* box-shadow: var(--box-shadow); */
    border: var(--border);
}

header .nav-list {
    display: none;
}

header.header-expanded .nav-list {
    display: flex;
}

/* SLIDESHOW STYLES */

.slideshow {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.slideshow-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: slideshow-fade 27s infinite;
}

.slideshow-slide:nth-child(1) { animation-delay:  0s; }
.slideshow-slide:nth-child(2) { animation-delay:  3s; }
.slideshow-slide:nth-child(3) { animation-delay:  6s; }
.slideshow-slide:nth-child(4) { animation-delay:  9s; }
.slideshow-slide:nth-child(5) { animation-delay: 12s; }
.slideshow-slide:nth-child(6) { animation-delay: 15s; }
.slideshow-slide:nth-child(7) { animation-delay: 18s; }
.slideshow-slide:nth-child(8) { animation-delay: 21s; }
.slideshow-slide:nth-child(9) { animation-delay: 24s; }

@keyframes slideshow-fade {
    0%     { opacity: 0; }
    4%     { opacity: 1; }
    14%    { opacity: 1; }
    18%    { opacity: 0; }
    100%   { opacity: 0; }
}

.slideshow-slide img {
    z-index: 10999;
    width: 100%;
    height: 110%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform-origin: center center;
    animation: parallax-pan 24s ease-in-out infinite;
}

.slideshow-slide:nth-child(1) img { animation-delay:  0s; }
.slideshow-slide:nth-child(2) img { animation-delay:  3s; }
.slideshow-slide:nth-child(3) img { animation-delay:  6s; }
.slideshow-slide:nth-child(4) img { animation-delay:  9s; }
.slideshow-slide:nth-child(5) img { animation-delay: 12s; }
.slideshow-slide:nth-child(6) img { animation-delay: 15s; }
.slideshow-slide:nth-child(7) img { animation-delay: 18s; }
.slideshow-slide:nth-child(8) img { animation-delay: 21s; }

@keyframes parallax-pan {
    0%   { transform: scale(1.08) translateY(-2%); }
    50%  { transform: scale(1.04) translateY(0%);  }
    100% { transform: scale(1.08) translateY(2%);  }
}





/* FEATURE GRID STYLES */

.feature-grid {
    display: grid;
    grid-auto-flow: dense;
    grid-template-columns: repeat(4, 1fr);
    justify-content: center;
    gap: var(--gap);
    padding: var(--padding);
}

.feature-grid ul {
    display: contents;
}

.feature-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.feature-item.wide {
    grid-column: span 2;
    aspect-ratio: 8 / 3;
}
.feature-item.tall {
    grid-row: span 2;
    aspect-ratio: 4 / 6;
}
.feature-item.big {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: calc(8 / 6 - (var(--gap)));
}

.feature-item {
    /* background-color: var(--button-bg-gradient); */
    /* border: var(--border); */
    aspect-ratio: 4 / 3;
    width: 100%;
    align-items: center;
    justify-content: center;
    position: relative;
    object-fit: cover;
    overflow: hidden;
    text-decoration: none;
    border-radius: calc(var(--border-radius) + 0.5rem);
    background-image: linear-gradient(135deg, rgb(from var(--bg-color) r g b / 10%), rgb(from var(--text-color) r g b / 10%), rgb(from var(--bg-color) r g b / 10%));
    
    /* Initial state for scroll animation */
    opacity: 0;
    transform: translateY(30px) scale(0.94);
    transition: opacity 0.5s ease-out, transform 0.6s ease-out, box-shadow 0.2s ease;
}

.feature-item:hover a{
    cursor: pointer;
    animation: textBounce 0.6s ease-in-out ;

}

/* Visible state when scrolled into view */
.feature-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

figcaption.feature-caption {
    color: var(--bg-color);
    font-size: var(--MF);
    background-color: var(--text-color-alt);
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    transform: translateY(150%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--padding);
    margin: var(--margin);
    transition: all 0.5s ease;
    border-radius: calc(var(--border-radius) - 0.5rem);
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8' fill='%23e1e1e1' fill-opacity='0.98'/%3E%3C/svg%3E") 10 10, auto;
}

.feature-item:hover .feature-caption,
.feature-item:hover figcaption.feature-caption,
.feature-item:hover .feature-caption-list li {
    transform: translateY(0);
    cursor: var(--cursor-light);
}

.feature-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: calc(var(--padding) * 2);
    gap: var(--gap);
    max-width: 60ch;
    /* justify-content: space-between; */
}

.feature-text p {
    font-size: var(--MF);
    color: var(--text-color);
    animation: textBounce 0.6s ease-in-out;
}

.feature-text h1 {
    font-size: var(--LF);
    color: var(--text-color);
    animation: textBounce 0.6s ease-in-out;
}

.feature-text ul {
    display: flex;
    gap: var(--gap);
    flex-wrap: wrap;
}

.feature-text ul li {
    border-radius: var(--border-radius);
    font-size: var(--SF);
    color: var(--text-color);
    list-style: "— " inside; 
}

/* PROJECT GRID STYLES */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 0 auto;
    gap: var(--gap);
    padding: var(--padding);
}

.project-grid > * {
    min-width: 0;
    max-width: 100%;
}

/* GALLERY STYLES */
.gallery {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
}



.gallery li {
    aspect-ratio: 1 / 1;
    width: 100%;
    transition: transform 0.3s ease;
}

.gallery li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery li.big {
    grid-column: span 2;
    grid-row: span 2;
}

/* Filter Dropdown Styles */

.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-toggle {
    width: 250px;
    color: var(--text-color);
    border-radius: var(--border-radius);
    cursor: pointer;
}

.filter-options {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    color: var(--text-color);
    background-color: var(--bg-color);
    backdrop-filter: var(--blur-filter);
    border-radius: var(--border-radius);
    z-index: 1000;
    display: none;
    margin-bottom: 1rem;
}

.filter-options.show {
    display: block;
}

.filter-option {
    position: relative;
    padding: 0.75rem 1rem;
    transition: opacity 0.3s ease, background-color 0.2s ease;
    border-bottom: none;
}

.filter-option::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0.1rem;
    background: var(--border-gradient);
}

.filter-option.fade-out {
    opacity: 0;
}

.filter-option:first-child {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.filter-option:last-child {
    border-bottom: none;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.filter-option:last-child::after {
    display: none;
}

.filter-option:hover {
    color: var(--bg-color);
    background-color: var(--text-color-alt);
    cursor: var(--cursor-light);
}

.filter-option.active {
    color: var(--text-color);
    opacity: 0.5;
}

.filter-option.active:hover {
    color: var(--bg-color);
}

/* FIGURE STYLES  */

figure {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

figure img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}

.cover-img {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    object-fit: cover;
    object-position: center;
    display: block;
    top: 0;
    left: 0;
}

.fill-img {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    object-fit: contain;
    object-position: center;
    display: block;
    top: 0;
    left: 0;
}

/* ANIMATIONS */

@keyframes slider {
  0% { transform: translateX(0); }
  100% { transform: translateX(-200%); } 
}

@keyframes hoverScaleBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
    70% { transform: scale(0.95); }
}

@keyframes hoverRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    20%       { transform: rotate(-6deg); }
    40%       { transform: rotate(6deg); }
    60%       { transform: rotate(-4deg); }
    80%       { transform: rotate(4deg); }
}

@keyframes textBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}




/* BASE STYLES */

/* body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -9999;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 100px 100px;
} */

body {
    background-image:
        radial-gradient(var(--bg-color) 0%, var(--bg-color) 25%, var(--bg-color) 80%, white 110%),
        radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.085) 0 1px, transparent 1.05px),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.07) 0 1px, transparent 1.05px);
    background-size: auto, 1px 1px, 5px 5px;
    background-position: 0 0, 0 0, 1px 1px;
    max-width: 2400px;
    justify-content: center;
    background-color: var(--bg-color);
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

header {
    width: 100%;
    height: auto;
    z-index: 100000;
    display: block;
    flex-flow: wrap;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: calc(var(--padding) + 0.5rem);
    transition: transform 0.3s ease;
}

header.hidden {
    transform: translateY(-100%);
}

nav {
    z-index: 1000;
    width: 100%;
    display: flex;
    padding: var(--padding);
}

main {
    min-height: 100vh;
    flex-grow: 1;
    margin: 0 auto;    
}


ul {
    list-style: none;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

li {
    list-style: none;
    gap: var(--gap);
}

button {
    background-color: transparent;
    font-size: var(--MF);
    border: 0.15rem solid transparent;
    color: var(--text-color);
    padding: var(--padding);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}


button:hover {
    background-color: var(--text-color-alt);
    color: var(--bg-color);
    cursor: var(--cursor-light);
}

button a {    
    text-decoration: none;
    color: inherit;
}

a {
    text-decoration: none;
    color: var(--text-color-alt);
    display: inline-block;
}

a:hover {
    animation: textBounce 0.6s ease-in-out infinite;
}

i {
    font-style: normal;
    color: var(--text-color);
}

figcaption.feature-caption li {
    font-style: normal;
    color: var(--text-color);
}

figcaption.feature-caption .caption-meta {
    margin: 0;
    padding: 0;
}


footer {
    font-size: var(--SF);
    padding: calc(var(--padding) * 3);
}


@media (max-width: 600px) {

     header.header-expanded .header-content {
        font-size: var(--MF);
    }

    .header-content {
       font-size: var(--MF);
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-grid .feature-item {
        width: 100%;
        justify-self: stretch;
    }

    .feature-text,
    .feature-text p,
    .feature-text h1,
    .feature-text li {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .nowrap {
        white-space: normal;
    }

    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }


    
    /* Reset all span classes on mobile to prevent layout issues */
    .feature-item.wide,
    .feature-item.tall,
    .feature-item.big {
        grid-column: span 1;
        grid-row: span 1;
        aspect-ratio: 4 / 3;
    }

    /* Keep gallery big items spanning 2 columns and rows on mobile */
    .gallery .feature-item.big {
        grid-column: span 2;
        grid-row: span 2;
        aspect-ratio: unset;
    }
    
    /* Mobile/touch-friendly cursor styles */
    figcaption.feature-caption {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="rgba(225, 225, 225, 0.9)" /></svg>') 10 10, auto;
    }
    
    .feature-item:active .feature-caption,
    .feature-item:active figcaption.feature-caption {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="rgba(225, 225, 225, 0.9)" /></svg>') 10 10, auto;
    }
}



@media (min-width: 601px) and (max-width: 1024px) {

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
   
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-grid > p,
    .project-grid > figure {
        grid-column: 1 / -1;
    }

    .project-grid .feature-item.wide,
    .project-grid .feature-item.big,
    .project-grid .feature-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* On tablet, big items should span full width but only 1 row */
    .feature-item.big {
        grid-column: span 2;
        grid-row: span 1;
        aspect-ratio: 8 / 3;
    }

    /* Keep gallery big items spanning 2 columns and rows on tablet */
    .gallery .feature-item.big {
        grid-column: span 2;
        grid-row: span 2;
        aspect-ratio: unset;
    }
    
    /* Wide items span full width */
    .feature-item.wide {
        grid-column: span 2;
        /* aspect-ratio: 8 / 3; */
    }
    
    /* Tall items keep their height but only span 1 column */
    .feature-item.tall {
        grid-column: span 1;
        grid-row: span 2;
        /* aspect-ratio: 4 / 6; */
    }
}


@media screen and (orientation: landscape) {

}







