/* 1. VARIABLES & BASE */
:root {
  --white-color: #f5f5f5;
  --paper-color: #f7f6f2; 
  --ink-black: #000000;
  --accent-gray: #000000;
  --sidebar-width: 230px; 
}

html {
  scroll-behavior: smooth;
}

body {
  /* background-color: var(--paper-color); */
  color: var(--ink-black);
  margin: 0;
  padding: 0;
  font-family: 'Arial'; 
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

body.paper {
    background-color: #00ff57b0; 
}

body.white {
    background-color: #f5f5f5;
}

/* //////////////////////////////////// MEDIA THEATER MODE ///////////////////////////////////////////////////// */
/* 1. Base transition for smooth background & text changes */
body {
    background-color: #f7f7f7; /* Your light paper background */
    color: #111111;            /* Your dark ink text */
    transition: background-color 0.8s ease, color 0.8s ease;
}

/* 2. Dark/Theater Mode State */
body[data-mode="dark"] {
    background-color: #0d0d0d !important;
    color: #ffffff !important;
}

/* 3. Make all text, headers, and links switch to white in Dark Mode */
body[data-mode="dark"] h1,
body[data-mode="dark"] h2,
body[data-mode="dark"] p,
body[data-mode="dark"] a,
body[data-mode="dark"] span,
body[data-mode="dark"] .project-title,
body[data-mode="dark"] .developer-credit {
    color: #ffffff !important;
    transition: color 0.8s ease;
}

/* Dark Mode overrides for the Mobile Fixed Navigation */
body[data-mode="dark"] #nav-placeholder {
    background-color: #0d0d0d !important;
}

body[data-mode="dark"] .side-nav {
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

/* Ensure mobile menu button & icon switch to white */
body[data-mode="dark"] .menu-toggle {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

body[data-mode="dark"] .material-symbols-outlined {
    color: #ffffff !important;
}

/* Optional: Subtle invert on the grain overlay so it stays visible */
body[data-mode="dark"] .grain {
    opacity: 0.15;
    filter: invert(1);
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* Default (Light Mode) Scrollbar Thumb */
::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    transition: background-color 0.8s ease;
}

/* Dark Mode Scrollbar Thumb */
body[data-mode="dark"]::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.7) !important;
}

/* Firefox scrollbar support */
* {
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    transition: scrollbar-color 0.8s ease;
}

body[data-mode="dark"] * {
    scrollbar-color: rgba(255, 255, 255, 0.7) transparent;
}

/* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */

h1 { margin: 0; font-weight: 500; }

img, video {
  width: 100%;
  height: auto;
  display: block;
}

figcaption {
  font-size: 0.75rem;
  color: var(--accent-gray);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.developer-credit {
    position: fixed;
    bottom: 15px;
    left: 15px;
    z-index: 1000;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--ink-black);
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.logo{
    display: flex;
    flex-direction: row;
    margin: 3px;
}

.flower{
    width: 40px;
    height: auto;
}

/* 2. LAYOUT STRUCTURE */
.site-layout {
  display: block;
  height: 100vh;
  position: relative;
  overflow: auto;
}

.archive-container {
  margin-left: var(--sidebar-width); 
  padding: 40px 40px;
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  height: 100vh;
  box-sizing: border-box;
}

.centered{
  display: flex;
  align-items: center;
}

/* 3. GRAIN */
.grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 500; 
}

.grain::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('https://grainy-gradients.vercel.app/noise.svg');
  opacity: 0.2;
}

/* 4. FIXED SIDEBAR NAVIGATION */
#nav-placeholder {
  position: fixed !important;
  width: var(--sidebar-width);
  height: 100vh; 
  z-index: 10000;
}

.side-nav {
  height: 100vh; 
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 20px;
  border-right: 1px solid rgba(0,0,0,0.03);
  box-sizing: border-box;
  overflow: hidden; 
  pointer-events: auto;
}

.logo a {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  color: var(--ink-black);
  display: block;
  margin-bottom: 60px;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li {
  margin-bottom: 15px;
}

.nav-spacer {
  height: 60px; 
}

.nav-links a {
  display: block;
  text-decoration: none;
  color: var(--accent-gray);
  font-size: 0.85rem;
  /* text-transform: uppercase; */
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.nav-links a:hover, 
.nav-links a.active {
  color: var(--ink-black);
  font-weight: 500;
}

.nav-bottom {
  font-size: 0.7rem;
  color: var(--accent-gray);
  line-height: 1.4;
}

.menu-toggle { display: none; }

/* 5. ANIMATIONS */
#nav-placeholder {
  opacity: 0;
  animation: fadeInNav 0.8s ease forwards;
}

@keyframes fadeInNav {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 6. THE DOCUMENTARY GRID */
.grid-wrapper {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto auto auto;
  align-items: start;
  flex-grow: 1;
}

.large-feature {
  grid-column: 2 / span 7;
  margin-bottom: 100px;
}

.note-scrap {
  grid-column: 7 / span 3;
  grid-row: 1;
  margin-top: 150px;
  z-index: 5;
  background: #fff;
  padding: 30px;
  box-shadow: 10px 10px 30px rgba(0,0,0,0.05);
  transform: rotate(-2deg);
}

.small-offset {
  grid-column: 5 / span 3;
  margin-top: -50px;
}

.handwritten {
  font-family: 'Nothing You Could Do', cursive;
  font-size: 1.2rem;
  color: #333;
}

/* 7. ABOUT & CONTACT SPECIFIC */
.contact-hero {
  grid-column: 2 / span 8;
  justify-self: center;
  /* padding-top: 10vh; */
}

.big-email {
  display: block;
  font-size: clamp(0.75rem, 5.5vw, 4rem);
  white-space: nowrap;      /* Guarantees the email never wraps */
  color: #1212ff;
  text-decoration: none;
  margin-top: 20px;
  width: fit-content;
  max-width: 100%;
}

.social-links {
  grid-column: 1 / span 3;
  margin-top: 100px;
}

/* 8. RESPONSIVE DESIGN */
@media (max-width: 870px), (max-height: 490px) {

    /* 1. Force all parent layouts to expand fully to fit all scrolling content */
    html, 
    body, 
    .site-layout, 
    .archive-container {
        height: auto !important;
        min-height: 100% !important;
        overflow-y: visible !important;
        overflow-x: hidden !important;
    }

    /* 2. Add bottom padding to archive-container so the last image clears the screen edge */
    .archive-container {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 120px;
        padding-bottom: 120px !important; /* Increased to give bottom space */
    }

    #nav-placeholder {
        position: fixed !important;
        top: 0;
        width: 100%;
        height: auto;
        z-index: 10001;
        /* Instead of forcing paper-color, let CSS handle dark mode transitions */
        background-color: inherit;
        transition: background-color 0.8s ease;
    }

    .side-nav {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        padding: 20px !important;
        flex-direction: column;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        background-color: transparent; /* Allow #nav-placeholder background to show through */
        transition: border-color 0.8s ease;
    }

    .nav-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        align-items: flex-start;
    }

    .nav-spacer, .nav-bottom {
        display: none;
    }

    .logo a { margin-bottom: 0; font-size: 1rem; }

    /* The Button */
    .menu-toggle {
        display: block;
        order: 2;
        background: none;
        border: 1px solid var(--ink-black);
        padding: 4px 10px;
        font-family: inherit;
        /* text-transform: uppercase; */
        font-size: 0.7rem;
        cursor: pointer;
        white-space: nowrap;
    }

    .material-symbols-outlined {
        font-variation-settings:
        'FILL' 0,
        'wght' 200,
        'GRAD' 0,
        'opsz' 24;
        font-size: 28px;
    }

    .nav-links {
        display: none; 
        width: 100%;
        flex-direction: column;
    }

    .side-nav.menu-open .nav-links {
        display: flex;
    }

    .side-nav.menu-open .logo {
        display: none !important;
    }

    .nav-spacer { display: none; }

    .archive-container {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 120px;
        padding-bottom: 20px;
    }

    .developer-credit {
        position: relative;
        left: 0;
        bottom: 0;
    }

    .horizontal-filmstrip {
        display: flex;
        flex-direction: column;
        align-items: flex-start;  /* Keeps items anchored from the left/top */
        justify-content: flex-start;
        height: auto;
        overflow-y: visible;
        overflow-x: hidden;
        padding-top: 20px;
        gap: 30px;                /* Modern vertical spacing between items */
    }

    /* 2. Fix the items */
    .horizontal-filmstrip .filmstrip-item {
        width: 100%;
        max-width: 90%;           /* Replaces width: 90% safely */
        height: auto;
        margin: 0 auto;           /* Safe horizontal centering without top clipping */
    }

    .horizontal-filmstrip .filmstrip-item img,
    .horizontal-filmstrip .filmstrip-item video {
        width: 100%;
        height: auto;
        display: block;
    }
}

@media (max-width: 600px) {

  .info-section .grid-wrapper {
        /* display: flex;
        flex-direction: column; */
        grid-template-columns: repeat(6, 1fr);
        gap: 40px;
    }

    .info-section .bio-image {
        order: 1; 
        grid-column: 1 / -1;
        width: 100%;
        height: auto;
    }

    .info-section .bio-text {
        order: 2;
        grid-column: 1 / -1;
        width: 100%;
    }

    .info-section figcaption {
        text-align: left;
        margin-bottom: 20px;
    }

    .developer-credit {
        padding-bottom: 20px;
    }
}

/* 9. ABOUT PAGE SPECIFIC */
.info-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bio-text {
    grid-column: 7 / span 12;
}

.bio-text .lead {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 40px;
    font-weight: 500;
    color: var(--ink-black);
    margin: 0;
}

.exhibition-list {
    margin-top: 60px;
}

.exhibition-list h3 {
    /* text-transform: uppercase; */
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    color: var(--accent-gray);
}

.exhibition-list ul {
    list-style: none;
    padding: 0;
}

.exhibition-list li {
    margin-bottom: 12px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 8px;
    width: fit-content;
}

.bio-image {
    grid-column: 1 / span 6;
    margin: 0;

    display: flex;
    height: 62vh;
    flex-direction: column;
}

.bio-image img {
    transition: filter 0.2s ease;
    padding: 5px;

    height: 80vh;
    width: auto;
    object-fit: contain;
}

.bio-image img:hover {
    filter: grayscale(0%);
}

.horizontal-filmstrip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0 60px 0;

    height: 100%; 
    width: 100%;

    align-items: center;
    
    scroll-snap-type: x proximity; 
    -webkit-overflow-scrolling: touch;

    margin-bottom: 4px;
}

/* 10. THE ITEMS */
.filmstrip-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    margin-right: 0px;
}

.filmstrip-item img {
    height: 60vh;
    width: auto;
    display: block;
}

.video-item {
    width: 80%;
}

/* 11. THE TEXT BLOCK AT THE END */
.text-end-block {
    width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 100px;
    margin-left: 20px;
    text-align: justify;
    text-justify: inter-word;
    padding: 0;
}

.text-end-block h2 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.horizontal-filmstrip::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.horizontal-filmstrip::-webkit-scrollbar {
    height: 12px;
}

.horizontal-filmstrip::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.horizontal-filmstrip::-webkit-scrollbar-thumb {
    background: var(--ink-black);
    border-radius: 10px;
}

/* 12. The cover grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 40px 30px;
    padding: 80px 40px;
}


.grid-item {
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.cover-wrapper {
    position: relative;
    aspect-ratio: 3 / 2;
    background-color: #eee;
}

.cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cover-wrapper video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-item:hover img {
    transform: scale(1.01);
}

.project-title {
    display: block;
    margin-top: 15px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

