/* ==========================================================================
   Slaughterhouse — Authentic GitHub Primer Profile (Dark Default + Light)
   Zero AI clichés · Real Primer Tokens · Live GitHub API
   ========================================================================== */

:root {
  color-scheme: dark;

  --gh-header-bg: rgba(1, 4, 9, 0.84);
  --gh-canvas: #0d1117;
  --gh-card: rgba(13, 17, 23, 0.78);
  --gh-subtle: rgba(21, 27, 35, 0.78);
  --gh-hover: rgba(28, 34, 43, 0.88);
  --gh-btn-bg: #212830;
  --gh-btn-hover: #262c36;
  --gh-border: #30363d;
  --gh-border-muted: #21262d;
  --gh-border-strong: #3d444d;

  --gh-fg: #f0f6fc;
  --gh-fg-muted: #9198a1;
  --gh-fg-subtle: #6e7681;

  --gh-link: #4493f8;
  --gh-tab-accent: #f78166;
  --gh-green: #238636;
  --gh-green-bright: #3fb950;
  --gh-star: #e3b341;
  --gh-crimson: #f85149;

  --hm-0: #161b22;
  --hm-1: #0e4429;
  --hm-2: #006d32;
  --hm-3: #26a641;
  --hm-4: #39d353;

  --font-display: 'Montserrat', 'Inter', system-ui, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Helvetica, Arial, sans-serif;
  --font-hand: 'Caveat', cursive;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

html.light-theme {
  color-scheme: light;

  --gh-header-bg: #f6f8fa;
  --gh-canvas: #ffffff;
  --gh-card: #ffffff;
  --gh-subtle: #f6f8fa;
  --gh-hover: #eff2f5;
  --gh-btn-bg: #f6f8fa;
  --gh-btn-hover: #eff2f5;
  --gh-border: #d1d9e0;
  --gh-border-muted: #d8dee4;
  --gh-border-strong: #818b98;

  --gh-fg: #1f2328;
  --gh-fg-muted: #59636e;
  --gh-fg-subtle: #6e7781;

  --gh-link: #0969da;
  --gh-tab-accent: #fd8c73;
  --gh-green: #1f883d;
  --gh-green-bright: #1a7f37;
  --gh-star: #d4a72c;
  --gh-crimson: #cf222e;

  --hm-0: #ebedf0;
  --hm-1: #9be9a8;
  --hm-2: #40c463;
  --hm-3: #30a14e;
  --hm-4: #216e39;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--gh-canvas);
  color: var(--gh-fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -4%;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13, 17, 23, 0.44) 0%, rgba(13, 17, 23, 0.74) 60%, rgba(13, 17, 23, 0.92) 100%),
    url("images/wall.png") center 38% / cover no-repeat;
  transform: scale(1.05);
  opacity: 0.95;
}

html.light-theme body::before {
  opacity: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 300;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--gh-link);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--gh-link);
  outline-offset: 2px;
}

/* ==========================================================================
   TOP GITHUB PRIMER HEADER & TAB BAR
   ========================================================================== */
.gh-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--gh-header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gh-border);
}

.gh-header-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gh-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gh-octocat {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gh-fg);
}

.gh-octocat svg {
  width: 28px;
  height: 28px;
}

.gh-handle-crumb {
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-fg);
}

/* Instant Theme Toggle Button (Wave Ripple + 360° Half-Swap Spin) */
.theme-orb {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--gh-btn-bg);
  border: 1px solid var(--gh-border);
  color: var(--gh-fg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.theme-orb:hover {
  background: var(--gh-btn-hover);
  border-color: var(--gh-border-strong);
  color: var(--gh-fg);
}

.theme-wave {
  position: absolute;
  inset: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--gh-link);
  opacity: 0;
  pointer-events: none;
}

.theme-orb.is-rippling .theme-wave {
  animation: orb-wave 380ms var(--ease-spring) forwards;
}

@keyframes orb-wave {
  0% { transform: scale(0.5); opacity: 0.35; }
  100% { transform: scale(8); opacity: 0; }
}

.theme-spinner {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.theme-spinner.is-spinning {
  animation: spin-360 380ms var(--ease-spring);
}

@keyframes spin-360 {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(0.75); }
  100% { transform: rotate(360deg) scale(1); }
}

.theme-spinner svg {
  width: 15px;
  height: 15px;
}

.theme-spinner .icon-sun { display: none; }
.theme-spinner .icon-moon { display: block; }
.theme-spinner[data-icon="sun"] .icon-sun { display: block; }
.theme-spinner[data-icon="sun"] .icon-moon { display: none; }

/* GitHub Primer UnderlineNav (exact 48px height, centered hover pill & counter) */
.gh-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.gh-nav::-webkit-scrollbar {
  display: none;
}

.gh-nav-item {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--gh-fg);
  white-space: nowrap;
}

.gh-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  transition: background-color 120ms ease;
}

.gh-nav-item:hover .gh-nav-pill {
  background: rgba(177, 186, 196, 0.12);
}

html.light-theme .gh-nav-item:hover .gh-nav-pill {
  background: rgba(208, 215, 222, 0.32);
}

.gh-nav-pill svg {
  width: 16px;
  height: 16px;
  color: var(--gh-fg-muted);
  flex-shrink: 0;
}

.gh-nav-item.is-active {
  font-weight: 600;
}

.gh-nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gh-tab-accent);
  border-radius: 2px 2px 0 0;
}

.gh-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 2em;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  background: rgba(110, 118, 129, 0.36);
  color: var(--gh-fg);
}

html.light-theme .gh-counter {
  background: rgba(175, 184, 193, 0.28);
}

/* ==========================================================================
   MAIN 2-COLUMN GITHUB PROFILE GRID
   ========================================================================== */
.gh-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* ==========================================================================
   LEFT PROFILE SIDEBAR (GitHub vCard)
   ========================================================================== */
.gh-sidebar {
  min-width: 0;
}

.gh-sidebar-sticky {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gh-avatar-wrap {
  position: relative;
  width: 248px;
  max-width: 100%;
}

.avatar-tilt {
  margin: 0;
  perspective: 700px;
}

.avatar-frame {
  position: relative;
  width: 248px;
  height: 248px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gh-border);
  background: var(--gh-subtle);
  transform-style: preserve-3d;
  transition: transform 160ms ease-out, border-color 180ms ease;
  will-change: transform;
}

.avatar-tilt:hover .avatar-frame {
  border-color: var(--gh-border-strong);
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
}

.avatar-sun {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    140px circle at var(--sx, 35%) var(--sy, 25%),
    rgba(255, 246, 224, 0.28) 0%,
    rgba(255, 224, 166, 0.08) 40%,
    transparent 70%
  );
  mix-blend-mode: screen;
  transition: opacity 200ms ease;
}

.avatar-tilt:hover .avatar-sun {
  opacity: 1;
}

.gh-status-pill {
  position: absolute;
  right: 12px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gh-canvas);
  border: 1px solid var(--gh-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--gh-fg-muted);
}

.gh-vcard-names h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--gh-fg);
}

.gh-vcard-handle {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.25;
  color: var(--gh-fg-muted);
}

.gh-vcard-handle span {
  font-size: 14px;
  color: var(--gh-fg-subtle);
}

.gh-vcard-bio {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 19.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gh-fg);
}

.gh-vcard-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 13px;
  color: var(--gh-fg-muted);
}

.gh-vcard-stats svg {
  width: 15px;
  height: 15px;
  color: var(--gh-fg-subtle);
}

.gh-vcard-stats strong {
  font-weight: 600;
  color: var(--gh-fg);
}

.gh-vcard-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
}

.gh-vcard-details li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.2px;
  color: var(--gh-fg);
  min-width: 0;
}

.gh-vcard-details svg {
  width: 15px;
  height: 15px;
  color: var(--gh-fg-muted);
  flex-shrink: 0;
}

.gh-vcard-details a,
.gh-email-btn {
  color: var(--gh-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.gh-vcard-details a:hover,
.gh-email-btn:hover {
  color: var(--gh-link);
  text-decoration: underline;
}

.gh-side-section {
  padding-top: 14px;
  border-top: 1px solid var(--gh-border-muted);
}

.gh-side-heading {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--gh-fg);
}

.gh-wish-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--gh-subtle);
  border: 1px solid var(--gh-border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gh-fg);
}

.gh-wish-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gh-green-bright);
  flex-shrink: 0;
}

.gh-side-hand {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-hand);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  color: var(--gh-fg-muted);
  transform: rotate(-2deg);
}

/* Track Player Card (Native GitHub Primer Box) */
.music-card {
  padding: 10px 11px;
  border-radius: 6px;
  background: var(--gh-subtle);
  border: 1px solid var(--gh-border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.music-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.music-cover {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--gh-border);
  background: var(--gh-canvas);
  flex-shrink: 0;
}

.music-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-info {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.music-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gh-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  font-size: 11px;
  color: var(--gh-fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.music-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
  width: 10px;
}

.music-eq i {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: var(--gh-fg-subtle);
}

.music-eq i:nth-child(1) { height: 4px; }
.music-eq i:nth-child(2) { height: 9px; }
.music-eq i:nth-child(3) { height: 6px; }

.music-card.is-playing .music-eq i {
  background: var(--gh-green-bright);
  animation: eq-bounce 760ms ease-in-out infinite;
}

.music-card.is-playing .music-eq i:nth-child(2) { animation-delay: 140ms; }
.music-card.is-playing .music-eq i:nth-child(3) { animation-delay: 280ms; }

@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.45); transform-origin: bottom; }
  50% { transform: scaleY(1); transform-origin: bottom; }
}

.music-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gh-fg-muted);
  font-variant-numeric: tabular-nums;
}

.music-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--gh-border);
  cursor: pointer;
  overflow: hidden;
}

.music-bar-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--gh-green-bright);
  border-radius: 999px;
  transition: width 120ms linear;
}

.music-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tr-btn {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--gh-fg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 140ms ease, background-color 140ms ease;
}

.tr-btn:hover {
  color: var(--gh-fg);
  background: var(--gh-hover);
}

.tr-btn svg {
  width: 15px;
  height: 15px;
}

.tr-btn--play {
  width: 32px;
  height: 28px;
  border-radius: 6px;
  background: var(--gh-btn-bg);
  border: 1px solid var(--gh-border);
  color: var(--gh-fg);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.tr-btn--play:hover {
  background: var(--gh-btn-hover);
  border-color: var(--gh-border-strong);
  color: var(--gh-fg);
}

.tr-btn--play svg {
  width: 13px;
  height: 13px;
}

.icon-pause { display: none; }
.tr-btn--play[aria-pressed="true"] .icon-play { display: none; }
.tr-btn--play[aria-pressed="true"] .icon-pause { display: block; }
.tr-btn--play[aria-pressed="true"] {
  border-color: var(--gh-green-bright);
  color: var(--gh-green-bright);
}

.tr-btn--back.is-kicking svg { animation: kick-ccw 360ms var(--ease-spring); }
.tr-btn--fwd.is-kicking svg { animation: kick-cw 360ms var(--ease-spring); }

@keyframes kick-ccw {
  0% { transform: translateX(0); }
  35% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

@keyframes kick-cw {
  0% { transform: translateX(0); }
  35% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

.tr-pop {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translate(-50%, 4px);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--gh-green-bright);
  opacity: 0;
  pointer-events: none;
}

.tr-btn.is-kicking .tr-pop {
  animation: pop-up 420ms var(--ease-spring);
}

@keyframes pop-up {
  0% { opacity: 0; transform: translate(-50%, 4px); }
  30% { opacity: 1; transform: translate(-50%, -8px); }
  100% { opacity: 0; transform: translate(-50%, -14px); }
}

/* ==========================================================================
   RIGHT MAIN COLUMN
   ========================================================================== */
.gh-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.gh-section {
  min-width: 0;
}

.gh-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.gh-sec-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--gh-fg);
}

.gh-sec-sub {
  font-size: 12px;
  color: var(--gh-fg-muted);
}

.gh-sec-link {
  font-size: 12.5px;
  color: var(--gh-link);
}

.gh-sec-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   1. SLHJHHHH / README.md Box (Directional Stack & Games Marquees)
   ========================================================================== */
.gh-readme-box {
  border-radius: 6px;
  border: 1px solid var(--gh-border);
  background: var(--gh-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.gh-readme-bar {
  padding: 10px 16px;
  background: var(--gh-subtle);
  border-bottom: 1px solid var(--gh-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gh-fg-muted);
}

.gh-readme-path strong {
  color: var(--gh-fg);
  font-weight: 600;
}

.gh-readme-path span {
  color: var(--gh-fg-subtle);
}

.gh-readme-tag {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--gh-fg-muted);
}

.gh-readme-body {
  padding: 16px;
}

.readme-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 18px;
  align-items: start;
}

.readme-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.readme-col--games {
  padding-left: 18px;
  border-left: 1px solid var(--gh-border-muted);
  gap: 6px;
}

.panel-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gh-fg-muted);
  margin-bottom: 7px;
}

/* Directional Marquee Infrastructure */
.mq-mask {
  overflow: hidden;
  position: relative;
}

.mq-mask--x {
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.mq-mask--y {
  height: 148px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 11%, #000 89%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 11%, #000 89%, transparent 100%);
}

.mq-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.mq-track--ltr { animation: mq-ltr 16s linear infinite; }
.mq-track--rtl { animation: mq-rtl 26s linear infinite; }

.mq-mask:hover .mq-track,
.mq-mask:hover .mq-vtrack {
  animation-play-state: paused;
}

.mq-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
}

@keyframes mq-ltr {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

@keyframes mq-rtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logo-tile {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 7px;
  border-radius: 6px;
  background: var(--gh-subtle);
  border: 1px solid var(--gh-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.logo-tile:hover {
  border-color: var(--gh-border-strong);
  background: var(--gh-hover);
}

.logo-tile img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-tile--wide {
  width: auto;
  min-width: 60px;
  padding: 6px 10px;
}

.logo-tile--wide img {
  max-height: 24px;
}

/* Enlarged crisp SDL3 tile */
.logo-tile--sdl3 {
  width: auto;
  min-width: 90px;
  padding: 2px 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.logo-tile--sdl3 img {
  height: 40px;
  max-height: 40px;
  transform: scale(1.42);
  filter: brightness(1.48) contrast(1.12);
}

html.light-theme .logo-tile--sdl3 {
  background: var(--gh-subtle);
}

html.light-theme .logo-tile--sdl3 img {
  filter: contrast(1.08);
}

.logo-tile--pixel img {
  image-rendering: pixelated;
}

.logo-tile--gradle img {
  filter: brightness(0) invert(0.92);
}

html.light-theme .logo-tile--gradle img {
  filter: none;
}

.tile-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.tile-dot--main {
  background: var(--gh-green-bright);
}

.tile-dot--prog {
  border: 1.5px solid var(--gh-tab-accent);
  background: transparent;
}

/* Vertical Games Marquee */
.mq-vtrack {
  display: flex;
  flex-direction: column;
  will-change: transform;
  animation: mq-up 18s linear infinite;
}

@keyframes mq-up {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.games-shelf {
  list-style: none;
  margin: 0;
  padding: 0;
}

.game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--gh-border-muted);
}

.game-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.game-ico {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--gh-subtle);
  border: 1px solid var(--gh-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.game-ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-ico--invert img {
  object-fit: contain;
  padding: 2px;
  filter: brightness(0) invert(0.92);
}

html.light-theme .game-ico--invert img {
  filter: none;
}

.game-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--gh-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gh-fg-muted);
  flex-shrink: 0;
}

.primordial-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gh-subtle);
  border: 1px solid var(--gh-border);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gh-fg);
  flex-shrink: 0;
}

.primordial-badge img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

/* ==========================================================================
   2. PINNED PROJECTS (Authentic GitHub Pinned 2x2 Grid)
   ========================================================================== */
.gh-pinned-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gh-pin-card {
  padding: 16px;
  border-radius: 6px;
  border: 1px solid var(--gh-border);
  background: var(--gh-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 140ms ease;
}

.gh-pin-card:hover {
  border-color: var(--gh-border-strong);
}

.gh-pin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gh-pin-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.gh-pin-ico {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--gh-border);
  background: #060608;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gh-pin-ico--dark img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.gh-pin-ico--cover img { width: 100%; height: 100%; object-fit: cover; }
.gh-pin-ico--rook { background: #060b1c; }
.gh-pin-ico--rook img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }

.gh-pin-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-link);
}

.gh-pin-name--link:hover {
  text-decoration: underline;
}

.gh-pin-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--gh-fg-muted);
}

.gh-pin-foot {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--gh-fg-muted);
}

.gh-pin-tags {
  font-size: 11.5px;
  color: var(--gh-fg-subtle);
}

.gh-pin-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
}

.gh-pin-links a {
  color: var(--gh-link);
  font-weight: 500;
}

.gh-pin-links a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   3. CONTRIBUTIONS GRAPH (Authentic GitHub Green Heatmap)
   ========================================================================== */
.gh-contrib-box {
  padding: 16px;
  border-radius: 6px;
  border: 1px solid var(--gh-border);
  background: var(--gh-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
}

.hm-cell {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 2px;
  background: var(--hm-0);
  outline: 1px solid rgba(255, 255, 255, 0.04);
  outline-offset: -1px;
}

html.light-theme .hm-cell {
  outline: 1px solid rgba(27, 31, 35, 0.06);
}

.hm-cell.lv-1 { background: var(--hm-1); }
.hm-cell.lv-2 { background: var(--hm-2); }
.hm-cell.lv-3 { background: var(--hm-3); }
.hm-cell.lv-4 { background: var(--hm-4); }

.hm-cell:hover,
.hm-cell:focus-visible {
  outline: 1px solid var(--gh-fg);
}

.gh-contrib-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.gh-hm-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--gh-fg-muted);
}

.hm-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--hm-0);
}

.hm-swatch.lv-1 { background: var(--hm-1); }
.hm-swatch.lv-2 { background: var(--hm-2); }
.hm-swatch.lv-3 { background: var(--hm-3); }
.hm-swatch.lv-4 { background: var(--hm-4); }

.lang-bar {
  margin-top: 10px;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  gap: 2px;
  background: var(--gh-subtle);
}

.lang-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 11.5px;
  color: var(--gh-fg-muted);
}

.lang-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ==========================================================================
   4. REPOSITORIES (1:1 Native GitHub Repositories List via GitHub API)
   ========================================================================== */
.repo-grid {
  border-top: 1px solid var(--gh-border);
  display: flex;
  flex-direction: column;
}

.gh-repo-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--gh-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.gh-repo-left {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gh-repo-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gh-repo-title {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--gh-link);
}

.gh-repo-title:hover {
  text-decoration: underline;
}

.gh-public-badge {
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--gh-border);
  color: var(--gh-fg-muted);
}

.gh-repo-desc {
  margin: 0;
  max-width: 60ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gh-fg-muted);
}

.gh-repo-meta {
  margin-top: 3px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11.5px;
  color: var(--gh-fg-muted);
}

.gh-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.gh-meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--gh-fg-muted);
  flex-shrink: 0;
}

.gh-lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gh-repo-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.gh-star-group {
  display: inline-flex;
  align-items: stretch;
  border-radius: 6px;
  background: var(--gh-btn-bg);
  border: 1px solid var(--gh-border);
  overflow: hidden;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.gh-star-group:hover {
  background: var(--gh-btn-hover);
  border-color: var(--gh-border-strong);
}

.gh-star-btn {
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gh-fg);
  line-height: 18px;
}

.gh-star-btn svg {
  width: 14px;
  height: 14px;
  color: var(--gh-fg-muted);
}

.gh-star-btn.is-starred svg {
  color: var(--gh-star);
}

.gh-star-caret {
  padding: 0 7px;
  border-left: 1px solid var(--gh-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gh-fg-muted);
}

.gh-star-caret svg {
  width: 11px;
  height: 11px;
}

.gh-spark {
  width: 132px;
  height: 22px;
  display: block;
}

.gh-spark path {
  fill: none;
  stroke: var(--gh-green);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Footer */
.gh-footer {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--gh-border-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gh-fg-subtle);
}

.gh-footer svg {
  width: 18px;
  height: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 250;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--gh-fg);
  color: var(--gh-canvas);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 920px) {
  .gh-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 16px 48px;
  }

  .gh-sidebar-sticky {
    position: static;
  }

  .gh-avatar-wrap,
  .avatar-frame {
    width: 136px;
    height: 136px;
  }

  .gh-status-pill {
    right: 4px;
    bottom: 4px;
    width: 30px;
    height: 30px;
  }

  .readme-split {
    grid-template-columns: 1fr;
  }

  .readme-col--games {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid var(--gh-border-muted);
  }
}

@media (max-width: 640px) {
  .gh-header-top,
  .gh-nav {
    padding-left: 16px;
    padding-right: 16px;
  }

  .gh-pinned-grid {
    grid-template-columns: 1fr;
  }

  .gh-repo-row {
    flex-direction: column;
    gap: 12px;
  }

  .gh-repo-right {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }

  .heatmap-grid {
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mq-track,
  .mq-vtrack { animation: none !important; }
  .mq-group[aria-hidden="true"],
  .games-shelf[aria-hidden="true"] { display: none; }
  .mq-mask { mask-image: none; -webkit-mask-image: none; }
  .mq-mask--y { height: auto; }
  .mq-group { flex-wrap: wrap; }
  .theme-spinner.is-spinning,
  .theme-orb.is-rippling .theme-wave,
  .tr-btn.is-kicking svg,
  .tr-btn.is-kicking .tr-pop { animation: none !important; }
}
