* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
    font-feature-settings: "kern";
    text-decoration: none;
}
:root {
    --bg: #FFFFFF;
    --text: #1A1A1A;
    --surface: #F4F4F4;

    --scroll: hsl(0, 0%, 76%);
    --nav: hsla(0, 0%, 100%, 0.8);

    --orange: #ff6600;
    --frame-bleed: 24px;
}
[data-theme="dark"] {
    --bg: #000000;
    --text: #F4F4F4;
    --surface: #1A1A1A;

    --scroll: hsl(0, 0%, 20%);
    --nav: hsla(0, 0%, 0%, 0.8);
}
.home,
.home-nav,
.carousel {
    --bg: #F4F4F4;
    --text: #1A1A1A;
    --surface: #FFFFFF;
    --surface-alt: #F4F4F4;
    --scroll: hsl(0, 0%, 76%);
    --nav: hsla(0, 0%, 100%, 0.8);
}
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}
::view-transition-old(root) {
    animation: 200ms ease fade-out;
}
::view-transition-new(root) {
    animation: 300ms ease fade-in;
}
@font-face {
    font-family: 'Tiempos-Headline';
    src: url('./fonts/tiempos-headline-light.otf') format('opentype');
    font-style: normal;
    font-display: swap; /* prevents invisible text while loading */
}
@font-face {
    font-family: 'PPRadioGrotesk';
    src: url('./fonts/ppradiogrotesk-regular.otf') format('opentype');
    font-style: normal;
    font-display: swap; /* prevents invisible text while loading */
}
@font-face {
    font-family: 'PPNeueMontreal';
    src: url('./fonts/ppneuemontreal-medium.otf') format('opentype');
    font-style: normal;
    font-display: swap; /* prevents invisible text while loading */
}
/*******************************************************/
/******************** G E N E R A L ********************/
/*******************************************************/
body {
    color: var(--text);
    background-color: var(--bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}
section {
    width: 100%;
    /* padding: 0 16px; */
    /* padding: 0 5px 0 16px; */
    font-family: 'PPNeueMontreal';
}
img {
    pointer-events: none;
    user-select: none;
}
/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--scroll);
}
/* Firefox */
html {
    scroll-behavior: smooth;
    overscroll-behavior: none;
    scrollbar-width: thin;
    scrollbar-color: var(--scroll) transparent;
    background-color: var(--bg);
}
::selection {
  background: var(--orange);
  color: #000;
}
/* TEXT STYLES */
.t1 {
    font-family: 'PPNeueMontreal';
    font-weight: 100;
    font-size: 32px;
    line-height: 110%;
    letter-spacing: -0.02em;
    color: var(--text);
}
.t2 {
    font-weight: 500;
    font-size: 20px;
    line-height: 130%;
    opacity: 0.9;
    color: var(--text);
}
.t3, .t4 {
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
}
.t4, span {
    opacity: 50%;
}
.tr {
    opacity: 100%;
    font-family: 'PPRadioGrotesk';
}
/* NAV */
nav {
    width: calc(100% - 32px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    margin: 0 16px;
    
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--nav);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* border-bottom: 1px solid var(--surface); */
}
nav div {
    display: flex;
    align-items: center;
    column-gap: 8px;
}
.gamma {
    justify-content: flex-end;
    align-items: flex-end;
    column-gap: 12px;
}
nav a {
    padding: 16px 0;
    text-decoration: none;
}
nav a:hover {
    text-decoration: underline;
    color: var(--orange);
    opacity: 1;
}
/* BODY */
.frame {
    width: calc(100vw - 32px);
    aspect-ratio: 10 / 3;
    background-color: var(--surface);
    margin: 24px 16px;
    position: relative;
}
.frame img {
    position: absolute;
    top: calc(-1 * var(--frame-bleed)); left: 50%;
    height: calc(100% + var(--frame-bleed) * 2);
    transform: translateX(-50%);
    /* z-index: 2; */
}
/* PROJECT INFO */
.project-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    padding: 16px;
}
/* GRID */
.grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* padding: 96px 0; */
    padding: 96px 16px;
    gap: 8px;
}
.grid div {
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    row-gap: 8px;
}
.grid img {
    width: 100%;
    object-fit: cover;
    background-color: var(--surface);
}
.small {
    grid-column: span 1;
}
.medium,
.large {
    grid-column: span 2;
}
.small img,
.large img {
    aspect-ratio: 4 / 5;
}
.medium img {
    height: 100%;
}
.landscape {
    aspect-ratio: 5 / 4;
    grid-column: span 2;
}
/*******************************************************/
/******************* H O M E P A G E *******************/
/*******************************************************/
.home {
    background-color: var(--text);
    color: var(--bg);
    padding: 0;  
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.home-nav {
    width: calc(100% - 32px);
    display: flex;
    justify-content: space-between;
    background-color: var(--text);
    border: none;
}
.home-nav span {
    width: 100%;
}
.home-nav h1 {
    width: 100%;
    color: var(--bg);
    padding: 16px 0;
}
.home-link {
    color: var(--bg);
}
.carousel {
    width: 100%;
    overflow-x: hidden;
    padding: 8px;
    background: var(--bg);
}
.carousel-track {
    width: 200vw;
    display: flex;
    cursor: pointer;
    column-gap: 8px;
    position: relative;
}
.fancy {
    width: calc(25vw - 8px);
    object-fit: contain;
    display: grid;
    align-content: center;
    justify-items: center;
    aspect-ratio: 4 / 5;
    background-color: var(--surface);
    position: relative;
}
.fancy img {
    width: calc(25vw - 16px);
    object-fit: contain;
    aspect-ratio: 1/1;
    transition: transform 0.3s ease-out;
}
.label {
    position: absolute;
    left: 0; bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
    padding: 32px; /* optional: spacing from edges */
}
.carousel-track a:hover .label {
    opacity: 1;
    pointer-events: auto;
}
.carousel-track a:hover .fancy img {
    transform: scale(1.05);
}
/*******************************************************/
/***************** R E S P O N S I V E *****************/
/*******************************************************/
/* 2560px and above */
/* @media screen and (min-width: 2560px) {} */

/* 1920px and above */
@media screen and (min-width: 1921px) and (max-width: 2559px) {
    .t1 {
        font-size: 48px;
    }
    .t2 {
        font-size: 24px;
    }
    .t3, .t4 {
        font-size: 16px;
    }
}


/* 1440px → 1920px */
/* @media screen and (min-width: 1440px) and (max-width: 1920px) {} */

/* 500px and below: see mobile.css */