* {
    box-sizing: border-box;
}

:root {
    /* Brutalist font stack - emphasizing monospace and system fonts */
    --font-stack-brutal: "Unbounded", sans-serif;
    --font-stack-body: "Space Grotesk", system-ui, sans-serif;  
    --font-stack-serif: 'Noto Serif Toto', sans-serif;

    /* Type Scale - 1.25 ratio */
    --text-micro:   0.41em;
    --text-tiny:    0.512em;
    --text-small:   0.64em;
    --text-reduced: 0.8em;
    --text-base:    1em;
    --text-large:   1.25em;
    --text-huge:    1.563em;
    --text-giant:   1.953em;
    --text-mega:    2.441em;
    --text-ultra:   3.052em;    
    --text-monster: min(5em, calc(100vw / 10));

    /* Black shades - from lightest to darkest */
    --black-100: rgb(100, 100, 100);  /* subtle */
    --black-300: rgb(50, 50, 50);     /* medium */
    --black-500: rgb(25, 25, 25);     /* default */
    --black-700: rgb(10, 10, 10);     /* your base */
    --black-900: rgb(5, 5, 5);        /* intense */

    --color-red: #FF1C00;
    --color-yellow: #FFD700;
    --color-pink: #FF0098;
    --color-gray-light: #D8D8D8;
    --color-blue: #50E3C2;
    --color-offblack: #191919;
    --color-bluelink: #020e78;
    --color-offwhite: #f6f6f6;

    
    --space-micro:   0.32em;
    --space-tiny:    0.4em;
    --space-small:   0.5em;
    --space-reduced: 0.625em;
    --space-base:    1em;
    --space-large:   1.25em;
    --space-huge:    1.563em;
    --space-giant:   1.953em;
    --space-mega:    2.441em;
    --space-ultra:   3.052em;
    --space-monster: calc(var(--space-ultra) * 2);
}

body {
    padding: 1em;
    font-family:var(--font-stack-serif);
    background-color: var(--color-offwhite);
    color: var(--black-700);
    font-size: calc(0.5vw + 1em);
    line-height: 1.25;
}

img {
    max-width: 100%;
}

h1, h2, h3, h4 {
    text-transform: uppercase;
    font-family:var(--font-stack-brutal);
    letter-spacing: -0.05em;
}

h5 {
    font-family:var(--font-stack-serif);
    font-size: var(--text-small);
    font-weight: normal;
    color: var(--black-100);
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

h2, h3, h4 {
    margin-top: var(--space-giant);
}

a {
    color: var(--color-red);
    text-decoration: none;
}

p {
    color: var(--black-100);
    font-weight: normal;
    font-size: var(--text-base);
}

h1 {
    font-size: var(--text-huge);
    margin-top: 0;
    font-weight: normal;
    text-align: center;
    text-justify: inter-word;    /* Better word spacing */
    hyphens: none;              /* Enable automatic hyphenation */
    overflow-wrap: break-word;  /* Prevent overflow */
    word-break: normal;
    margin-bottom: var(--space-base);
}

h1.subtitle strong {
    font-size: var(--text-huge);
}

h1 strong {
    font-weight: bold;
    font-size: min(16vw, var(--text-ultra)); /* Adjust the divisor to fit your needs */
    text-align: left;
    display: flex;
    width: 50%;
    letter-spacing: -0.1em;
    line-height: 0.9;
    margin: var(--space-reduced) 0;
}


h1 span {
    font-weight: 600;
}

h1 em {
    font-size: var(--text-small)
}

h1 div {
    font-family: var(--font-stack-brutal);
    font-size: var(--text-large);    
    font-weight: 700;
    text-align: left;
    text-indent: 2em;
}

h2 {
    font-size: var(--text-base);
    letter-spacing: 0;
    font-weight: normal;
    color: var(--black-100);
}


.experiments {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    margin-top: var(--space-giant);
    justify-content: space-around;
    gap: 0;
}

.experiment {
}

.experiment img {
    display: block;    /* Remove inline gap */
    margin: 0;         /* Remove default margin */
    padding: 0;
    width: 100%;
    height: auto;
}



.experiment--entry {
    position: relative;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    color: white;
    margin-top: var(--space-ultra);    
    height: 100%;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;    
}

/* Add overlay with blend mode */
.experiment--entry::before {
    content: '';
    position: absolute;
    inset: 0;
    mix-blend-mode: multiply;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1;
}

/* Add backdrop filters */
.experiment--entry::after {
    content: '';
    position: absolute;
    inset: 0;
    transition: backdrop-filter 0.4s ease;
    z-index: 0;
}


/* Keep content above effects */
.experiment--entry > * {
    position: relative;
    z-index: 2;
}

.link--live {
    display: inline-block;
    margin-top: var(--space-large);
    font-size: var(--text-small);
    border: 1px solid var(--color-red);
    padding: var(--space-small) var(--space-base);
    border-radius: 0.5em;
}

.experiment--entry h3 {
    mix-blend-mode: difference;
    text-align: center;
    font-size: var(--text-mega);
    font-family: var(--font-stack-serif);
    margin: 0;
}

.experiment--description{
    padding-top: var(--space-large);
}

.experiment img {
    filter: grayscale(100%);
    transition: all 0.25s ease-in-out;
}

.experiment img:hover {
    filter: grayscale(0%);
    mix-blend-mode: normal;
}

.experiment--content {
    padding: var(--space-monster) 0;
    border-top: 1px solid var(--color-gray-light);
    border-bottom: 1px solid var(--color-gray-light);
}

.experiment--details {
    padding: var(--space-monster) 0;
}

.experiment--details figure {
    padding: 0;
    margin: 0;
    margin-bottom: var(--space-small);
    width: 200px;
    display: grid;
}

.experiment--details h3 {
    margin-top: var(--space-tiny);
}

.experiment--details p:first-of-type {
    margin-top: 0;
}

.experiment--details__meta {

}

.tags h6 {
    font-size: var(--text-small);
    margin: 0;
    padding: 0;
}

.tags span {
    
    font-weight: normal;
    color: var(--black-200);
    display: inline-block;
}

.tags {
    margin-bottom: var(--space-small);
}

.grid.tags {
    @media screen and (min-width: 768px) {
        grid-template-columns: auto 1fr;
        gap: 1em;
    }
}

.tags.grid .col1 {
    @media screen and (min-width: 768px) {
        grid-column: auto;
    }
}

.tags.grid .col2 {
    @media screen and (min-width: 768px) {
        
    }
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    
}

.grid .col1 {
    grid-column: 1 / -1;  

    @media screen and (min-width: 768px) {
        grid-column: 1 / 4;
    }
}

.grid .col2 {
    grid-column: 1 / -1;
    
 
    @media screen and (min-width: 768px) {
        grid-column: 6 / -1;
    }
}

.actions--navigate {
    width: 100%;
    z-index: 9999;
}

.actions--navigate a {
    color: var(--color-gray-light);        
    text-decoration: none;
    font-weight: bold;
    font-family: var(--font-stack-brutal);
}

.actions--navigate nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-huge);
    text-transform: uppercase;
}


.actions--navigate .prev, .actions--navigate .next {
    display: flex;
    align-items: center;        /* Center items vertically within each group */
    
}

.actions--navigate nav img {
    max-width: 10vw;
    display: block;            /* Remove inline gap */
    object-fit: contain;   
    filter: grayscale(100%);
    margin: 0 var(--space-small);
}

.music-pairing {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1em;
    justify-content: space-around;
    
    padding-top: var(--space-ultra);
    border-bottom: 1px solid var(--color-gray-light);
    padding-bottom: var(--space-ultra);
    align-items: center;
    margin-bottom: var(--space-ultra);
}

.music-pairing h4 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: var(--text-reduced);
}

.credits {
    position: fixed;
    bottom: 1em;
    right: 1em;
}

.credits__avatar {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    margin-right: 0.5em;
}

.credits__text {
    font-size: 0.7em;
    display: inline-block;
    vertical-align: middle;
    position: absolute;
    left: -12em;
    width: 12em;
    padding: 0.2em;
    background-color: rgba(255, 255, 255, 0.95);   
    margin: 0;
    opacity: 0;
}

.credits__avatar:hover {
    transform: scale(1.1);
    transition: transform 0.3s;
}

.credits a:hover ~ .credits__text {
    opacity: 1;
    transition: opacity 0.3s;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12em;
    height: 12em;
    pointer-events: none; /* Allow clicking through the cursor */
    z-index: 9999;
    transform: translate(-50%, -50%); /* Center the cursor on pointer */
    mix-blend-mode: difference; /* Optional effect */
  }
  
  .custom-cursor img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

@media not (prefers-reduced-motion: reduce) {

    .title {
        view-transition-name: title;
    }

    .transition-experiment-img {
        view-transition-name: transition-experiment-img;
        
    }

    @view-transition {
        navigation: auto;
    }
}