



/* ================================
ROOT VARIABLES
================================ */
:root {
  --bg: #050505;
  --fg: #e6e6e6;
  --accent: #00d9ff;
}

/* ================================
BASE SITE STYLING
================================ */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ================================
MAIN CONTENT Z-INDEX
================================ */
main,
h1,
h2,
p,
nav a,
.file,
.archive-image {
  position: relative;
  z-index: 1; /* above reel background */
}

/* ================================
MAIN LAYOUT
================================ */
main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 5rem 2rem 2rem 3rem; /* top padding to avoid overlapping arrows */
}

h1 {
  font-weight: 500;
  font-size: 3rem;
  margin-bottom: 1rem;
}

p {
  max-width: 40ch;
  opacity: 0.8;
}

/* ================================
NAVIGATION
================================ */
nav {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
}

nav a {
  position: relative;
  color: var(--fg);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
}

nav a:hover {
  opacity: 1;
  color: #00b7ff;
}

nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: #15ff00;
  mix-blend-mode: difference;
  transition: opacity 0.15s ease;
}

nav a:hover::after {
  opacity: 0.3;
}

/* ================================
ARCHIVE
================================ */
.archive {
  list-style: none;
  margin-top: 2rem;
  opacity: 0.8;
}

.archive li {
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.archive li:hover {
  color: var(--accent);
}

.entry {
  margin-bottom: 1rem;
}

.file {
  cursor: pointer;
}

.content {
  display: none;
  margin-left: 1rem;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.content.show {
  display: block;
  opacity: 1;
}

.archive-image {
  max-width: 60%;
  margin-top: 0.5rem;
  display: block;
  filter: contrast(1.2) hue-rotate(10deg);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.archive-image:hover {
  transform: translate(2px, -2px);
  filter: contrast(1.5) hue-rotate(-10deg) blur(1px);
}



/* ================================
RESEARCH PAGE ACCORDIONS
================================ */
.research-entry {
  margin-bottom: 1.5rem;
}

.section-title {
  cursor: pointer;
  font-weight: 500;
  opacity: 0.8;
  transition: color 0.2s ease, transform 0.15s ease;
}

.section-title:hover {
  color: var(--accent);
  transform: translateX(1px);
}

.section-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-left: 1rem;
  transition: max-height 0.35s ease, opacity 0.35s ease;
}

.section-content.show {
  max-height: 500px;
  opacity: 0.85;
}

/* ================================
SCROLL BUTTON
================================ */
#scrollTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.5rem 1rem;
  background: #ff00cc;
  color: #050505;
  border: none;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  border-radius: 4px;
  opacity: 0.8;
  z-index: 100;
}

#scrollTopBtn:hover {
  opacity: 1;
}

/* ================================
FLOATING ERROR WINDOWS
================================ */
#error-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.error-window {
  position: absolute;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  opacity: 0.9;
}

.error-window:active {
  cursor: grabbing;
  opacity: 1;
  z-index: 10;
}

.error-window img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ================================
SYSTEM STATUS
================================ */
.system-status {
  position: fixed;
  bottom: 10px;
  right: 15px;
  font-size: 11px;
  opacity: 0.35;
  letter-spacing: 0.05em;
  pointer-events: none;
}

/* ================================
GLITCH TEXT EFFECT
================================ */
.glitch {
  position: relative;
  font-weight: 500;
  font-size: 2.5rem;
  letter-spacing: 0.05em;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
}

.glitch::before {
  color: #ff00ff;
  z-index: -1;
  animation: glitchTop 2s infinite linear alternate-reverse;
}

.glitch::after {
  color: #00ffff;
  z-index: -2;
  animation: glitchBottom 1.5s infinite linear alternate-reverse;
}

@keyframes glitchTop {
  0% { clip-path: inset(0 0 80% 0); transform: translate(-2px,-2px); }
  20% { clip-path: inset(10% 0 65% 0); transform: translate(2px,0); }
  40% { clip-path: inset(40% 0 40% 0); transform: translate(-1px,1px); }
  60% { clip-path: inset(60% 0 20% 0); transform: translate(1px,-1px); }
  80% { clip-path: inset(85% 0 5% 0); transform: translate(-2px,2px); }
  100% { clip-path: inset(0 0 80% 0); }
}

@keyframes glitchBottom {
  0% { clip-path: inset(80% 0 0 0); transform: translate(2px,2px); }
  20% { clip-path: inset(65% 0 10% 0); transform: translate(-1px,0); }
  40% { clip-path: inset(40% 0 40% 0); transform: translate(1px,-1px); }
  60% { clip-path: inset(20% 0 60% 0); transform: translate(-2px,1px); }
  80% { clip-path: inset(5% 0 85% 0); transform: translate(2px,-2px); }
  100% { clip-path: inset(80% 0 0 0); }
}

/* ================================
PAGE BACKGROUND GLITCH SYSTEM
================================ */
body.home::before,
body.archive::before,
body.research::before,
body.about-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ================================
HOME — INTENSE RGB GLITCH SYSTEM
================================ */

body.home::before {
  content: "";

  position: fixed;
  inset: -5%;

  pointer-events: none;
  z-index: 0;

  opacity: 1;

  background:

    /* RGB scanlines */
    repeating-linear-gradient(
      0deg,
      rgba(255, 0, 255, 0.22) 0px,
      rgba(0, 255, 255, 0.808) 2px,
      rgba(0, 0, 0, 0) 4px,
      transparent 7px
    ),

    /* vertical corruption */
    repeating-linear-gradient(
      90deg,
      rgba(255, 0, 120, 0.12) 0px,
      rgba(0, 255, 200, 0.08) 2px,
      transparent 4px,
      transparent 12px
    ),

    /* color haze */
    radial-gradient(
      circle at 20% 30%,
      rgba(255, 0, 255, 0.18),
      transparent 35%
    ),

    radial-gradient(
      circle at 80% 70%,
      rgba(64, 226, 226, 0.849),
      transparent 40%
    ),

    radial-gradient(
      circle at center,
      rgba(0, 100, 255, 0.08),
      transparent 60%
    );

  mix-blend-mode: screen;

  animation:
    glitchHomeShift 0.18s infinite steps(2, end),
    glitchPulse 4s infinite ease-in-out,
    glitchFlicker 0.12s infinite linear;
}

/* extra RGB split layer */

body.home::after {
  content: "";

  position: fixed;
  inset: 0;

  pointer-events: none;
  z-index: 0;

  background:
    repeating-linear-gradient(
      180deg,
      rgba(245, 87, 237, 0.966) 0px,
      transparent 2px,
      transparent 4px
    );

  mix-blend-mode: overlay;

  opacity: 0.5;

  animation:
    rgbSplit 0.25s infinite linear,
    scanlinesMove 8s infinite linear;
}

/* ================================
ANIMATIONS
================================ */

@keyframes glitchHomeShift {

  0% {
    transform: translate(0,0) skew(0deg);
  }

  20% {
    transform: translate(8px,-5px) skew(2deg);
  }

  40% {
    transform: translate(-6px,6px) skew(-2deg);
  }

  60% {
    transform: translate(5px,-7px) skew(3deg);
  }

  80% {
    transform: translate(-8px,4px) skew(-1deg);
  }

  100% {
    transform: translate(0,0) skew(0deg);
  }
}

@keyframes glitchPulse {

  0%, 100% {
    opacity: 0.85;
    filter: saturate(1) contrast(1);
  }

  50% {
    opacity: 1;
    filter: saturate(1.6) contrast(1.2);
  }
}

@keyframes glitchFlicker {

  0%   { opacity: 0.92; }
  10%  { opacity: 1; }
  20%  { opacity: 0.88; }
  30%  { opacity: 1; }
  40%  { opacity: 0.94; }
  50%  { opacity: 1; }
  60%  { opacity: 0.9; }
  70%  { opacity: 1; }
  80%  { opacity: 0.95; }
  90%  { opacity: 1; }
  100% { opacity: 0.92; }
}

@keyframes rgbSplit {

  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(2px);
  }

  50% {
    transform: translateX(-2px);
  }

  75% {
    transform: translateX(1px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes scanlinesMove {

  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 0 120px;
  }
}

body.archive::before {
  background: repeating-linear-gradient(90deg, rgba(140,0,255,0.13), rgba(132,0,255,0.05) 3px, transparent 3px, transparent 6px);
  animation: glitchArchive 2s infinite linear;
}

body.research::before {
  background: repeating-linear-gradient(45deg, rgba(255,0,204,0.05), rgba(255,0,204,0.05) 2px, transparent 2px, transparent 5px);
  animation: glitchResearch 2s infinite alternate;
}

body.about-page::before {
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 2px, transparent 2px, transparent 5px);
  animation: glitchAbout 1.1s infinite linear;
}

@keyframes glitchHome { 0%{transform:translateY(0);} 25%{transform:translateY(4px);} 50%{transform:translateY(-3px);} 75%{transform:translateY(2px);} 100%{transform:translateY(0);} }
@keyframes glitchArchive { 0%{transform:translateX(0);} 50%{transform:translateX(4px);} 100%{transform:translateX(0);} }
@keyframes glitchResearch { 0%{transform:translate(0,0);} 50%{transform:translate(4px,-3px);} 100%{transform:translate(-3px,2px);} }
@keyframes glitchAbout { 0%{transform:translateY(0);} 50%{transform:translateY(2px);} 100%{transform:translateY(0);} }

/* ================================
REEL BACKGROUND SUPPORT
================================ */
.reel-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;   /* behind all content */
  overflow: hidden;
}

.reel-container img,
.reel-container video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================================
PROJECT 4: REEL ARROWS FIXED & CLICKABLE
================================ */
.project04 .arrow {
  position: absolute;       /* inside container */
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  z-index: 10;             /* above reel content */
  pointer-events: auto;
  transition: transform 0.15s ease, background 0.15s ease;
}

.project04 .arrow.left { left: 20px; }
.project04 .arrow.right { right: 20px; }

.project04 .arrow:hover {
  background: rgba(0,0,0,0.8);
  transform: translateY(-50%) scale(1.1);
}
/* ================================
PROJECT VIDEO & REEL OVERLAY BEHAVIOR
================================ */
.project-video::before,
.project-video::after,
.project-video #glitchOverlay,
.reel-container {
  pointer-events: none; /* overlays don’t block arrow clicks */
}

/* ================================
TEXT HIGHLIGHT FOR READABILITY
================================ */
main h1,
main h2,
main p,
nav a,
.file,
.archive-image {
  background: rgba(0, 0, 0, 0.5); /* semi-transparent black */
  padding: 0.2em 0.4em;           /* some spacing around text */
  border-radius: 4px;             /* soft corners */
}

.reel-container img,
.reel-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* adjust: center, top, bottom, left, right */
}

/* ================================
ROOT VARIABLES
================================ */
:root {
  --bg: #050505;
  --fg: #e6e6e6;
  --accent: #00d9ff;
}

/* ================================
BASE SITE STYLING
================================ */
body.project01 {
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* ================================
VIDEO BACKGROUND
================================ */
#bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* DARK OVERLAY */
#video-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 1;
  pointer-events: none;
}

/* ================================
CONTENT STYLING
================================ */
main,
h1, h2, p, nav a {
  position: relative;
  z-index: 2; /* above video and overlay */
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 5rem 2rem 2rem 3rem;
}

h1 {
  font-weight: 500;
  font-size: 3rem;
  margin-bottom: 1rem;
}

p {
  max-width: 40ch;
  opacity: 0.8;
}

/* ================================
NAVIGATION
================================ */
nav {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
}

nav a {
  position: relative;
  color: var(--fg);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
}

nav a:hover {
  opacity: 1;
  color: #ff00dd;
}

/* ================================
SCROLL BUTTON
================================ */
#scrollTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.5rem 1rem;
  background: #ff00cc;
  color: #050505;
  border: none;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  border-radius: 4px;
  opacity: 0.8;
  z-index: 10;
}

#scrollTopBtn:hover {
  opacity: 1;
}

/* ================================
GLITCH TEXT EFFECT
================================ */
.glitch {
  position: relative;
  font-weight: 500;
  font-size: 2.5rem;
  letter-spacing: 0.05em;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
}

.glitch::before {
  color: #ff00ff;
  z-index: -1;
  animation: glitchTop 2s infinite linear alternate-reverse;
}

.glitch::after {
  color: #00ffff;
  z-index: -2;
  animation: glitchBottom 1.5s infinite linear alternate-reverse;
}

@keyframes glitchTop {
  0% { clip-path: inset(0 0 80% 0); transform: translate(-2px,-2px); }
  20% { clip-path: inset(10% 0 65% 0); transform: translate(2px,0); }
  40% { clip-path: inset(40% 0 40% 0); transform: translate(-1px,1px); }
  60% { clip-path: inset(60% 0 20% 0); transform: translate(1px,-1px); }
  80% { clip-path: inset(85% 0 5% 0); transform: translate(-2px,2px); }
  100% { clip-path: inset(0 0 80% 0); }
}

@keyframes glitchBottom {
  0% { clip-path: inset(80% 0 0 0); transform: translate(2px,2px); }
  20% { clip-path: inset(65% 0 10% 0); transform: translate(-1px,0); }
  40% { clip-path: inset(40% 0 40% 0); transform: translate(1px,-1px); }
  60% { clip-path: inset(20% 0 60% 0); transform: translate(-2px,1px); }
  80% { clip-path: inset(5% 0 85% 0); transform: translate(2px,-2px); }
  100% { clip-path: inset(80% 0 0 0); }
}

.project-gallery {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 3rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-container {
  width: 80%;
  overflow: hidden;
}

.gallery-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
}

.arrow.left { left: -50px; }
.arrow.right { right: -50px; }

.arrow:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-50%) scale(1.1);

}

.project01 .arrow,
.project04 .arrow,
.project05 .arrow {
  display: block; /* force visible */
}

img[alt]::after {
  content: none;
}

/* ================================
PROJECT 03 — VIDEO BACKGROUND + AUDIO
================================ */
body.project03 {
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* VIDEO BACKGROUND */
body.project03 #bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;           /* behind overlay and content */
  pointer-events: none; /* ensures button is clickable */
}

/* DARK OVERLAY FOR READABILITY */
body.project03::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;           /* above video, below content */
  pointer-events: none;
}

/* CONTENT LAYER */
body.project03 main,
body.project03 nav,
body.project03 h1,
body.project03 h2,
body.project03 p {
  position: relative;
  z-index: 2;           /* above overlay and video */
}

/* AUDIO TOGGLE BUTTON NEXT TO TITLE */
body.project03 #play-sound {
  display: inline-block;
  margin-left: 12px;
  vertical-align: middle;
  font-size: 1rem;
  padding: 0.3em 0.6em;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  z-index: 3;           /* ensure on top of overlay */
}

body.project03 #play-sound:hover {
  background: rgba(255,255,255,0.2);
}

/* TEXT HIGHLIGHT FOR READABILITY */
body.project03 main h1,
body.project03 main h2,
body.project03 main p,
body.project03 nav a {
  background: rgba(0,0,0,0.5);
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

body.project01 .project-gallery .arrow:hover {
  color: #ff00cc;
}

#play-sound {
  display: inline-block;
  margin-left: 12px;
  vertical-align: middle;
  font-size: 1rem;
  padding: 0.3em 0.6em;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#play-sound:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* -------------------------------
PROJECT 06 — FULL-BACKGROUND IMAGE
------------------------------- */
body.project06 {
background: url("https://pub-e3bf6ce01e0948019faa273c5ebc10ba.r2.dev/images/Project06/project06-1.JPG") no-repeat center center fixed;
  background-size: cover;
  color: var(--fg);
}

/* subtle overlay for readability */
body.project06::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.05); /* very light black overlay */
  z-index: 0;
  pointer-events: none;
}

/* make main content above the overlay */
body.project06 main {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem 2rem 3rem;
}

/* glitch text styling remains */
body.project06 .glitch {
  position: relative;
  font-weight: 500;
  font-size: 2.5rem;
  letter-spacing: 0.05em;
}

body.project06 .glitch::before,
body.project06 .glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
}

body.project06 .glitch::before {
  color: #ff00ff;
  z-index: -1;
  animation: glitchTop 2s infinite linear alternate-reverse;
}

body.project06 .glitch::after {
  color: #00ffff;
  z-index: -2;
  animation: glitchBottom 1.5s infinite linear alternate-reverse;
}

@keyframes glitchTop {
  0% { clip-path: inset(0 0 80% 0); transform: translate(-2px,-2px); }
  20% { clip-path: inset(10% 0 65% 0); transform: translate(2px,0); }
  40% { clip-path: inset(40% 0 40% 0); transform: translate(-1px,1px); }
  60% { clip-path: inset(60% 0 20% 0); transform: translate(1px,-1px); }
  80% { clip-path: inset(85% 0 5% 0); transform: translate(-2px,2px); }
  100% { clip-path: inset(0 0 80% 0); }
}

@keyframes glitchBottom {
  0% { clip-path: inset(80% 0 0 0); transform: translate(2px,2px); }
  20% { clip-path: inset(65% 0 10% 0); transform: translate(-1px,0); }
  40% { clip-path: inset(40% 0 40% 0); transform: translate(1px,-1px); }
  60% { clip-path: inset(20% 0 60% 0); transform: translate(-2px,1px); }
  80% { clip-path: inset(5% 0 85% 0); transform: translate(2px,-2px); }
  100% { clip-path: inset(80% 0 0 0); }
}

/* optional text box highlight for readability */
body.project06 main h1,
body.project06 main h2,
body.project06 main p,
body.project06 nav a {
  background: rgba(0, 0, 0, 0.4); /* slightly darker for text contrast */
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

/* -------------------------------
PROJECT 06 — PHOTO + VIDEO GALLERY
------------------------------- */
.project06 .project-gallery {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 3rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project06 .gallery-container {
  width: 80%;
  overflow: hidden;
  position: relative;
}

.project06 .gallery-container img,
.project06 .gallery-container video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.project06 .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project06 .arrow.left { left: -50px; }
.project06 .arrow.right { right: -50px; }

.project06 .arrow:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-50%) scale(1.1);
}
/* ================================
PROJECT 07 SPECIFIC OVERRIDES - ADJUSTED
================================ */

/* TEXT HIGHLIGHT ONLY */
body.project07 main h1,
body.project07 main h2,
body.project07 main p,
body.project07 nav a {
  background: rgba(0, 0, 0, 0.5);
  padding: 0.3em 0.5em;
  border-radius: 4px;
  display: inline-block;
  max-width: 90%;
}

/* PROJECT CONTENT FLEX LAYOUT */
body.project07 .project-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* TEXT BOX */
body.project07 .text-box {
  max-width: 45%;
  min-width: 300px;
}

/* GALLERY POSITION LIKE PROJECT 02 BUT LOWER & BIGGER */
body.project07 .gallery {
  position: absolute;
  top: 40%;            /* lowered further down */
  right: 10%;           /* slightly more toward center */
  max-width: 800px;    /* bigger gallery width */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* gallery media */
body.project07 .gallery-container img,
body.project07 .gallery-container video {
  width: 100%;
  max-height: 700px;   /* taller media */
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

/* arrows always vertical center of media */
body.project07 .gallery .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
}

body.project07 .gallery .arrow.left { left: -50px; }
body.project07 .gallery .arrow.right { right: -50px; }

body.project07 .gallery .arrow:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-50%) scale(1.1);
}

/* responsive adjustments */
@media (max-width: 1200px) {
  body.project07 .gallery {
    right: 5%;
    max-width: 500px;
  }
}

@media (max-width: 900px) {
  body.project07 .project-content {
    flex-direction: column;
    gap: 2rem;
  }
  body.project07 .text-box {
    max-width: 100%;
  }
  body.project07 .gallery {
    position: relative;
    top: 0;
    right: 0;
    max-width: 100%;
    margin: 0 auto;
  }
  body.project07 .gallery .arrow.left { left: 5px; }
  body.project07 .gallery .arrow.right { right: 5px; }
}
/* ================================
RETURN TO ARCHIVE BUTTON FIX
================================ */
body.project07 nav a {
  white-space: nowrap;    /* prevents wrapping */
}

/* ================================
PROJECT 07 FIXED LAYOUT (NO OVERLAP)
================================ */

body.project07 .project-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* TEXT BOX */
body.project07 .text-box {
  flex: 1;
  min-width: 300px;
  max-width: 45%;
}

/* GALLERY (IMPORTANT FIX) */
body.project07 .gallery {
  flex: 1;
  min-width: 320px;
  max-width: 600px;

  position: relative; /* 🔥 REMOVE absolute */
  top: auto;
  right: auto;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* MEDIA */
body.project07 .gallery-container img,
body.project07 .gallery-container video {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  border-radius: 6px;
}

/* ARROWS */
body.project07 .gallery .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

body.project07 .gallery .arrow.left { left: 10px; }
body.project07 .gallery .arrow.right { right: 10px; }

/* ================================
RESPONSIVE STACKING FIX
================================ */
@media (max-width: 900px) {
  body.project07 .project-content {
    flex-direction: column;
  }

  body.project07 .text-box,
  body.project07 .gallery {
    max-width: 100%;
    width: 100%;
  }

  body.project07 .gallery {
    margin-top: 2rem;
  }
}

/* ================================
PROJECT 08 MINI REEL
================================ */

.project08-mini-reel{
    position:relative;
    width:700px;
    max-width:100%;
    margin-top:2rem;
}

.mini-reel-container{
    position:relative;
    width:100%;
    overflow:hidden;
    border-radius:6px;
}

.mini-reel-container img{
    display:block;
    width:100%;
    height:420px;
    object-fit:cover;
}

/* arrows */

.project08-mini-reel .mini-arrow{

    position:absolute;
    top:50%;
    transform:translateY(-50%);

    width:38px;
    height:38px;

    border:none;
    cursor:pointer;

    background:rgba(0,0,0,.55);
    color:white;

    display:flex;
    align-items:center;
    justify-content:center;

    z-index:100;

    transition:.2s;
}

.project08-mini-reel .mini-arrow.left{
    left:10px;
}

.project08-mini-reel .mini-arrow.right{
    right:10px;
}

.project08-mini-reel .mini-arrow:hover{
    background:rgba(0,0,0,.8);
    transform:translateY(-50%) scale(1.08);
}

/* ================================
PUTER GLITCH BACKGROUND IMAGE
================================ */

.puter-glitch-layer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
 width: min(100vw, 1600px);
  height: auto;
  aspect-ratio: 16 / 10;

  background-image: url("assets/images/ilovemyputer.jpg");
  background-size: cover;
  background-position: center;

  opacity: 0.10;
  pointer-events: none;
  z-index: 0;

  animation: puterPulse 6s ease-in-out infinite;
}

/* soft pulse (you said you liked this earlier) */
@keyframes puterPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    filter: contrast(1.1) brightness(0.8);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    filter: contrast(1.4) brightness(1);
  }
}

/* ================================
HORIZONTAL GLITCH SCAN LAYERS
================================ */

.puter-glitch-layer::before,
.puter-glitch-layer::after {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("assets/images/ilovemyputer.jpg");
  background-size: cover;
  background-position: center;

  opacity: 0.08;
  mix-blend-mode: screen;
}

/* fast horizontal slice shift */
.puter-glitch-layer::before {
  animation: scanShift1 2.5s infinite linear;
}

/* offset corrupted layer */
.puter-glitch-layer::after {
  animation: scanShift2 3.2s infinite linear;
  opacity: 0.06;
}

@keyframes scanShift1 {
  0%   { clip-path: inset(0 0 85% 0); transform: translateX(-2px); }
  20%  { clip-path: inset(20% 0 60% 0); transform: translateX(3px); }
  40%  { clip-path: inset(45% 0 35% 0); transform: translateX(-4px); }
  60%  { clip-path: inset(70% 0 10% 0); transform: translateX(2px); }
  80%  { clip-path: inset(10% 0 75% 0); transform: translateX(-3px); }
  100% { clip-path: inset(0 0 85% 0); transform: translateX(0); }
}

@keyframes scanShift2 {
  0%   { clip-path: inset(80% 0 0 0); transform: translateX(3px); }
  25%  { clip-path: inset(30% 0 40% 0); transform: translateX(-2px); }
  50%  { clip-path: inset(55% 0 25% 0); transform: translateX(4px); }
  75%  { clip-path: inset(15% 0 65% 0); transform: translateX(-3px); }
  100% { clip-path: inset(80% 0 0 0); transform: translateX(2px); }
}

/* base state */
.file:link {
  color: #d7ff48;
  opacity: 0.55;
}

/* visited state (slightly dimmer / aged feel) */
.file:visited {
  color: #ff39ff;
  opacity: 0.45;
}

/* hover state */
.file:hover {
  color: #3bd6f1;
  opacity: 0.9;
}

/* active (when clicking) */
.file:active {
  color: #66e8ff;
  transform: translateX(8px) scale(0.98);
  opacity: 1;
}

/* focus (keyboard navigation — important but often missing) */
.file:focus {
  outline: none;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(30, 255, 255, 0.952);
}
/* ================================
ROOT VARIABLES
================================ */
:root {
  --bg: #050505;
  --fg: #e6e6e6;
  --accent: #00d9ff;
}

/* ================================
BASE
================================ */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ensure content above glitch layers */
main, h1, h2, p, nav, a, .file {
  position: relative;
  z-index: 2;
}

/* ================================
GLOBAL GLITCH LAYERS
================================ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  mix-blend-mode: screen;
  will-change: transform;
}

/* ================================
HOME — CHAOTIC RGB SCAN
================================ */
body.home::before {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 0, 255, 0.35) 0px,
      rgba(0, 255, 255, 0.25) 2px,
      transparent 2px,
      transparent 6px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 0, 120, 0.2) 0px,
      rgba(0, 255, 200, 0.2) 2px,
      transparent 2px,
      transparent 10px
    );

  animation: glitchHome 0.22s infinite steps(2, end);
}

/* ================================
ARCHIVE — HORIZONTAL TEAR
================================ */
body.archive::before {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(160, 0, 255, 0.25),
      rgba(0, 255, 255, 0.15) 2px,
      transparent 2px,
      transparent 6px
    );

  animation: glitchArchive 0.35s infinite steps(2, end);
}

/* ================================
RESEARCH — DIAGONAL INSTABILITY
================================ */
body.research::before {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 0, 204, 0.2),
      rgba(0, 255, 255, 0.12) 2px,
      transparent 2px,
      transparent 5px
    );

  animation: glitchResearch 0.28s infinite steps(2, end);
}

/* ================================
ABOUT — FLICKER SCAN
================================ */
body.about-page::before {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.08),
      rgba(255,255,255,0.04) 2px,
      transparent 2px,
      transparent 4px
    );

  animation: glitchAbout 0.18s infinite steps(2, end);
}

/* ================================
GLITCH ANIMATIONS (AGGRESSIVE)
================================ */

@keyframes glitchHome {
  0%   { transform: translate(0,0) skew(0deg); }
  10%  { transform: translate(6px,-4px) skew(2deg); }
  20%  { transform: translate(-5px,5px) skew(-2deg); }
  30%  { transform: translate(4px,-6px) skew(3deg); }
  40%  { transform: translate(-7px,3px) skew(-1deg); }
  50%  { transform: translate(5px,6px) skew(2deg); }
  60%  { transform: translate(-4px,-5px) skew(-3deg); }
  70%  { transform: translate(6px,3px) skew(1deg); }
  80%  { transform: translate(-6px,6px) skew(-2deg); }
  100% { transform: translate(0,0) skew(0deg); }
}

@keyframes glitchArchive {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(8px); }
  50%  { transform: translateX(-8px); }
  75%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

@keyframes glitchResearch {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(6px,-5px); }
  50%  { transform: translate(-6px,6px); }
  75%  { transform: translate(5px,3px); }
  100% { transform: translate(0,0); }
}

@keyframes glitchAbout {
  0%   { transform: translateY(0); opacity: 0.8; }
  50%  { transform: translateY(4px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.7; }
}

/* ================================
NAVIGATION
================================ */
nav {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--fg);
  text-decoration: none;
  opacity: 0.6;
  transition: 0.2s;
}

nav a:hover {
  opacity: 1;
  color: #00b7ff;
}

/* glitch hover overlay */
nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #15ff00;
  mix-blend-mode: difference;
  opacity: 0;
  transition: 0.15s;
}

nav a:hover::after {
  opacity: 0.3;
}

/* ================================
ARCHIVE FILE LINKS (LIGHTER + CONSISTENT STATES)
================================ */
.file {
  display: block;
  padding-left: 1.5rem;
  text-decoration: none;
  color: #d7ff48;
  opacity: 0.55;
  transition: 0.2s;
}

.file:visited {
  color: #ff39ff;
  opacity: 0.45;
}

.file:hover {
  color: #3bd6f1;
  opacity: 0.9;
  transform: translateX(6px);
}

.file:active {
  color: #66e8ff;
  transform: translateX(8px) scale(0.98);
  opacity: 1;
}

/* arrow */
.file::before {
  content: ">";
  position: absolute;
  left: 0;
  opacity: 0.3;
}

/* ================================
GLITCH TEXT
================================ */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
}

.glitch::before {
  color: #ff00ff;
  animation: glitchTop 2s infinite linear alternate-reverse;
}

.glitch::after {
  color: #00ffff;
  animation: glitchBottom 1.5s infinite linear alternate-reverse;
}

@keyframes glitchTop {
  0% { clip-path: inset(0 0 80% 0); transform: translate(-2px,-2px); }
  50% { clip-path: inset(40% 0 40% 0); transform: translate(2px,1px); }
  100% { clip-path: inset(80% 0 0 0); transform: translate(-2px,2px); }
}

@keyframes glitchBottom {
  0% { clip-path: inset(80% 0 0 0); transform: translate(2px,2px); }
  50% { clip-path: inset(40% 0 40% 0); transform: translate(-2px,-1px); }
  100% { clip-path: inset(0 0 80% 0); transform: translate(2px,-2px); }
}

.project-gallery {
  position: relative;
  z-index: 20;
  margin-top: 3rem;
}

.gallery-container {
  position: relative;
  z-index: 21;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.gallery-container img {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  position: relative;
  z-index: 22;
}

.project-gallery .arrow {
  position: relative;
  z-index: 30;
}

/* PROJECT 03 */
h2:nth-of-type(2) {
  margin-top: 2.5rem;
}

/* PROJECT 06 GALLERY LAYER FIX */
body.project06 .project-gallery {
  position: relative;
  z-index: 20;
  margin-top: 3rem;
}

body.project06 .gallery-container {
  position: relative;
  z-index: 21;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

body.project06 .gallery-container img,
body.project06 .gallery-container video {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  position: relative;
  z-index: 22;
}

body.project06 .project-gallery .arrow {
  position: relative;
  z-index: 30;
}

body.project06 #circle-layer {
  z-index: 5;
}

body.project06 main {
  position: relative;
  z-index: 10;
}

/* ================================
PROJECT 07 — FINAL GALLERY / REEL BUTTON FIX
PUT THIS AT THE VERY BOTTOM OF main.css
================================ */

body.project07 .gallery {
  position: relative;
  z-index: 50;
}

body.project07 .gallery-container {
  position: relative;
  z-index: 51;
  width: 100%;
}

body.project07 .gallery-container img,
body.project07 .gallery-container video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  position: relative;
  z-index: 52;
}

/* force Project 7 arrows back over the reel */
body.project07 .gallery .arrow {
  display: block;
  position: absolute !important;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999 !important;
  pointer-events: auto;
  cursor: pointer;

  background: rgba(0, 0, 0, 0.55);
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 2rem;
}

body.project07 .gallery .arrow.left {
  left: 10px;
}

body.project07 .gallery .arrow.right {
  right: 10px;
}

body.project07 .gallery .arrow:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: translateY(-50%) scale(1.1);
}

/* ================================
PROJECT 07 - RETURN BUTTON FIX
================================ */

body.project07 nav {
    display: inline-block;
    margin-top: 2rem;
}

body.project07 nav a {
    display: inline-block;
    width: fit-content;

    padding: 0.45rem 0.8rem;

    background: rgba(0,0,0,0.55);
    border-radius: 4px;

    white-space: nowrap;

    line-height: 1;
}