/*
 * // whoami and // now_playing sections, the "why" line and tech tags on the
 * project cards, and the footer console button. Frames come from cards.css.
 */
.home-tone--green { --accent: #3ddc84; --accent-rgb: 61, 220, 132; }

/* ---- // whoami ---- */
.home-about { --trace: #b69bff; padding-top: 64px; padding-bottom: 16px; scroll-margin-top: 24px; }
.home-about + .home-projects { padding-top: 16px; }

.home-about__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  align-items: center;
  gap: 52px;
  padding: 44px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .13), #0a0a10 58%);
}

.home-about__portrait {
  --pcut: 18px;
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  clip-path: polygon(var(--pcut) 0, 100% 0, 100% calc(100% - var(--pcut)), calc(100% - var(--pcut)) 100%, 0 100%, 0 var(--pcut));
  background: #0a0a10;
}

.home-about__portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Scanlines and a soft accent edge on top of the picture. */
.home-about__portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, #00000038 0 1px, transparent 1px 3px),
    linear-gradient(0deg, #0a0a10e6, transparent 38%);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .35);
}

.home-about__portrait figcaption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  color: var(--accent);
  font: 600 11px/1.4 var(--home-mono);
  letter-spacing: .12em;
}

.home-about__cmd {
  margin: 0 0 8px;
  color: #96929f;
  font: 500 12px/1.5 var(--home-mono);
}

.home-about__cmd::before { content: '> '; color: var(--home-pink); }
.home-about__cmd:not(:first-child) { margin-top: 22px; }

.home-about h3 { margin: 0; font: 800 clamp(28px, 3.4vw, 40px)/1.15 var(--home-heading); letter-spacing: .02em; text-transform: uppercase; }
.home-about__role { margin: 6px 0 0; color: var(--accent); font: 500 13px/1.5 var(--home-mono); }
.home-about__story { max-width: 40rem; margin: 0; color: #d6d2c8; font-size: 15px; line-height: 1.7; }

.home-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.home-chips li { padding: 6px 12px; border: 1px solid #ffffff2e; background: #ffffff08; color: #e8e4da; font-size: 12px; line-height: 1.4; }
.home-chips--code li { border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .08); color: var(--accent); font-family: var(--home-mono); }

.home .home-about__hint {
  margin-top: 26px;
  padding: 0;
  border: 0;
  background: none;
  color: #77727f;
  font: 12px/1.5 var(--home-mono);
  cursor: pointer;
}

.home-about__hint:hover { color: var(--accent); }

/* Touch devices have no console key; the footer button still opens it. */
@media (hover: none) and (pointer: coarse) {
  .home-about__hint { display: none; }
}

/* ---- // now_playing ---- */
.home-gaming { --trace: #3ddc84; padding-top: 16px; padding-bottom: 32px; scroll-margin-top: 24px; }
.home-gaming__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

.home-game {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 30px 28px 28px;
  background: linear-gradient(160deg, rgba(var(--accent-rgb), .14), #0a0a10 62%);
}

.home-game__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #3ddc84;
  font: 600 11px/1.4 var(--home-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-game__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: home-game-pulse 2s ease-in-out infinite; }
.home-game--waiting .home-game__status { color: var(--accent); }
.home-game--waiting .home-game__dot { animation: home-game-blink 1s steps(1) infinite; }

.home-game h3 { margin: 14px 0 10px; font: 800 clamp(20px, 2vw, 26px)/1.2 var(--home-heading); overflow-wrap: anywhere; }
.home-game__note { margin: 0 0 18px; color: var(--home-muted); font-size: 14px; line-height: 1.6; }

.home-game__id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: auto 0 0;
  color: #96929f;
  font: 12px/1.5 var(--home-mono);
}

.home-game__id code { color: var(--accent); font: inherit; font-weight: 600; }

.home .home-game__copy {
  padding: 3px 10px;
  border: 1px solid rgba(var(--accent-rgb), .45);
  background: rgba(var(--accent-rgb), .08);
  color: var(--accent);
  font: 11px/1.4 var(--home-mono);
  cursor: pointer;
}

.home-game__copy:hover,
.home-game__copy.is-copied { background: rgba(var(--accent-rgb), .2); }

.home-game__loading { position: relative; height: 6px; margin-top: auto; overflow: hidden; background: #ffffff12; }

.home-game__loading span {
  position: absolute;
  inset: 0 1% 0 0;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .5), var(--accent));
}

.home-game__loading span::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, #ffffffa6, transparent);
  animation: home-game-shimmer 2.4s ease-in-out infinite;
}

.home-game__eta { margin: 10px 0 0; color: #96929f; font: 11px/1.5 var(--home-mono); }
.home-game__link { align-self: flex-start; margin-top: auto; }

@keyframes home-game-pulse { 50% { opacity: .35; } }
@keyframes home-game-blink { 50% { opacity: 0; } }
@keyframes home-game-shimmer { from { transform: translateX(-60px); } to { transform: translateX(1200%); } }

/* ---- Project cards: why + tech ---- */
.home-project__why { max-width: 34rem; margin: -8px 0 14px; color: #c9c4ba; font-size: 14px; line-height: 1.6; }
.home-project__why span { color: var(--accent); font: 500 12px/1.6 var(--home-mono); }
.home-tech { margin: 0 0 22px; color: #96929f; font: 12px/1.5 var(--home-mono); }

/* ---- Footer: console button ---- */
.home-footer .home-footer__console { font-family: var(--home-mono); color: #77727f; }
.home-footer .home-footer__console:hover { color: var(--home-pink); }

@media (max-width: 960px) {
  .home-gaming__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-game--waiting { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .home-about { padding-top: 48px; }
  .home-about__card { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 22px; }
  .home-about__portrait { width: min(100%, 240px); }
  .home-gaming__grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .home-game { min-height: 0; padding: 26px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-game__dot, .home-game__loading span::after { animation: none; }
}
