:root {
  --bg: #000000;
  --ink: #ffffff;
  --muted: #888888;
  --border-color: rgba(255, 255, 255, 0.15);
  --border: 1px solid var(--border-color);
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- THE STRICT GRID SYSTEM --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  border-left: var(--border);
  border-right: var(--border);
}

.row {
  display: flex;
  border-bottom: var(--border);
  flex-wrap: wrap;
}

.col {
  padding: 60px 40px;
  border-right: var(--border);
  flex: 1;
}

.col:last-child {
  border-right: none;
}

/* --- TYPOGRAPHY --- */
h1 {
  font-size: clamp(40px, 7vw, 90px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- SPECIFIC BLOCKS --- */
.header-row {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: var(--border);
}

.header-row a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}

/* --- HERO MEDIA FIX --- */
.media-col {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
  /* Keeps the edges perfectly sharp */
}

.media-col img,
.media-col video {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
  /* Forces the perfect 1920x1080 shape */
  object-fit: cover;
  /* Fills the entire column without black bars */
  cursor: pointer;
  filter: grayscale(60%) brightness(0.7);
  transition: filter 0.5s var(--spring), transform 0.5s var(--spring);
}

.media-col:hover img,
.media-col:hover video {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.02);
  /* Slightly smaller scale so it doesn't clip too hard */
}

/* Metrics Box */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.metric {
  border: var(--border);
  padding: 20px;
  text-align: center;
}

.metric span {
  display: block;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  color: var(--ink);
  /* This tells the numbers to fade smoothly over 0.15 seconds */
  transition: opacity 0.15s ease-in-out;
}

.metric label {
  color: var(--muted);
}

/* Roles Bar */
.roles-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.roles-bar div {
  padding: 20px;
  border-right: var(--border);
  color: var(--muted);
}

.roles-bar div:last-child {
  border-right: none;
}

/* --- INTERACTIVE DATA ROWS (ADVANCED) --- */
.table-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: var(--border);
  position: relative;
  /* CRITICAL: The background image breaks without this */
  overflow: hidden;
  /* CRITICAL: Stops the image from bleeding out */
  cursor: default;
  transition: padding 0.4s var(--spring);
}

.table-col {
  padding: 40px;
  border-right: var(--border);
  flex: 1;
  position: relative;
  z-index: 2;
  /* CRITICAL: Forces your text to sit ON TOP of the image */
}

.table-col:last-child {
  border-right: none;
}

/* THE AMBIENT IMAGE LAYER (Pseudo-element) */
.table-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 20%;
  /* Shifts focus slightly up */
  opacity: 0;
  /* Hidden by default */
  z-index: 1;
  /* Sits between the black background and the text */
  transition: opacity 0.5s ease-out;
  /* IMPORTANT: Makes the images moody so white text pops */
  filter: grayscale(50%) brightness(0.5) contrast(1.2);
}

/* HOVER STATE: Reveal the image layer subtly */
.table-row:hover::before {
  opacity: 0.6;
  /* Adjust this between 0.2 and 0.5 depending on image brightness */
}

.table-row:hover {
  padding-left: 10px;
  /* Keep the physical shift */
}


/* --- ASSIGNING THE SPECIFIC IMAGES --- */
.row-jojo::before {
  background-image: url('assets/jojobg.png');
}

.row-bleach::before {
  background-image: url('assets/bleachbg.png');
}

.row-zom::before {
  background-image: url('assets/zombg.png');
}

.row-goh::before {
  background-image: url('assets/gohbg.png');
}

/* Typography remains the same */
.table-col h3 {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
  color: #fff;
}

.stat-block {
  margin-bottom: 5px;
}

.stat-block span {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  display: block;
}

.stat-block label {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
  text-transform: uppercase;
}

/* --- BENTO LISTS (For Esports & Editing) --- */
.bento-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.bento-list li {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bento-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.bento-list strong {
  color: #fff;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bento-list span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* --- MEGA FOOTER --- */
.mega-footer {
  padding: 100px 40px;
  text-align: center;
  border-bottom: var(--border);
}

.mega-footer h2 {
  font-size: clamp(50px, 10vw, 120px);
  margin-bottom: 20px;
  color: #fff;
}

.mega-footer a {
  display: inline-block;
  margin: 0 15px;
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
  text-transform: uppercase;
}

.mega-footer a:hover {
  color: #fff;
}

/* --- REVEAL ANIMATION (NUCLEAR FIX) --- */
/* This forces all content to be visible immediately, bypassing the broken Javascript */
.reveal {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}

@media (max-width: 900px) {

  .col,
  .table-col {
    flex: 0 0 100%;
    border-right: none;
    border-bottom: var(--border);
  }

  .table-col {
    padding: 30px 20px;
  }

  .table-row:hover {
    padding-left: 0;
  }

  .media-col {
    flex: 0 0 100%;
    height: 300px;
  }

  .roles-bar {
    grid-template-columns: 1fr 1fr;
  }

  .roles-bar div {
    border-bottom: var(--border);
  }
}

/* --- THE GLOBAL DESATURATION UPDATE --- */
.media-col img,
.media-col video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  /* Cinematic desaturation instead of pure black and white */
  filter: grayscale(60%) brightness(0.7);
  transition: filter 0.5s var(--spring), transform 0.5s var(--spring);
}

.media-col:hover img,
.media-col:hover video {
  filter: grayscale(0%) brightness(1);
  /* Snaps to full color */
  transform: scale(1.05);
}

/* --- THE ITO GALLERY FIX --- */
.ito-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* --- THE ITO GALLERY FIX --- */
.ito-gallery img {
  width: 100%;
  aspect-ratio: 9/16;
  /* Flipped to perfectly match vertical TikTok/Reel resolution */
  object-fit: cover;
  /* Fills the new tall box beautifully */
  border: var(--border);
  filter: grayscale(60%) brightness(0.7);
  transition: all 0.3s var(--spring);
  cursor: pointer;
}

.ito-gallery img:hover {
  filter: grayscale(0%) brightness(1);
  transform: translateY(-5px);
  border-color: #fff;
}

/* --- WHITE HEADER & BLACK TEXT --- */
.header-row {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background-image: url('assets/TopBar.png');
  /* Optional texture */
  background-size: cover;
  z-index: 100;
  border-bottom: var(--border);
}

/* Forces all links in the header to be black */
.header-row a {
  color: #000000 !important;
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

/* Hover effect for the Work/About links */
.header-row .nav-links a {
  opacity: 0.6;
  transition: opacity 0.2s;
}

.header-row .nav-links a:hover {
  opacity: 1;
}

/* --- TASK 3: BENTO LINKS & THUMBNAILS --- */
.table-row {
  cursor: pointer;
}

/* Makes entire launch row look clickable */
.table-row a {
  text-decoration: none;
  color: inherit;
  display: contents;
}

/* --- ESPORTS BENTO THUMBNAILS --- */
.bento-list li {
  /* Just ensuring the list items layout properly */
  display: flex;
  flex-direction: column;
  margin-bottom: 25px;
}

.bento-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  /* This forces a standard, taller video thumbnail shape */
  object-fit: cover;
  /* Ensures the image fills the new height without warping */
  border-radius: 4px;
  /* Adds a clean, slight rounding to the corners */
  margin-bottom: 12px;
  filter: grayscale(40%) brightness(0.8);
  /* Keeps them moody to match the site */
  transition: filter 0.3s var(--spring), transform 0.3s var(--spring);
}

/* Lights up on hover so they feel clickable */
.bento-list li:hover .bento-thumb {
  filter: grayscale(0%) brightness(1);
}

.bento-list strong a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}

.bento-list strong a:hover {
  color: var(--muted);
}

/* --- RESUME & EXPERIENCE SECTION --- */
.resume-row {
  display: flex;
  flex-wrap: wrap;
  padding: 40px;
  border-bottom: var(--border);
  transition: background 0.3s var(--spring), padding-left 0.3s var(--spring);
  /* Prepping for when you add the dedicated pages later */
  cursor: pointer;
}

.resume-row:hover {
  background: #080808;
  padding-left: 50px;
  /* Slight indent on hover to feel interactive */
}

.resume-meta {
  flex: 0 0 25%;
  /* Takes up the left 1/4 of the row */
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.resume-meta strong {
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.resume-content {
  flex: 1;
  /* Takes up the remaining space */
}

.resume-content h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #fff;
}

/* Mobile Responsiveness for Resume */
@media (max-width: 768px) {
  .resume-meta {
    flex: 0 0 100%;
    margin-bottom: 20px;
  }
}

/* --- SKILLS & CAPABILITIES SECTION --- */
.skills-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
}

.skill-header {
  width: 100%;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 30px;
  margin-bottom: 5px;
  border-bottom: var(--border);
  padding-bottom: 8px;
  letter-spacing: 0.05em;
}

/* We don't want a massive top margin on the very first header */
.skills-wrapper .skill-header:first-child {
  margin-top: 0;
}

.skill-tag {
  background: #080808;
  border: var(--border);
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 4px;
  /* Keeps the sharp, modern agency feel */
  transition: border-color 0.3s var(--spring), transform 0.3s var(--spring);
  cursor: default;
}

.skill-tag:hover {
  border-color: #fff;
  transform: translateY(-2px);
}

/* =========================================
   MOBILE RESPONSIVE RULES (MAX-WIDTH: 768px)
   ========================================= */
@media (max-width: 768px) {
  
  /* 1. Stack the layout vertically */
  .row, .header-row, .table-row, .resume-row {
    flex-direction: column !important;
  }

  /* 2. Override the desktop 40/60 splits to take up 100% width */
  .col, .media-col {
    flex: 100% !important;
    padding: 25px !important; /* Shrinks the massive desktop padding */
  }

  /* 3. Hero Video needs to stay flush to the edges */
  .media-col {
    padding: 0 !important; 
  }

  /* 4. Navigation & Header */
  .header-row {
    gap: 15px;
    align-items: flex-start;
  }

  /* 5. Junji Ito Gallery -> Stacks the 3 thumbnails */
  .ito-gallery {
    grid-template-columns: 1fr; 
  }

  /* 6. Junji Ito Metrics -> Stacks the numbers */
  .metrics-grid {
    flex-direction: column;
    gap: 15px;
  }

  /* 7. Launch Highlights Table Fix */
  .table-col {
    padding: 20px !important;
    border-right: none !important; /* Removes the vertical dividers */
    border-bottom: var(--border);  /* Adds horizontal dividers instead */
  }
  .table-col:last-child {
    border-bottom: none;
  }

  /* 8. Resume Section Fix */
  .resume-meta {
    flex: 100%;
    margin-bottom: 15px;
  }
  .resume-row:hover {
    padding-left: 25px; /* Less intense hover shift on mobile */
  }

  /* 9. Roles Bar (Creative Strategist, etc) */
  .roles-bar {
    align-items: flex-start;
    gap: 15px;
  }
}