/* ============================================================
   game.css — GAME DESIGN PAGE STYLES
   Loaded by game-design.html on top of style.css.
   Aesthetic: Cyberpunk / dark arcade — neon cyan accents,
   animated grid background, scan-line effect.

   Sections:
     1.  CSS accent variables (override the blue from style.css)
     2.  Hero section
     3.  Philosophy banner
     4.  Projects section wrapper
     5.  Project card (accordion — click header to expand body)
     6.  Design process steps inside a card
     7.  Outcome pills and contribution tags
     8.  Leadership section
     9.  Media gallery (video + screenshots added inside cards)
    10.  Responsive overrides
   ============================================================ */


/* ============================================================
   1. ACCENT COLOUR OVERRIDE
   This page uses cyan instead of blue as its accent.
   These variables override the ones in style.css just for
   elements inside game-design.html.
   ============================================================ */
:root {
  --accent:       #00d4ff;                /* neon cyan — the main highlight */
  --accent-glow:  rgba(0,212,255,0.3);    /* for glow/shadow effects */
  --accent-dim:   rgba(0,212,255,0.1);    /* very faint tint for backgrounds */
  --accent2:      #ff4d6d;                /* a red-pink used sparingly */
}


/* ============================================================
   2. HERO SECTION
   Full-viewport intro with:
   - An animated dot grid background
   - A sweeping scan line that moves top to bottom
   - The big staggered title
   ============================================================ */

.game-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;    /* so the grid, scan line, and content can be positioned */
  overflow: hidden;
  padding-top: 80px;     /* clears the fixed nav */
}

/* --- Animated dot/line grid ---
   Uses two background-image gradients to draw horizontal and
   vertical lines 60px apart, creating a grid.
   animation: gridPulse slowly increases/decreases the opacity
   so the grid seems to breathe. */
.game-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),    /* horizontal lines */
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px); /* vertical lines */
  background-size: 60px 60px; /* grid square size */
  animation: gridPulse 6s ease-in-out infinite;
}

@keyframes gridPulse {
  0%,100% { opacity: 0.5; }
  50%      { opacity: 1;   }
}

/* --- Scan line ---
   A horizontal glowing line that sweeps from top to bottom
   continuously, like an old CRT screen or radar sweep.
   Uses the shared @keyframes scan from style.css. */
.game-hero__scan {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 4s linear infinite; /* 4 second loop */
  opacity: 0.4;
}

/* Content sits above the grid and scan line */
.game-hero__content { position: relative; z-index: 1; }

/* "▶ Game Designer" badge in the top-left */
.game-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.8rem;
}
.game-hero__badge::before { content: '▶'; } /* play icon prefix */

/* Main large heading */
.game-hero__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 9rem);
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 1.5rem;
}
/* The middle line "PROBLEMS" uses outline text */
.game-hero__title em {
  display: block;
  -webkit-text-stroke: 1px var(--accent); /* cyan outline */
  color: transparent;                      /* fill is transparent */
  font-style: normal;
}

/* Hero description paragraph */
.game-hero__desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.game-hero__desc strong { color: var(--text); }

/* Row of three stat numbers */
.game-hero__stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
/* The big number (e.g. "23") — animated by JS counter */
.game-stat__num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--accent);
  line-height: 1;
}
/* The label below the number */
.game-stat__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0.2rem;
}

/* Button row */
.game-hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Filled cyan primary button */
.btn-primary {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: #000;             /* black text on bright cyan background */
  padding: 0.8rem 1.8rem;
  transition: all 0.2s;
}
.btn-primary:hover { background: #fff; } /* goes white on hover */

/* Outlined secondary button */
.btn-outline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--muted);
  color: var(--muted);
  padding: 0.8rem 1.8rem;
  transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--text); color: var(--text); }


/* ============================================================
   3. PHILOSOPHY BANNER
   A dark strip between the hero and the projects.
   Left: a pull-quote. Right: three design pillars.
   ============================================================ */

.philosophy {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

/* Two things side by side: quote (left) and pillars (right) */
.philosophy__inner {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* The block quote on the left side */
.philosophy__quote {
  flex: 1;
  min-width: 280px;             /* won't shrink below 280px */
  border-left: 3px solid var(--accent); /* cyan left border */
  padding-left: 1.5rem;
}
.philosophy__quote p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: var(--text);
  line-height: 1.25;
}
.philosophy__quote cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0.6rem;
  font-style: normal;
}

/* The three pillars on the right in a small grid */
.philosophy__pillars {
  flex: 2;
  min-width: 320px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pillar__icon  { font-size: 1.2rem; margin-bottom: 0.4rem; }
.pillar__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}
.pillar__text  { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }


/* ============================================================
   4. PROJECTS SECTION WRAPPER
   Just gives the section its padding and positions the header.
   ============================================================ */

.projects-section { padding: 6rem 0; }
.projects-section__header { margin-bottom: 4rem; }
.projects-section__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--text);
  line-height: 1;
}


/* ============================================================
   5. PROJECT CARD (ACCORDION)
   Each project is a card that starts collapsed.
   Clicking the header toggles the .open class (added by JS),
   which shows or hides .project-card__body.
   ============================================================ */

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 2px;   /* tiny gap between stacked cards */
  overflow: hidden;
  transition: border-color 0.3s;
}
/* On hover: cyan border glow */
.project-card:hover { border-color: var(--accent); }
/* The first/featured project has a slightly brighter default border */
.project-card.featured { border-color: rgba(0,212,255,0.25); }

/* The clickable header row */
.project-card__header {
  padding: 2rem 2.5rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  cursor: pointer; /* shows hand cursor to indicate it's clickable */
}

/* The row of small meta labels (number + type) */
.project-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.project-card__num  { font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent); }
.project-card__type { font-family: var(--font-mono); font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* The large project title */
.project-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  color: var(--text);
}

/* Engine badge (e.g. "Unreal Engine · 2024") */
.project-card__engine {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
  align-self: flex-start; /* doesn't stretch to full height */
}

/* "Case Study ▾" toggle label */
.project-card__expand {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: color 0.2s;
}
.project-card__expand:hover { color: var(--accent); }

/* The ▾ arrow that rotates 180° when the card is open */
.project-card__arrow {
  display: inline-block;
  transition: transform 0.3s;
}
/* When .open is on the card, the arrow spins to point up */
.project-card.open .project-card__arrow { transform: rotate(180deg); }

/* The expandable body — hidden by default, shown when .open is added */
.project-card__body {
  display: none;  /* JS toggles this by adding/removing .open on the parent card */
  padding: 0 2.5rem 2.5rem;
}
.project-card.open .project-card__body { display: block; }


/* ============================================================
   6. DESIGN PROCESS STEPS (inside the card body)
   Three boxes side by side: Problem → Process → Result.
   ::after adds an arrow between each box (removed on last child).
   ============================================================ */

.design-process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Each step is positioned relatively so the arrow can be placed absolutely */
.process-step { position: relative; }

/* Arrow between steps — uses CSS ::after pseudo-element */
.process-step::after {
  content: '→';
  position: absolute;
  right: -1rem;   /* sits in the gap between steps */
  top: 1.2rem;
  color: var(--accent);
  font-size: 0.8rem;
}
/* Remove the arrow from the last step (no arrow after "Result") */
.process-step:last-child::after { display: none; }

/* Small coloured label above each step box (e.g. "🔴 Problem") */
.process-step__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* The content box itself */
.process-step__content {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}
/* Bold words inside the process box are highlighted cyan */
.process-step__content strong { color: var(--accent); font-weight: 600; }


/* ============================================================
   7. OUTCOME PILLS + CONTRIBUTION TAGS
   Outcome pills: cyan bordered tags below the process steps
   Contribution tags: smaller plain tags showing what you did
   ============================================================ */

/* Row of outcome pills */
.project-outcomes {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
/* Each pill: cyan background tint + cyan border */
.outcome-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
}

/* Contributions section at the bottom of each card */
.project-card__contributions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.contributions-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.contributions-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* Each contribution tag: subtle white tint */
.contrib-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.25rem 0.65rem;
}


/* ============================================================
   8. LEADERSHIP SECTION
   Dark surface background with a 4-column stat grid.
   Each card shows a big number and description.
   ============================================================ */

.leadership-section { padding: 6rem 0; background: var(--surface); }

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.leadership-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.8rem;
  transition: border-color 0.3s;
}
.leadership-card:hover { border-color: var(--accent); }

/* Large coloured number at the top of each card */
.leadership-card__num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.leadership-card__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.8rem;
}
.leadership-card__desc { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }


/* ============================================================
   9. GAME MEDIA GALLERY
   Added inside each project card body.
   Contains:
   - A video area with two tabs: file upload and YouTube URL embed
   - A 4-slot screenshot strip with lightbox on click
   ============================================================ */

/* Container for the whole media block */
.game-media {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Section title inside the media block */
.game-media__title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* --- Tab buttons: "Upload Video" and "YouTube / URL" ---
   These switch which panel is visible. The active class
   is applied by the switchTab() JS function. */
.media-tabs { display: flex; gap: 0; margin-bottom: 0.5rem; }
.media-tab {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  margin-right: -1px; /* overlap borders so they don't double up */
}
/* Active tab gets a cyan highlight */
.media-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  z-index: 1; /* sits on top so its border doesn't get covered */
}

/* --- Video area ---
   16:9 aspect ratio container for either a video element
   or an iframe (YouTube embed). 
   .has-media removes the dashed border once something is loaded. */
.media-video-area {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg2);
  border: 2px dashed rgba(0,212,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.8rem;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: border-color 0.3s, background 0.3s;
  overflow: hidden;
  position: relative;
}
.media-video-area:hover { border-color: var(--accent); background: var(--accent-dim); }
.media-video-area.has-media { border: none; } /* remove border when video is loaded */
/* Video fills the area and maintains aspect ratio */
.media-video-area video {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* The URL input box and embed button, shown in the "YouTube / URL" tab */
.media-url-form {
  display: flex;
  gap: 0.5rem;
  width: 80%;
  max-width: 480px;
}
.media-url-form input[type="text"] {
  flex: 1;                  /* takes all available width */
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.5rem 0.8rem;
  outline: none;
  min-width: 0;             /* allows flex item to shrink below content width */
}
.media-url-form input:focus { border-color: var(--accent); }
.media-url-form button {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  white-space: nowrap;
}

/* Placeholder hint text shown before a video is uploaded */
.media-placeholder-hint {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.media-placeholder-hint span {
  display: block;
  font-size: 0.55rem;
  color: rgba(255,255,255,0.2);
  margin-top: 0.3rem;
}
.media-placeholder-icon { font-size: 2rem; opacity: 0.4; }

/* --- Screenshot strip ---
   4 equal-width slots in a row. Each slot is a 16:9 box.
   Clicking a slot triggers a hidden file input (via JS triggerSS()). */
.media-screenshots {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 equal columns */
  gap: 4px;
}

.screenshot-slot {
  aspect-ratio: 16/9;
  background: var(--bg2);
  border: 1px dashed rgba(0,212,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s;
}
.screenshot-slot:hover { border-color: var(--accent); }
/* Once an image is loaded, it fills the slot */
.screenshot-slot img { width: 100%; height: 100%; object-fit: cover; }

/* Hint text inside empty slots */
.screenshot-slot .ss-hint {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: rgba(255,255,255,0.2);
  text-align: center;
  pointer-events: none;
}
.screenshot-slot svg { opacity: 0.25; }

/* Hidden file input — triggered programmatically by triggerSS() in JS */
input.ss-file-input { display: none; }


/* --- Lightbox overlay ---
   A full-screen black overlay with the clicked screenshot at full size.
   JS adds/removes .open to show/hide it. */
.lightbox {
  display: none;       /* hidden by default */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 999;        /* above absolutely everything */
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }  /* shown when JS adds .open */

/* The enlarged image inside the lightbox */
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* Close button in the top-right corner */
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}


/* ============================================================
   10. RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 640px) {
  /* Philosophy pillars: 2 columns instead of 3 on small screens */
  .philosophy__pillars { grid-template-columns: 1fr 1fr; }

  /* Process steps: stack vertically (remove arrows) */
  .design-process { grid-template-columns: 1fr; }
  .process-step::after { display: none; }

  /* Screenshots: 2 per row instead of 4 */
  .media-screenshots { grid-template-columns: repeat(2, 1fr); }
}
