@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
  --void-black: #000000;
  --data-white: #ffffff;
  --corrupt-purple: #3d0645;
  --deep-void: #0f0014;
  --memory-leak: #5c0a6b;
  --glitch-magenta: #8b008b;
  --system-error: #ff00ff;
  --buffer-overflow: rgba(61, 6, 69, 0.95);
  --data-stream: rgba(255, 255, 255, 0.03);
}

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

/* RADICAL DATA CORRUPTION BODY */
body {
  font-family: 'JetBrains Mono', monospace;
  background: var(--void-black);
  color: var(--data-white);
  overflow-x: hidden;
  line-height: 1;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  position: relative;
}

/* SYSTEM MEMORY CORRUPTION BACKGROUND */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    /* Memory fragmentation pattern */
    repeating-conic-gradient(from 0deg at 23% 67%, 
      var(--void-black) 0deg, 
      var(--deep-void) 0.1deg,
      var(--corrupt-purple) 0.2deg,
      var(--void-black) 0.3deg
    ),
    /* Data stream corruption */
    repeating-linear-gradient(
      17deg,
      transparent 0px,
      var(--data-stream) 1px,
      transparent 2px,
      transparent 50px,
      rgba(61, 6, 69, 0.02) 51px,
      transparent 52px
    ),
    /* Buffer overflow zones */
    radial-gradient(ellipse 500px 200px at 30% 20%, var(--memory-leak) 0%, transparent 70%),
    radial-gradient(ellipse 300px 400px at 80% 80%, var(--corrupt-purple) 0%, transparent 60%),
    radial-gradient(ellipse 200px 600px at 10% 60%, rgba(139, 0, 139, 0.1) 0%, transparent 50%);
  background-size: 47px 47px, 100px 100px, 100% 100%, 100% 100%, 100% 100%;
  pointer-events: none;
  z-index: -3;
  animation: 
    memory-corruption 73s infinite linear,
    data-fragmentation 31s infinite ease-in-out,
    system-instability 11s infinite steps(20);
  filter: contrast(3) brightness(0.4);
}

@keyframes memory-corruption {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(-10px, 15px) rotate(0.3deg) scale(1.01); }
  66% { transform: translate(12px, -8px) rotate(-0.2deg) scale(0.99); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes data-fragmentation {
  0%, 95%, 100% { 
    opacity: 0.8; 
    filter: contrast(3) brightness(0.4);
  }
  97% { 
    opacity: 0.9; 
    filter: contrast(4) brightness(0.2) hue-rotate(10deg);
  }
  98% { 
    opacity: 0.7; 
    filter: contrast(2) brightness(0.6) hue-rotate(-5deg);
  }
}

@keyframes system-instability {
  0%, 90%, 100% { transform: translate(0, 0); }
  95% { transform: translate(-1px, 1px); }
  96% { transform: translate(1px, -1px); }
  97% { transform: translate(-1px, -1px); }
  98% { transform: translate(1px, 1px); }
  99% { transform: translate(0, 0); }
}

/* MEMORY SCAN LINES */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.008) 3px,
      rgba(255, 255, 255, 0.008) 4px
    );
  pointer-events: none;
  z-index: -2;
  animation: scan-corruption 0.08s infinite steps(1);
}

@keyframes scan-corruption {
  0% { transform: translateY(0px) scaleX(1); }
  25% { transform: translateY(-1px) scaleX(1.001); }
  50% { transform: translateY(-2px) scaleX(0.999); }
  75% { transform: translateY(-1px) scaleX(1.002); }
  100% { transform: translateY(-4px) scaleX(1); }
}

/* EXPERIMENTAL TITLE - COMPLETE BREAKDOWN */
.site-title {
  font-size: clamp(1.5rem, 10vw, 8rem);
  font-weight: 900;
  text-align: center;
  margin: 0;
  padding: 4rem 0;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  position: relative;
  color: var(--data-white);
  
  /* Multi-layer text shadow for depth corruption */
  text-shadow: 
    0 0 0 transparent,
    1px 0 0 var(--corrupt-purple),
    2px 0 0 var(--memory-leak),
    0 1px 0 var(--deep-void),
    0 2px 0 var(--corrupt-purple),
    -1px 0 0 rgba(255, 255, 255, 0.1),
    0 0 10px rgba(139, 0, 139, 0.3);
    
  /* Experimental transform and filters */
  transform-origin: center;
  animation: 
    neural-decay 97s infinite linear,
    synaptic-fire 7s infinite steps(50),
    consciousness-flicker 23s infinite ease-in-out;
    
  /* Typography experiments */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "kern" 0, "liga" 0, "calt" 0;
  text-rendering: optimizeSpeed;
  
  /* Data corruption effects */
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(61, 6, 69, 0.1) 30%,
    transparent 60%,
    rgba(139, 0, 139, 0.05) 90%,
    transparent 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  
  /* Experimental layout breaking */
  transform: 
    perspective(1000px) 
    rotateX(0.2deg) 
    rotateY(-0.1deg) 
    translateZ(0);
}

.site-title::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgba(255, 0, 255, 0.03);
  z-index: -1;
  animation: data-ghost-1 127s infinite linear;
  transform-origin: center;
  filter: blur(0.5px);
  mix-blend-mode: difference;
}

.site-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgba(61, 6, 69, 0.06);
  z-index: -2;
  animation: data-ghost-2 83s infinite linear;
  transform-origin: center;
  filter: blur(1px);
  mix-blend-mode: multiply;
}

@keyframes neural-decay {
  0% { filter: contrast(1) brightness(1) saturate(1) hue-rotate(0deg); }
  23% { filter: contrast(1.1) brightness(0.95) saturate(1.2) hue-rotate(1deg); }
  47% { filter: contrast(0.9) brightness(1.05) saturate(0.8) hue-rotate(-1deg); }
  71% { filter: contrast(1.05) brightness(0.98) saturate(1.1) hue-rotate(0.5deg); }
  100% { filter: contrast(1) brightness(1) saturate(1) hue-rotate(0deg); }
}

@keyframes synaptic-fire {
  0%, 96%, 100% { 
    text-shadow: 
      0 0 0 transparent,
      1px 0 0 var(--corrupt-purple),
      2px 0 0 var(--memory-leak),
      0 1px 0 var(--deep-void),
      0 2px 0 var(--corrupt-purple),
      -1px 0 0 rgba(255, 255, 255, 0.1),
      0 0 10px rgba(139, 0, 139, 0.3);
  }
  97% { 
    text-shadow: 
      0 0 0 transparent,
      1.5px 0 0 var(--corrupt-purple),
      2.5px 0 0 var(--memory-leak),
      0 1.5px 0 var(--deep-void),
      0 2.5px 0 var(--corrupt-purple),
      -1.5px 0 0 rgba(255, 255, 255, 0.15),
      0 0 15px rgba(139, 0, 139, 0.5);
  }
  98% { 
    text-shadow: 
      0 0 0 transparent,
      0.5px 0 0 var(--corrupt-purple),
      1.5px 0 0 var(--memory-leak),
      0 0.5px 0 var(--deep-void),
      0 1.5px 0 var(--corrupt-purple),
      -0.5px 0 0 rgba(255, 255, 255, 0.05),
      0 0 5px rgba(139, 0, 139, 0.2);
  }
  99% { 
    text-shadow: 
      0 0 0 transparent,
      2px 0 0 var(--system-error),
      3px 0 0 var(--glitch-magenta),
      0 2px 0 var(--void-black),
      0 3px 0 var(--system-error),
      -2px 0 0 rgba(255, 255, 255, 0.2),
      0 0 20px rgba(255, 0, 255, 0.8);
  }
}

@keyframes consciousness-flicker {
  0%, 99%, 100% { 
    transform: 
      perspective(1000px) 
      rotateX(0.2deg) 
      rotateY(-0.1deg) 
      translateZ(0);
  }
  99.5% { 
    transform: 
      perspective(1000px) 
      rotateX(0.3deg) 
      rotateY(-0.2deg) 
      translateZ(-1px)
      scale(1.001);
  }
}

@keyframes data-ghost-1 {
  0% { transform: translate(0, 0) scale(1) skew(0deg); }
  31% { transform: translate(0.1px, -0.05px) scale(1.0001) skew(0.01deg); }
  67% { transform: translate(-0.05px, 0.1px) scale(0.9999) skew(-0.01deg); }
  100% { transform: translate(0, 0) scale(1) skew(0deg); }
}

@keyframes data-ghost-2 {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  29% { transform: translate(-0.08px, 0.03px) scale(0.99995) rotate(0.005deg); }
  71% { transform: translate(0.05px, -0.08px) scale(1.00005) rotate(-0.003deg); }
  100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

/* CONTAINER - MEMORY ALLOCATION */
.container {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 1rem;
  position: relative;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    /* Memory allocation grid */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 200px,
      var(--data-stream) 200px,
      var(--data-stream) 201px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 150px,
      rgba(61, 6, 69, 0.01) 150px,
      rgba(61, 6, 69, 0.01) 151px
    );
  pointer-events: none;
  z-index: -1;
  animation: memory-allocation 89s infinite linear;
}

@keyframes memory-allocation {
  0% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(-1px, -1px); opacity: 0.7; }
  100% { transform: translate(0, 0); opacity: 0.5; }
}

/* DESCRIPTION - DATA PACKET */
.description {
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.2;
  margin: 2rem auto;
  max-width: 800px;
  padding: 0;
  border: none;
  background: none;
  position: relative;
  
  /* Experimental text layout */
  columns: 2;
  column-gap: 4rem;
  column-rule: 1px solid rgba(61, 6, 69, 0.3);
  
  /* Break normal text flow */
  transform: skew(-0.2deg);
  
  animation: data-packet-corruption 43s infinite ease-in-out;
}

.description::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: 
    /* Packet header corruption */
    linear-gradient(
      135deg,
      var(--corrupt-purple) 0%,
      transparent 2%,
      transparent 98%,
      var(--memory-leak) 100%
    ),
    /* Data fragmentation visualization */
    repeating-linear-gradient(
      45deg,
      transparent 0px,
      var(--data-stream) 1px,
      transparent 2px,
      transparent 30px
    );
  z-index: -1;
  animation: packet-fragmentation 17s infinite linear;
}

.description p {
  margin-bottom: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  
  /* Experimental typography */
  text-align: justify;
  hyphens: auto;
  word-spacing: -0.05em;
  
  /* Data corruption effects */
  animation: text-corruption 67s infinite ease-in-out;
}

@keyframes data-packet-corruption {
  0%, 97%, 100% { 
    transform: skew(-0.2deg) translateX(0); 
    filter: contrast(1) brightness(1);
  }
  98% { 
    transform: skew(-0.1deg) translateX(-1px); 
    filter: contrast(1.2) brightness(0.8);
  }
  99% { 
    transform: skew(-0.3deg) translateX(1px); 
    filter: contrast(0.8) brightness(1.2);
  }
}

@keyframes packet-fragmentation {
  0% { transform: rotate(0deg) scale(1); opacity: 0.1; }
  50% { transform: rotate(0.1deg) scale(1.001); opacity: 0.15; }
  100% { transform: rotate(0deg) scale(1); opacity: 0.1; }
}

@keyframes text-corruption {
  0%, 99.5%, 100% { 
    color: rgba(255, 255, 255, 0.85);
    text-shadow: none;
  }
  99.7% { 
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 2px rgba(139, 0, 139, 0.3);
  }
  99.9% { 
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 1px 0 0 rgba(61, 6, 69, 0.5);
  }
}

/* GALLERY - MEMORY MATRIX */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem 2rem;
  margin: 4rem 0 6rem;
  position: relative;
  
  /* Experimental grid distortion */
  transform: perspective(2000px) rotateX(0.5deg);
}

.gallery::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background: 
    /* Memory matrix visualization */
    radial-gradient(circle at 20% 30%, var(--corrupt-purple) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--memory-leak) 0%, transparent 40%),
    radial-gradient(circle at 50% 20%, rgba(139, 0, 139, 0.1) 0%, transparent 60%),
    /* Data flow patterns */
    conic-gradient(from 45deg at 30% 70%, 
      transparent 0deg,
      var(--data-stream) 1deg,
      transparent 2deg,
      transparent 90deg,
      rgba(61, 6, 69, 0.02) 91deg,
      transparent 92deg
    );
  background-size: 100% 100%, 100% 100%, 100% 100%, 200px 200px;
  z-index: -1;
  animation: matrix-corruption 113s infinite linear;
  filter: blur(20px);
}

@keyframes matrix-corruption {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(360deg) scale(1.1); }
}

/* WORK CARDS - MEMORY BLOCKS */
.work-card {
  background: 
    linear-gradient(
      135deg,
      var(--void-black) 0%,
      var(--deep-void) 50%,
      var(--void-black) 100%
    );
  border: 2px solid var(--corrupt-purple);
  border-radius: 0;
  overflow: hidden;
  transition: none;
  position: relative;
  cursor: pointer;
  
  /* Experimental shadow system */
  box-shadow: 
    inset 0 0 100px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(61, 6, 69, 0.3),
    0 0 20px rgba(0, 0, 0, 0.8),
    0 10px 40px rgba(61, 6, 69, 0.1);
    
  /* Memory block distortion */
  transform: rotateX(0.3deg) rotateY(0.1deg);
  transform-origin: center bottom;
  
  animation: memory-block-idle 79s infinite ease-in-out;
}

.work-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    /* Memory allocation pattern */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 20px,
      rgba(255, 255, 255, 0.005) 20px,
      rgba(255, 255, 255, 0.005) 21px
    ),
    /* Data integrity check */
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 40px,
      var(--data-stream) 40px,
      var(--data-stream) 41px
    );
  pointer-events: none;
  z-index: 5;
  animation: memory-scan 0.2s infinite linear;
}

.work-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: 
    radial-gradient(circle, var(--corrupt-purple) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: memory-leak-idle 37s infinite ease-in-out;
}

.work-card:hover {
  border-color: var(--memory-leak);
  transform: 
    rotateX(0.5deg) 
    rotateY(0.2deg) 
    translateY(-3px) 
    scale(1.002);
  
  box-shadow: 
    inset 0 0 100px rgba(61, 6, 69, 0.2),
    0 0 0 2px var(--memory-leak),
    0 0 30px rgba(92, 10, 107, 0.3),
    0 15px 60px rgba(61, 6, 69, 0.2);
    
  animation: memory-block-active 0.1s infinite steps(10);
}

.work-card:hover::after {
  opacity: 0.1;
  animation: memory-leak-active 2s infinite ease-in-out;
}

@keyframes memory-block-idle {
  0%, 98%, 100% { 
    transform: rotateX(0.3deg) rotateY(0.1deg);
    filter: contrast(1) brightness(1);
  }
  99% { 
    transform: rotateX(0.4deg) rotateY(0.2deg);
    filter: contrast(1.1) brightness(0.9);
  }
}

@keyframes memory-block-active {
  0%, 80% { 
    transform: 
      rotateX(0.5deg) 
      rotateY(0.2deg) 
      translateY(-3px) 
      scale(1.002);
  }
  90% { 
    transform: 
      rotateX(0.6deg) 
      rotateY(0.3deg) 
      translateY(-4px) 
      scale(1.003);
  }
  100% { 
    transform: 
      rotateX(0.4deg) 
      rotateY(0.1deg) 
      translateY(-2px) 
      scale(1.001);
  }
}

@keyframes memory-scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(-21px); }
}

@keyframes memory-leak-idle {
  0%, 100% { opacity: 0; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.05; transform: scale(1.1) rotate(0.5deg); }
}

@keyframes memory-leak-active {
  0%, 100% { opacity: 0.1; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.2; transform: scale(1.2) rotate(1deg); }
}

/* THUMBNAIL CONTAINER - VIDEO BUFFER */
.thumbnail-container {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--void-black);
  border-bottom: 1px solid var(--corrupt-purple);
}

.thumbnail-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    /* Video buffer corruption */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 8px,
      rgba(255, 255, 255, 0.01) 8px,
      rgba(255, 255, 255, 0.01) 9px
    ),
    /* Pixel data corruption */
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 12px,
      var(--data-stream) 12px,
      var(--data-stream) 13px
    );
  z-index: 10;
  pointer-events: none;
  animation: buffer-corruption 0.15s infinite steps(1);
}

@keyframes buffer-corruption {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(0.5px, 0) scale(1.001); }
  50% { transform: translate(0, 0.5px) scale(0.999); }
  75% { transform: translate(-0.5px, 0) scale(1.002); }
  100% { transform: translate(0, -0.5px) scale(1); }
}

.thumbnail,
.frame-thumbnail,
.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: contrast(1.2) brightness(0.85) saturate(1.1);
  
  /* Experimental transform */
  transform: scale(1.05) rotateZ(-0.1deg);
}

.work-card:hover .thumbnail,
.work-card:hover .frame-thumbnail,
.work-card:hover .video-thumbnail {
  transform: scale(1.08) rotateZ(0.05deg);
  filter: contrast(1.4) brightness(0.9) saturate(1.3);
  animation: pixel-corruption 0.3s infinite steps(1);
}

@keyframes pixel-corruption {
  0%, 85% { 
    filter: contrast(1.4) brightness(0.9) saturate(1.3);
  }
  90% { 
    filter: contrast(1.6) brightness(0.7) saturate(1.5) hue-rotate(2deg);
  }
  95% { 
    filter: contrast(1.2) brightness(1.1) saturate(1.1) hue-rotate(-1deg);
  }
  100% { 
    filter: contrast(1.4) brightness(0.9) saturate(1.3);
  }
}

/* WORK INFO - DATA HEADER */
.work-info {
  padding: 1.5rem;
  position: relative;
  background: 
    linear-gradient(
      to bottom,
      var(--deep-void) 0%,
      var(--void-black) 100%
    );
  border-top: 1px solid rgba(61, 6, 69, 0.5);
}

.work-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: 
    linear-gradient(
      90deg,
      transparent 0%,
      var(--corrupt-purple) 20%,
      var(--memory-leak) 50%,
      var(--corrupt-purple) 80%,
      transparent 100%
    );
  animation: data-header-scan 5s infinite ease-in-out;
}

@keyframes data-header-scan {
  0%, 100% { opacity: 0.3; transform: scaleX(1); }
  50% { opacity: 0.8; transform: scaleX(1.1); }
}

.work-title {
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
  color: var(--data-white);
  
  /* Experimental text shadow */
  text-shadow: 
    1px 0 0 var(--corrupt-purple),
    0 1px 0 var(--deep-void),
    2px 0 0 rgba(61, 6, 69, 0.3);
    
  /* Data corruption */
  animation: title-memory-corruption 61s infinite ease-in-out;
  
  /* Break typography rules */
  word-spacing: -0.1em;
  transform: skew(-0.5deg);
}

.work-title:hover {
  animation: title-system-error 0.08s infinite steps(1);
  color: var(--system-error);
  text-shadow: 
    0 0 5px var(--system-error),
    1px 0 0 var(--glitch-magenta),
    0 1px 0 var(--void-black);
}

@keyframes title-memory-corruption {
  0%, 99%, 100% { 
    transform: skew(-0.5deg);
    filter: contrast(1) brightness(1);
  }
  99.5% { 
    transform: skew(-0.3deg) translateX(0.5px);
    filter: contrast(1.2) brightness(0.8);
  }
}

@keyframes title-system-error {
  0%, 70% { 
    color: var(--system-error);
    transform: skew(-0.5deg);
  }
  80% { 
    color: var(--glitch-magenta);
    transform: skew(-0.3deg) translateX(-1px);
  }
  90% { 
    color: var(--data-white);
    transform: skew(-0.7deg) translateX(1px);
  }
  100% { 
    color: var(--system-error);
    transform: skew(-0.5deg);
  }
}

.work-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
  font-weight: 200;
  
  /* Experimental positioning */
  transform: translateX(10px);
  
  animation: subtitle-data-stream 47s infinite ease-in-out;
}

@keyframes subtitle-data-stream {
  0%, 98%, 100% { 
    opacity: 0.7;
    transform: translateX(10px);
  }
  99% { 
    opacity: 0.5;
    transform: translateX(8px);
  }
}

/* VIDEO PLAYER PAGE - MINIMAL CORRUPTION */
.video-container {
  margin: 2rem 0;
  text-align: center;
  position: relative;
}

.video-title {
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 3rem;
  color: var(--data-white);
  
  /* Experimental text treatment */
  text-shadow: 
    2px 0 0 var(--corrupt-purple),
    0 2px 0 var(--deep-void),
    4px 0 0 rgba(61, 6, 69, 0.2);
    
  /* Typography breaking */
  word-spacing: -0.05em;
  transform: perspective(800px) rotateX(0.3deg);
  
  animation: video-title-corruption 71s infinite ease-in-out;
}

@keyframes video-title-corruption {
  0%, 99%, 100% { 
    transform: perspective(800px) rotateX(0.3deg);
    filter: contrast(1) brightness(1);
  }
  99.5% { 
    transform: perspective(800px) rotateX(0.4deg) translateY(-1px);
    filter: contrast(1.1) brightness(0.9);
  }
}

.video-player,
.frame-player {
  position: relative;
  display: inline-block;
  background: var(--void-black);
  border: 3px solid var(--corrupt-purple);
  border-radius: 0;
  overflow: hidden;
  
  /* Experimental shadow system */
  box-shadow: 
    0 0 0 1px var(--memory-leak),
    inset 0 0 100px rgba(0, 0, 0, 0.8),
    0 20px 80px rgba(61, 6, 69, 0.3),
    0 0 40px rgba(0, 0, 0, 0.9);
    
  /* Player distortion */
  transform: perspective(1200px) rotateX(0.2deg);
}

.main-video,
.frame-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: contrast(1.3) brightness(0.9) saturate(1.2);
}

/* FRAME PLAYER ENHANCEMENTS */
.frame-display {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  background: var(--void-black);
  
  /* Buffer corruption effect */
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 4px,
      rgba(61, 6, 69, 0.02) 4px,
      rgba(61, 6, 69, 0.02) 5px
    );
}

.loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--data-white);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  
  /* Data stream effect */
  text-shadow: 
    0 0 10px rgba(61, 6, 69, 0.5),
    1px 0 0 var(--corrupt-purple);
    
  animation: loading-data-stream 1.2s infinite ease-in-out;
}

@keyframes loading-data-stream {
  0%, 100% { 
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02);
  }
}

/* VIDEO DESCRIPTION - MINIMAL */
.video-description {
  max-width: 700px;
  margin: 4rem auto 0;
  padding: 2rem;
  background: 
    linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(15, 0, 20, 0.8) 100%
    );
  border: 1px solid var(--corrupt-purple);
  border-radius: 0;
  position: relative;
  
  /* Experimental text layout */
  transform: skew(-0.1deg);
}

.video-description::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: 
    linear-gradient(
      90deg,
      transparent 0%,
      var(--memory-leak) 50%,
      transparent 100%
    );
  animation: description-data-flow 7s infinite ease-in-out;
}

@keyframes description-data-flow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.video-description p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  margin: 0;
  
  /* Experimental typography */
  font-weight: 300;
  text-align: justify;
}

/* CUSTOM VIDEO CONTROLS - SYSTEM UI */
.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: 
    linear-gradient(
      transparent 0%,
      rgba(0, 0, 0, 0.7) 20%,
      rgba(15, 0, 20, 0.95) 100%
    );
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-top: 1px solid var(--corrupt-purple);
}

.video-player:hover .custom-controls,
.frame-player:hover .custom-controls {
  transform: translateY(0);
}

/* FRAME DOWNLOAD SECTION */
.download-section {
  margin-bottom: 2rem;
  text-align: center;
  padding: 1rem;
  background: 
    linear-gradient(
      135deg,
      rgba(61, 6, 69, 0.1) 0%,
      rgba(15, 0, 20, 0.3) 100%
    );
  border: 1px solid var(--corrupt-purple);
  border-radius: 0;
}

.download-frames-btn {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  padding: 1rem 2rem;
  background: 
    linear-gradient(
      135deg,
      var(--memory-leak) 0%,
      var(--corrupt-purple) 100%
    ) !important;
  border-color: var(--memory-leak) !important;
  color: var(--data-white) !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  
  /* Enhanced button effects */
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(92, 10, 107, 0.4),
    0 0 40px rgba(61, 6, 69, 0.2);
}

.download-frames-btn:hover {
  background: 
    linear-gradient(
      135deg,
      var(--system-error) 0%,
      var(--glitch-magenta) 100%
    ) !important;
  border-color: var(--system-error) !important;
  
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(255, 0, 255, 0.6),
    0 0 60px rgba(139, 0, 139, 0.4);
    
  animation: download-button-pulse 0.3s ease;
}

.download-frames-btn:disabled {
  background: 
    linear-gradient(
      135deg,
      var(--deep-void) 0%,
      var(--void-black) 100%
    ) !important;
  border-color: rgba(61, 6, 69, 0.5) !important;
  color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  cursor: not-allowed;
}

@keyframes download-button-pulse {
  0% { transform: skew(-2deg) scale(1.05); }
  50% { transform: skew(-1deg) scale(1.1); }
  100% { transform: skew(-2deg) scale(1.05); }
}

.download-info {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 300;
  
  /* Subtle data stream effect */
  text-shadow: 0 0 3px rgba(61, 6, 69, 0.3);
  animation: download-info-pulse 3s infinite ease-in-out;
}

@keyframes download-info-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.8; }
}

.progress-container {
  width: 100%;
  height: 8px;
  background: rgba(61, 6, 69, 0.3);
  border-radius: 0;
  margin-bottom: 1.5rem;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
  height: 100%;
  background: 
    linear-gradient(
      90deg,
      var(--corrupt-purple) 0%,
      var(--memory-leak) 50%,
      var(--glitch-magenta) 100%
    );
  border-radius: 0;
  transition: width 0.1s ease;
  
  /* Progress corruption */
  box-shadow: 
    0 0 15px rgba(92, 10, 107, 0.4),
    inset 0 0 5px rgba(255, 255, 255, 0.1);
}

.progress-scrubber {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: var(--data-white);
  border: 2px solid var(--corrupt-purple);
  border-radius: 0;
  transform: translateX(-50%);
  
  /* Scrubber effects */
  box-shadow: 
    0 0 10px rgba(255, 255, 255, 0.5),
    inset 0 0 5px rgba(61, 6, 69, 0.3);
  pointer-events: none;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.control-btn {
  background: 
    linear-gradient(
      135deg,
      var(--void-black) 0%,
      var(--deep-void) 100%
    );
  border: 2px solid var(--corrupt-purple);
  color: var(--data-white);
  padding: 0.8rem 1.5rem;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
  white-space: nowrap;
  
  /* Button distortion */
  transform: skew(-2deg);
  
  /* Button shadow system */
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(61, 6, 69, 0.2);
}

.control-btn:hover {
  background: 
    linear-gradient(
      135deg,
      var(--corrupt-purple) 0%,
      var(--memory-leak) 100%
    );
  border-color: var(--memory-leak);
  transform: skew(-2deg) scale(1.05);
  
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(92, 10, 107, 0.4),
    0 0 40px rgba(61, 6, 69, 0.2);
    
  animation: button-system-response 0.2s ease;
}

@keyframes button-system-response {
  0% { transform: skew(-2deg) scale(1.05); }
  50% { transform: skew(-1deg) scale(1.08); }
  100% { transform: skew(-2deg) scale(1.05); }
}

.control-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--deep-void);
  color: rgba(255, 255, 255, 0.4);
  border-color: rgba(61, 6, 69, 0.5);
  transform: skew(-2deg) scale(1);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.download-btn {
  border-color: var(--memory-leak) !important;
  background: 
    linear-gradient(
      135deg,
      var(--memory-leak) 0%,
      var(--corrupt-purple) 100%
    ) !important;
}

.frame-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.current-frame {
  color: var(--data-white);
  font-weight: 800;
  text-shadow: 0 0 5px rgba(92, 10, 107, 0.3);
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.volume-slider {
  width: 100px;
  height: 6px;
  background: rgba(61, 6, 69, 0.5);
  border: 1px solid var(--corrupt-purple);
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--data-white);
  border: 2px solid var(--corrupt-purple);
  border-radius: 0;
  cursor: pointer;
  box-shadow: 
    0 0 8px rgba(255, 255, 255, 0.3),
    inset 0 0 5px rgba(61, 6, 69, 0.2);
}

.time-display {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  white-space: nowrap;
  font-family: 'JetBrains Mono';
  text-shadow: 0 0 3px rgba(61, 6, 69, 0.3);
}

/* NAVIGATION - SYSTEM RETURN */
.nav-back {
  display: inline-block;
  margin: 2rem 0;
  padding: 1rem 2rem;
  background: 
    linear-gradient(
      135deg,
      var(--void-black) 0%,
      var(--deep-void) 100%
    );
  border: 2px solid var(--corrupt-purple);
  color: var(--data-white);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.15em;
  transition: all 0.3s ease;
  border-radius: 0;
  
  /* Navigation distortion */
  transform: skew(-3deg);
  
  /* Navigation shadow */
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(61, 6, 69, 0.2);
}

.nav-back:hover {
  background: 
    linear-gradient(
      135deg,
      var(--corrupt-purple) 0%,
      var(--memory-leak) 100%
    );
  border-color: var(--memory-leak);
  transform: skew(-3deg) scale(1.05) translateY(-2px);
  text-decoration: none;
  
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.3),
    0 0 25px rgba(92, 10, 107, 0.4),
    0 5px 30px rgba(61, 6, 69, 0.3);
}

/* SYSTEM CORRUPTION OVERLAY */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.04;
  background: 
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300" viewBox="0 0 300 300"><defs><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="8" stitchTiles="stitch"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/></filter></defs><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="1"/></svg>');
  animation: system-corruption 0.06s infinite steps(1);
  z-index: 1000;
  mix-blend-mode: difference;
  
  /* Additional corruption layers */
  background-image: 
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300" viewBox="0 0 300 300"><defs><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="8" stitchTiles="stitch"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/></filter></defs><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="1"/></svg>'),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 100px,
      rgba(61, 6, 69, 0.02) 100px,
      rgba(61, 6, 69, 0.02) 101px
    );
}

@keyframes system-corruption {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  10% { transform: translate(-2px, 1px) rotate(0.1deg) scale(1.001); }
  20% { transform: translate(1px, -2px) rotate(-0.05deg) scale(0.999); }
  30% { transform: translate(-1px, -1px) rotate(0.03deg) scale(1.002); }
  40% { transform: translate(2px, 0px) rotate(-0.08deg) scale(0.998); }
  50% { transform: translate(0px, 2px) rotate(0.06deg) scale(1.001); }
  60% { transform: translate(1px, -1px) rotate(-0.02deg) scale(1.003); }
  70% { transform: translate(-2px, 0px) rotate(0.04deg) scale(0.999); }
  80% { transform: translate(0px, 1px) rotate(-0.07deg) scale(1.001); }
  90% { transform: translate(-1px, -2px) rotate(0.02deg) scale(1.002); }
  100% { transform: translate(1px, 0px) rotate(-0.01deg) scale(0.998); }
}

/* GLOBAL SYSTEM EFFECTS */
@keyframes global-system-corruption {
  0%, 99.2%, 100% { 
    filter: contrast(1) brightness(1) saturate(1) hue-rotate(0deg);
  }
  99.4% { 
    filter: contrast(1.3) brightness(0.7) saturate(1.4) hue-rotate(2deg);
  }
  99.6% { 
    filter: contrast(0.7) brightness(1.3) saturate(0.8) hue-rotate(-3deg);
  }
  99.8% { 
    filter: contrast(1.5) brightness(0.5) saturate(1.6) hue-rotate(1deg);
  }
}

body {
  animation: global-system-corruption 37s infinite;
}

/* RESPONSIVE - MAINTAIN CORRUPTION */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .gallery {
    grid-template-columns: 1fr;
    gap: 2rem;
    transform: perspective(2000px) rotateX(0.2deg);
  }
  
  .description {
    columns: 1;
    margin: 1.5rem auto;
    max-width: 90%;
  }
  
  .video-description {
    margin: 2rem auto 0;
    padding: 1.5rem;
    max-width: 90%;
  }
  
  .controls-row {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .control-btn {
    text-align: center;
    transform: skew(-1deg);
  }
  
  .volume-container {
    order: -1;
    justify-content: center;
  }
  
  .site-title {
    font-size: clamp(1.2rem, 8vw, 4rem);
    padding: 2rem 0;
  }
  
  .work-title {
    font-size: 1.1rem;
  }
  
  .thumbnail-container {
    height: 200px;
  }
} 