/* gankmid.co — retro, minimal, responsive */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --bg: #0a0a0c;
  --surface: #12121a;
  --accent: #00ff88;
  --accent-dim: #00aa55;
  /* Lightened for WCAG AA on --bg — Ref: UX-UI-REVIEW 3.1 #2, Usability (contrast) */
  --muted: #888;
  --text: #e0e0e0;
  --pixel: 'Press Start 2P', monospace;
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--pixel);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle scanline overlay (optional, light) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  z-index: 9999;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Layout */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.site-header a {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  /* 44×44px touch targets — Ref: UX-UI-REVIEW 3.1 #5, Quick-reference Design #5 */
  padding: 0.75rem 0.5rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-header a.nav-current::after {
  content: '';
  display: inline-block;
  width: 0.4em;
  height: 1em;
  margin-left: 0.15em;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: cursor-blink 1s step-end infinite;
}

/* Studio name swap: fixed-width window + scrolling text (not used on Home) */
.site-header a.nav-current.nav-studio-enabled {
  position: relative;
  display: inline-block;
}
/* Cursor after text: with absolute children the ::after would sit at start; place it at end */
.site-header a.nav-current.nav-studio-enabled::after {
  position: absolute;
  right: 0;
  left: auto;
  margin-left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.site-header a.nav-current.nav-studio-enabled .nav-label,
.site-header a.nav-current.nav-studio-enabled .nav-studio-wrap {
  position: absolute;
  left: 0;
  top: 0;
  transition: opacity 0.3s ease;
}
.site-header a.nav-current.nav-studio-enabled .nav-label {
  opacity: 1;
  color: var(--accent);
  z-index: 1;
}
.site-header a.nav-current.nav-studio-enabled.nav-showing-studio .nav-label {
  opacity: 0;
  pointer-events: none;
}
.site-header a.nav-current.nav-studio-enabled .nav-studio-wrap {
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  vertical-align: bottom;
  white-space: nowrap;
  z-index: 0;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.site-header a.nav-current.nav-studio-enabled.nav-showing-studio .nav-studio-wrap {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  transition-delay: 0s;
}
.site-header a.nav-current.nav-studio-enabled .nav-studio-wrap .nav-studio-scroll {
  display: inline-block;
  white-space: nowrap;
  padding-right: 0.4em;
  color: #d4a017;
}
.site-header a.nav-current.nav-studio-enabled.nav-showing-studio .nav-studio-wrap .nav-studio-scroll {
  animation: nav-studio-scroll linear forwards;
}
@keyframes nav-studio-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(var(--nav-scroll-end, 0)); }
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

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

.site-footer {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.5rem;
}


.site-footer p {
  margin: 0;
}

/* Home hero */
.hero {
  text-align: center;
  max-width: 90vw;
}

.hero-title {
  font-family: var(--pixel);
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.05em;
  /* Reserve space for two lines so single-line quotes (e.g. "gg ff no re") don’t shift the image */
}

.hero-subheading {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 1.5rem 0;
  font-weight: 400;
  min-height: 3em;
}

.hero-logo-text {
  display: inline-block;
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.2s ease;
}

.hero-logo-text.hero-logo-text--out {
  opacity: 0;
  transform: scale(0.98);
}

.hero-logo-text.hero-logo-text--quote {
  color: var(--accent);
  text-shadow: 0 0 16px rgba(0, 255, 136, 0.4);
}

.hero-visual {
  width: min(640px, 95vw);
  height: min(360px, 53vw);
  max-height: 50vh;
  margin: 0 auto 2rem;
  background: var(--bg) center / cover no-repeat;
  border: 3px solid rgba(0, 255, 136, 0.4);
  border-radius: var(--radius);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.15), inset 0 0 60px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Hero with transparent character art blending into black */
.hero-visual--blend {
  border: none;
  box-shadow: none;
  background: var(--bg);
  max-height: 70vh;
  height: auto;
  min-height: 280px;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-image--character {
  object-fit: contain;
  object-position: center bottom;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, transparent 49%, var(--accent-dim) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, var(--accent-dim) 50%, transparent 51%);
  background-size: 20px 20px;
  opacity: 0.2;
  animation: grid-pulse 4s ease-in-out infinite;
}

.hero-visual--blend::before {
  opacity: 0.06;
}

@keyframes grid-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.25; }
}

.hero-visual .logo-mark {
  font-size: 2rem;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
  z-index: 1;
}

.hero-tag {
  font-size: 0.5rem;
  color: var(--muted);
  margin-top: 0.5rem;
  letter-spacing: 0.2em;
}

.hero-cta {
  margin: 0.75rem 0 0.25rem;
}

.hero-cta-link {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.6rem 1rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
}

.hero-cta-link:hover {
  background: var(--accent);
  color: var(--bg);
}

.hero-contact {
  font-size: 0.5rem;
  color: #fff;
  text-decoration: underline;
  margin: 0 0 1.5rem 0;
  letter-spacing: 0.05em;
}

/* About page */
.about-block {
  max-width: 560px;
  width: 100%;
  font-size: 0.6rem;
  text-align: left;
  line-height: 2;
}

.about-block p {
  margin: 0 0 1rem;
}

/* About page: game + text same width, center-aligned */
.about-main {
  align-items: center;
  padding-top: 4rem;
}

.about-content {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-content--bio-only {
  text-align: left;
}

.about-bio {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text);
}

.about-bio p {
  margin: 0 0 1rem;
}

.about-bio p:last-child {
  margin-bottom: 0;
}

.about-bio a {
  color: var(--accent);
  text-decoration: underline;
}

.about-bio a:hover {
  color: var(--bg);
  background: var(--accent);
}

/* Ref: UX-UI-REVIEW 3.5 #1 — noscript fallback when JS disabled */
.about-noscript {
  display: block;
  padding: 2rem;
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--muted);
  border-radius: var(--radius);
  margin: 1rem auto;
  max-width: 360px;
  font-size: 0.65rem;
  line-height: 1.8;
}

.game-container {
  position: relative;
  width: 100%;
  height: 320px;
  background: #000;
  border: 2px solid var(--muted);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.about-game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.game-overlay[hidden] {
  display: none !important;
}

.game-overlay-panel {
  width: min(100%, 26rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  text-align: center;
  background: rgba(10, 10, 12, 0.82);
  border: 2px solid rgba(0, 255, 136, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.game-overlay-intro,
.game-overlay-status {
  margin: 0;
  font-size: 0.5rem;
}

.game-overlay-intro {
  color: var(--text);
  line-height: 1.8;
}

.game-overlay-status {
  color: var(--accent);
  letter-spacing: 0.08em;
}

.game-overlay-status.dead-status {
  color: #ff3333;
  font-size: 1.5rem;
  text-shadow: 2px 2px 0 #550000, 0 0 10px #ff0000;
  text-transform: uppercase;
  font-weight: bold;
  margin: 1rem 0;
}

.game-overlay-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.game-action-btn {
  font-family: var(--pixel);
  font-size: 0.5rem;
  padding: 0.6rem 0.8rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  cursor: pointer;
}

.game-action-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.game-stop-btn {
  border-color: #ff6b6b;
  color: #ff9d9d;
}

.game-stop-btn:hover {
  background: #ff6b6b;
  color: var(--bg);
}

.game-stop-btn[hidden] {
  display: none;
}

.game-scores {
  font-size: 0.5rem;
  color: var(--muted);
  margin-bottom: 1rem;
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.game-scores .game-top10 {
  text-align: left;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}

.game-website-high {
  display: block;
  margin-bottom: 0.25rem;
}

.game-top10 {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

/* Links */
.links-intro {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0 0 1.25rem;
  max-width: 360px;
}

.links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  text-align: left;
  max-width: 420px;
}

.links-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.links-list .link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.links-list .link-icon {
  width: 1.15em;
  font-size: 1.15em;
  color: var(--accent);
}

.links-list a {
  color: var(--accent);
}

/* OFFLINE aligned in a straight column */
.links-list .link-status {
  min-width: 4.5em;
  text-align: right;
  flex-shrink: 0;
}

/* WCAG AA: #e53935 fails on dark bg; use #f44336 — Ref: UX-UI-REVIEW 3.1 #2 */
.coming-soon {
  color: #f44336;
  cursor: default;
}

/* Links page: gamer-style OFFLINE status indicator */
.link-offline {
  color: #f44336;
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(244, 67, 54, 0.4);
  cursor: default;
}

/* Games page intro — Ref: UX-UI-REVIEW 3.4 #2 */
.games-intro {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 420px;
  text-align: center;
}

/* Games list */
.games-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.games-list li {
  margin: 0;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 2px solid var(--muted);
  border-radius: var(--radius);
  font-size: 0.6rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: left;
}

.game-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.game-card-icon {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.game-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.game-card .title {
  color: var(--accent);
}

.game-card .desc {
  color: var(--muted);
  font-size: 0.55rem;
}

.game-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.25rem;
  font-size: 0.5rem;
}

.game-card-date {
  color: var(--text);
}

/* Game play page (iframe wrapper) */
.game-frame-wrap {
  width: 100%;
  max-width: 1280px;
  height: calc(100vh - 4rem);
  margin-top: 3rem;
  border: 3px solid var(--accent);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.game-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.game-frame-wrap--crappy-bird {
  height: auto;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.6rem;
}

/* Responsive */
/* Nav: abbreviate "Sound Design and Mastering" to "Mastering" on narrow so Links stays on one line */
.nav-label--short {
  display: none;
}

@media (max-width: 600px) {
  .site-header nav { gap: 1rem; }
  .site-header a { font-size: 0.55rem; }
  .hero-visual { width: min(260px, 85vw); height: min(260px, 85vw); }
  .hero-visual .logo-mark { font-size: 1.5rem; }
  .nav-label--full { display: none; }
  .nav-label--short { display: inline; }
  /* Home: larger hero image, less top padding in narrow view */
  .home-page { padding-top: 3rem; }
  .home-page .hero-visual { width: min(320px, 92vw); height: min(320px, 92vw); }
}

/* Home page: larger hero image on wide view */
@media (min-width: 901px) {
  .home-page .hero-visual--blend {
    width: min(860px, 88vw);
  }
}

/* Sound design page: layout and spacing */
.sound-design-page .sound-design-hero {
  margin-bottom: 0;
}

.sound-design-page .hero-title {
  margin-bottom: 0.35rem;
}

.sound-design-page .sound-design-visual {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.sound-design-content {
  margin-top: 0;
}

/* Sound design page: readable prose */
.sound-design-prose {
  max-width: 55ch;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

.sound-design-prose p {
  margin: 0 0 1.25rem;
}

.sound-design-prose p:last-of-type {
  margin-bottom: 0;
}

.sound-design-prose ul {
  margin: 0 0 1.25rem 1.25rem;
  padding: 0;
  list-style: disc;
}

.sound-design-prose li {
  margin-bottom: 0.35rem;
}

.sound-design-prose li:last-child {
  margin-bottom: 0;
}

.sound-design-prose a {
  color: var(--accent);
  text-decoration: underline;
}

.sound-design-prose a:hover {
  color: var(--bg);
  background: var(--accent);
}

.sound-design-cta {
  margin: 1.5rem 0 0;
  text-align: center;
  width: 100%;
}

/* Sound design: on wide screens, larger image with padding */
@media (min-width: 900px) {
  .sound-design-page .sound-design-visual {
    width: min(800px, 75vw);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
    box-sizing: border-box;
  }
}

@media (max-width: 600px) {
  .sound-design-page .sound-design-visual {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after { display: none; }
  .hero-visual::before { animation: none; opacity: 0.2; }
  /* Ref: UX-UI-REVIEW 3.2 #2, Usability (motion) */
  .site-header a.nav-current::after { animation: none; opacity: 1; }
}
