/* ============================================================================
   FONTS & IMPORTS
   ============================================================================ */

@font-face {
    font-family: Charmanserif;
    src: url('/fonts/charmanserif-thin-webfont.woff2') format('woff2'),
         url('/fonts/charmanserif-thin-webfont.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Charmanserif;
    src: url('/fonts/charmanserif-thinitalic-webfont.woff2') format('woff2'),
         url('/fonts/charmanserif-thinitalic-webfont.woff') format('woff');
    font-weight: 100;
    font-style: italic;
}

@font-face {
    font-family: PestoMafio;
    src: url('/fonts/PestoMafio-Regular.woff2') format('woff2'),
         url('/fonts/PestoMafio-Regular.woff') format('woff');
    font-weight: 100;
    font-style: normal;
}

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

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

:root {
    
    --color-bg: #000219;
    --color-text: #fffce4;
    --white: #fffce4;
    --color-accent: #fffce4;

    --font-main: Manrope, sans-serif;
    --font-headings: Pestomafio, Arial, sans-serif;
    --font-accent: Charmanserif, Georgia, sans-serif;
    --heading-h1: clamp(2.4rem, 1.8rem + 8vw, 10rem);
    --heading-h2: calc(var(--heading-h1) / var(--1gr));
    --heading-h3: calc(var(--heading-h2) / var(--1gr));
    --heading-h4: calc(var(--heading-h3) / var(--2gr));
    --heading-h5: calc(var(--heading-h4) / var(--2gr));
    --heading-h6: calc(var(--heading-h5) / var(--1gr));

    --p-text-big: var(--heading-h6);
    --p-text-medium: calc(var(--p-text-big) / var(--2gr));
    --p-text-small: calc(var(--p-text-medium) / var(--2gr));    
    
    
    
    --border-radius-large: var(--large);
    --xxxlarge: calc(var(--xxlarge) * var(--2gr));
    --xxlarge: calc(var(--xlarge) * var(--1gr));
    --xlarge: calc(var(--large) * var(--1gr));
    --large: calc(var(--medium) * var(--1gr));
    --medium: 2rem;
    --small: calc(var(--medium) / var(--1gr));
    --xsmall: calc(var(--small) / var(--2gr));    
    --xxsmall: calc(var(--xsmall) / var(--2gr));
    --xxxsmall: calc(var(--xxsmall) / var(--2gr));
    --1gr: 1.25;
    --2gr: 1.5625; 
    
    --button-size: var(--medium);

    --border-radius-medium: var(--medium);
    --border-radius-small: var(--small);
    --page-max-width: 1200px;
    --frame-thk: 2rem;
    --page-padding: 3rem;


    --font-display: Charmanserif, sans-serif;
    --font-ui: PestoMafio, sans-serif;
    --font-body: Manrope, sans-serif;
  
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: var(--p-text-medium);
    letter-spacing: .02em;
    
    --color-bg: #000219;
    --color-text: #fffce4;
    --color-ui-bg: #000219;
    --color-ui-text: #fffce4;

    --white: #fffce4;
    --color-accent: #fffce4;

}

.beige {
    --color-bg: #FBE8D4;
    --color-text: #222;
    --color-ui-bg: #000219;
    --color-ui-text: #fffce4;
}

.white {
    --color-bg: #fff;
    --color-text: #222;
    --color-ui-bg: #000219;
    --color-ui-text: #fffce4;
}

h1 {
  font-family: var(--font-headings);
  font-size: var(--heading-h1);
  margin-bottom: var(--medium);
  font-weight: 400;
  line-height: 1em;
}

h2 {
  font-family: var(--font-headings);
  font-size: var(--heading-h2);
  text-align: center;
  margin-bottom: var(--medium);
  font-weight: 400;
  line-height: 1em;
}

h3 {
  font-family: var(--font-headings);
  font-size: var(--heading-h3);
  text-align: center;
  letter-spacing: .02em;
  margin-bottom: var(--medium);
  font-weight: 400;
  line-height: var(--heading-h3);
}

h4 {
  margin-bottom: var(--medium);
  font-family: var(--font-accent);
  font-size: var(--heading-h4);
  text-align: center;
  font-weight: 400;
  line-height: 1em;
}

h5 {
  margin: var(--small) 0;
  font-family: var(--font-headings);
  font-size: var(--heading-h5);
  text-align: center;
  font-weight: 500;
  line-height: 1em;
}

h6 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: var(--heading-h6);
  font-weight: 500;
  line-height: 28px;
}

p {
  font-size: var(--p-text-medium);
  
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: opacity .2s;
  display: block;
}

ul {
  
  padding-left: 40px;
  list-style-type: disc;
}

li {
  margin: 2px 0;
}

img {
  display: block;
}

label {
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
}

blockquote {
  border-left: 5px solid #e2e2e2;
  margin-top: 25px;
  margin-bottom: 25px;
  padding: 15px 30px;
  font-size: 20px;
  line-height: 34px;
}

figure {
  margin-top: 25px;
  padding-bottom: 20px;
}

figcaption {
  opacity: .6;
  text-align: center;
  margin-top: 5px;
  font-size: 14px;
  line-height: 26px;
}

.paragraph-big p{
  font-size: var(--p-text-big);
  line-height: 1.2em;
}

.paragraph-medium p{
  font-size: var(--p-text-medium);
  line-height: 1.2em;
}

.paragraph-small p{
  font-size: var(--p-text-small);
  line-height: 1.2em;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1280px) {
  html {
      font-size: clamp(18px, 0.8vw + 10px, 24px);
  }
  body {
        --page-padding: 2.4rem;
        --medium: 1.6rem; 
    }
    
}

@media (max-width: 768px) {
  
  :root {
    --heading-h4: calc(var(--heading-h3) / var(--1gr));
    --heading-h5: calc(var(--heading-h4) / var(--1gr));
  }
    /* Gallery */
    body.main-view .gallery__container-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    body {
        --page-padding: 2rem;
        --medium: 1.2rem; 
    }
    
}

/* ============================================================================
   OVERLAY
   ============================================================================ */

#page__overlay {
    position: fixed;
    
    bottom: var(--frame-thk);
    left: var(--frame-thk);
    right: var(--frame-thk);
    
    z-index: 5;
    display: block;
    pointer-events: none;

    box-shadow: 0 0 0 100px var(--color-ui-bg);
    border-radius: var(--frame-thk);
    transition: top 0.4s ease, opacity 0.3s;
}

.overlay--expanded {
    top: var(--frame-thk);
}

.overlay--shrunk {
    top: calc(2*var(--frame-thk));
}

.page__wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;

}

.page__content {
    width: 80%;
    max-width: var(--page-max-width);
    position: relative;
    z-index: 2;
    margin: auto;
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

#navigation {
       
        display: block;
        
    }

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--frame-thk);
    box-sizing: border-box;
    z-index: 30;
    transition: transform 0.4s ease, opacity 0.3s;
    transform: translateY(0rem);
}

#header.hidden {
    transform: translateY(-3rem);
    opacity: 0;
}

#header.visible {
    transform: translateY(0rem);
    opacity: 1;
}

.header__trigger {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 8rem;
    display: block;
    z-index: 29;
}

.nav__container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    z-index: 30;
    height: calc(2*var(--frame-thk));
}

.nav__links, .nav__logo {
    display: flex;
    flex-direction: row;
    align-items: center; 
    gap: var(--medium);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__logo {
    gap: 0;
    justify-content: flex-start;
}

.nav__links li, .nav__logo li {
    position: relative;
}

.nav__links a, .nav__logo a {
    display: flex;
    align-items: center;
    font-family: var(--font-ui);
    opacity: 0.2;
    text-decoration: none;
    color: var(--color-ui-text);
    transition: opacity 0.2s;
}

.nav__links a:hover, .nav__logo a:hover {
    opacity: 1;
}

.nav__links--left,
.nav__links--right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--medium);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__links--left {
    justify-content: flex-start;
}

.nav__links--right {
    justify-content: flex-end;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 30;

    background: none;
    color: var(--color-ui-text);
    border: none;
}

.menu-toggle .icon{
    
    
    width: var(--button-size);
    height: var(--button-size);
    
    cursor: pointer;
    
}

/* ============================================================================
   SIDEBAR
   ============================================================================ */

#sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-ui-bg);
    color: var(--color-ui-text);
    z-index: 50;
    transition: left 0.6s ease;
}

#sidebar.is-open {
    left: 0;
}

#sidebar.is-closed {
    left: -100%;
}

#sidebar nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50%;
    padding: 3rem;
    gap: 1.5rem;
}

.sidebar__links {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar__links li {
    margin: 10px 0;
}

.sidebar__links a {
    display: block;
    width: 100%;
    padding: 15px;
    background: none;
    border: none;
    font-size: 18px;
    text-align: left;
    text-decoration: none;
    
    cursor: pointer;
}

.sidebar__close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: block;
    width: auto;
    height: auto;
    color: var(--color-ui-text);
    line-height: 1em;
    background: none;
    border: none;
    font-size: 3rem;

    cursor: pointer;
}

#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    opacity: 0;
    visibility: hidden;
    z-index: 40;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

#sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    position: relative;
    z-index: 50;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    display: flex;
    padding-top: var(--medium);
    padding-bottom: var(--medium);
    background-color: var(--color-ui-bg);
    color: var(--color-ui-text);
}

.footer__links {
  justify-content: center;
  align-items: center;
  display: flex;
}

.footer__link {
  opacity: .6;
    color: var(--color-ui-text);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 20px;
  margin-right: 20px;
  font-size: 12px;
  line-height: 20px;
  text-decoration: none;
}

.footer__link:hover {
  opacity: .9;
}

.footer__link:active {
  opacity: .8;
}

.image-container.image img {
    width: 100%;
    height: auto;
}

.image-container.vimeo iframe {
    width: 100%;
    height: 360px;
    border-radius: 10px;
}

.image-container.gif img {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    margin-bottom: 2vw;
}

.image-container.rive canvas {
    width: 100%;
    background-color: transparent;
}

/*  ===========================================================================
    PROJECT NAV BUTTONS 
    ============================================================================ */

.project-navigation {
        display: flex;
        justify-content: center;
        margin: var(--medium) 0;
        gap: var(--xsmall);

      }

.nav-button {
        width: var(--xlarge);
        height: var(--xlarge);
        
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        border-radius: 50%;
        border: 1px solid #e41515;
        background-color: var(--color-ui-bg);
        color: var(--color-ui-text);
        transform-origin: center center;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

.nav-button .icon {
        width: 50%;
        height: 50%;
    }

.nav-button:hover {
    transform: scale(1.1);
    }

.nav-button.disabled {
    opacity: 0.3;
    pointer-events: none;
    }

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    
    
    #header {
        display: none;
    }

    .header__trigger {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    

    .nav__logo {
        width: 100%;
        justify-content: center;
    }
    .nav__links {
        width: 100%;
        flex-direction: column;
        justify-content: space-between;
    }

    .nav__links--left,
    .nav__links--right {
        flex-direction: column;
    }

    .nav__links--left {
        margin-bottom: 1rem;
    }

    .nav__links--right {
        margin-top: 1rem;
    }

    .nav__links a {
        font-size: 4rem;
    }

    

    .footer__links {
        flex-direction: column;
    }

    .footer__link {
        margin-top: var(--xxsmall);
        margin-bottom: var(--xxsmall);
        
    }
}

/* ============================================================================
UTILITIES
============================================================================ */

.spacer-medium {
  height: var(--medium);
  width: 100%;
}

.spacer-small {
  height: var(--xsmall);
  width: 100%;
}

.spacer--large {
  height: var(--large);
  width: 100%;
}

.content-frame {
  left: var(--frame-thk);
  top: var(--frame-thk);
  right: var(--frame-thk);
  bottom: var(--frame-thk);
  border-radius: var(--frame-thk);
  box-shadow: 0 0 5px var(--xxxlarge) var(--color-ui-bg);
  pointer-events: none;
  position: absolute;
}

.grid--two-column {
  grid-column-gap: 16px;
  grid-row-gap: 16px;
  grid-template-rows: auto;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  display: grid;
}

.text-align--left {
    text-align: left;
    }

/* ============================================================================
   SCROLL-TO-TOP BUTTON
   ============================================================================ */

.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 50%;
    background: var(--color-ui-bg);
    font-size: 1.5rem;
    color: var(--color-ui-text);
    cursor: pointer;
    opacity: 0.8;
    z-index: 60;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-top-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.scroll-top-btn.hidden {
    display: none;
}

/* ============================================================================
   GALLERY INSERTIONS
   ============================================================================ */

.gallery__inserted {
    width: 100%;
    height: auto;
}

.gallery__inserted.gif img {
    width: 100%;
    height: auto;
}

.gallery__inserted.mp4 video {
    width: 100%;
}

.gallery__inserted.rive {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.rive-wrapper {
    width: 100%;
    aspect-ratio: 3 / 2;
    position: relative;
    background-color: var(--color-bg);
}

.rive-wrapper canvas {
    width: 100%;
    height: 100%;
}

.image-container.image img {
    width: 100%;
    height: auto;
}

.image-container.vimeo iframe {
    width: 100%;
    height: 360px;
    border-radius: 10px;
}

.image-container.gif img {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    margin-bottom: 2vw;
}

.image-container.rive canvas {
    width: 100%;
    background-color: transparent;
}

/* ============================================================================
   SECTION
   ============================================================================ */

section:not(#header, #footer, #hero, #nav-buttons) {
    width: 100%;
    min-height: 70vh;
    padding: var(--frame-thk) var(--frame-thk);
    
      margin-top: var(--xlarge);
  justify-content: center;
  align-items: center;
    }

.section {


  width: 100%;
  min-height: 50vh;
  display: flex;
  position: relative;
}

.section.light {
  background-color: var(--white);
  color: var(--color-bg);
}

/* .section__content {
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: flex-start;
    width: 100%;
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
    gap: 1rem;
    overflow-x: hidden;
} */

.section__content {
  justify-content: center;
  align-items: stretch;
  width: 100%;
  height: 100%;
}

.section__content.flex-column {
  grid-column-gap: var(--xxsmall);
  grid-row-gap: var(--xxsmall);
  flex-flow: column;
  justify-content: center;
  align-items: center;
  display: flex;
}

.section__content.two-column {
  grid-column-gap: 16px;
  grid-row-gap: 16px;
  grid-template-rows: auto;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  display: grid;
}

.logo-link {
  z-index: 1;
  color: var(--color-text);
}

.logo-link:hover {
  opacity: .8;
}

.logo-link:active {
  opacity: .7;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

#hero {

    text-align: center;
}

.section.landing {
  flex-direction: column;
  justify-content: center;
  background-image: url(/assets/placeholder.jpg);
  background-position: 0 0;
  background-size: auto;
  height: 90vh;
  position: relative;
}

.landing__hero__options {
  flex-flow: column;
  justify-content: flex-start;
  align-items: center;
  display: flex;
}

.landing__hero__options.option-chosen {
  flex-flow: row;
  justify-content: space-between;
  align-items: center;
}

.landing__hero__option-btn {
  white-space: nowrap;
  transition: transform 0.3s ease;
  cursor: pointer;
  
}

.landing__hero__option-btn:hover {
  transform: scale(1.05);
}

.landing__hero__option-btn.is-active {
  perspective-origin: 0 100%;
  transform-origin: 0 100%;
  order: -9999;
  justify-content: flex-start;
  align-items: center;
  transform: scale(1.1);
}

.landing__hero__option-btn.is-inactive {
  perspective-origin: 100% 100%;
  transform-origin: 100% 100%;
  white-space: nowrap;
  order: 9999;
  transform: scale(.7);
}

.hero__container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#hero__bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    z-index: 1;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-ui-bg);

    box-sizing: border-box;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: var(--page-max-width);
    height: 90vh;
    padding: 0 6rem;
    z-index: 2;
}

.hero__content--secondary {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: var(--page-max-width);
    height: 90vh;
    z-index: 2;
}

.logo img {
    max-width: 150px;
    height: 100px;
}

/* ============================================================================
   SERVICES SECTION
   ============================================================================ */

.services__title {
    text-align: center;
}

.services__wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
    padding: var(--large) 0;
}

.services__list {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: var(--large) 0;
}

.service {
    display: flex;
    
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    transition: height 0.4s ease, background-color 0.4s ease;
}

.service__content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}

.service__title {
    margin: 0;

    color: var(--color-text);
    text-align: center;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.service__title__wrapper {
    display: inline-block;
    transform: scale(1);
    opacity: 0.2;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: 0.1s, 0.1s;
    transform-origin: center center;
    will-change: transform;
}

.service__title__wrapper:hover {
    opacity: 0.6;;
}

.service__description {
    opacity: 0;
    padding: var(--small) 0;
    color: var(--color-text);
    transform: translateY(-1rem);
    will-change: opacity, transform;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0.1s, 0.1s;
}

.service.active .service__title {
    color: var(--color-text);
}

.service.active .service__title__wrapper {
    transform: scale(1.05);
    opacity: 1;
}

.service.active .service__description {
    opacity: 1;
    color: var(--color-text);
    transform: translateY(0);
}

/* ============================================================================
   GALLERY
   ============================================================================ */

#gallery {
    display: flex;
    flex-direction: column;
    height: 80vh;
    justify-items: center;
    align-items: flex-start;
}

.gallery__container-grid {
    display: grid;
    width: 100%;
    gap: 0px;
}

body.main-view .gallery__container-grid {
    grid-template-columns: repeat(4, 1fr);
    
}

body.category-view .gallery__container-grid {
    grid-template-columns: repeat(2, 1fr);
    
}

/* Project cards */

.project-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 1rem;
    
    z-index: 3;
    transition: transform 0.4s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    
}

.project-card > a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  
}

.project-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
    border-radius: 1rem;
    border-style: solid;
    border-color: var(--color-ui-bg);
    border-width: 0.6rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease;
  will-change: transform;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;

    background: var(--color-ui-bg);

    opacity: 0;
    z-index: 3;
    backdrop-filter: blur(5px);
    transition: opacity 0.4s ease;
    
}

.project-card__overlay:hover {
    opacity: 0.8;
    
}

/* ============================================================================
   PROJECT PAGE GALLERY
   ============================================================================ */

.project-page__gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;

    gap: 1rem;
    box-sizing: border-box;
}

.gallery__image-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;

    gap: 2vw;
    flex-wrap: nowrap;
    box-sizing: border-box;

}

.gallery__image {
    flex: 1 1 0;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 100vh;
    min-height: 200px;
}

.gallery__image img {
    max-width: 100%;
    max-height: 90vh;
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.block-wrapper {

    
    margin: var(--xxsmall) auto;
    overflow: hidden;


    overflow-x: hidden;
}

.block {
    width: 100%;
    height: auto;
    padding-top: var(--xxxsmall);
    padding-bottom: var(--xxxsmall);
    margin-left: auto;
    margin-right: auto;
}

.block:not(.text) {
    max-width: 800px;
    margin: auto;
}

.block img{
    width: 100%;
    
    height: auto;
    display: block;
}

.block video{
    width: 100%;
    height: auto;
    display: block;
}

.block.small {
    width: 40%;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);

}

.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

}

.five-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);

}

.cropped img{
  object-fit: cover;
  aspect-ratio: 3/4;
}

/* ============================================================================
   ALL PROJECTS SECTION
   ============================================================================ */

.category__container {
    width: 100%;
    margin-bottom: 30px;
    text-align: left;
}

.category__title {
    text-align: start;
    
}

.category__thumbnails-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 5vh;
}

.main-view .category__thumbnails-grid {
    grid-template-columns: repeat(4, 1fr);
}

.category-view .category__thumbnails-grid {
    grid-template-columns: repeat(2, 1fr);
}

.project-wrapper {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;

    border-radius: 8px;
    text-decoration: none;
}

.project__thumbnail {
    width: 100%;
    height: 100%;
    min-width: 100px;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

.project-wrapper:hover .project__thumbnail {
    transform: scale(1.05);
}

.project-wrapper .project__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    color: var(--color-ui-text);
    background: var(--color-ui-bg);
    opacity: 0;
    border-radius: 8px;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.project-wrapper:hover .project__overlay {
    
    opacity: 1;
}

.see-more {
    display: block;
    width: fit-content;
    margin-left: auto;
    padding: 8px 12px;
    background: var(--color-ui-bg);
    color: var(--color-ui-text);
    border-radius: 5px;
    text-align: right;
    text-decoration: none;
    transition: background 0.3s ease;
}

.see-more:hover {
    background: var(--color-ui-bg);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1280px) {
    html {
        font-size: clamp(12px, 1vw + 10px, 24px);
    }
}

@media (max-width: 768px) {
    /* Gallery */
    body.main-view .gallery__container-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    

    /* About Section */
    .about-container {
        flex-direction: column;
        align-items: center;
    }

    .about-text,
    .about-image {
        padding-right: 0;
    }

    /* Project Gallery */
    .project-page__gallery {
        grid-template-columns: repeat(3, 1fr);
    }


    /* Category Grid */
    .main-view .category__thumbnails-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    /* Gallery */
    .gallery__container-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .project-card {
        max-width: none;
        width: 100%;
    }

    /* Project Gallery */
    .project-page__gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Category Grid */
    .main-view .projects__grid,
    .category-view .category__thumbnails-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.device {
    position: relative;
    width: 100%;
    display: flex;
    }

.device-frame {
    width: 100%;
    display: block;
    }

.device-screen {
    position: absolute;
    top: 18%;
    left: 21.5%;
    width: 58%;
    height: 56.2%;
    border-radius: 2%;
    overflow: hidden; 
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    }

.screen-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    }

.screen-content img{
    
    width: 100%;
    }
