/* ============================================================
   robot fantôme — robotfantome.com
   GitHub profile layout · Cyberpunk cool accents
   Font: Share Tech Mono · Palette: cool watercolour — teal/blue/violet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

/* ── Custom Properties ─────────────────────────────────────────
   BRAND PALETTE — Absolutely Plausible / Robot Fantôme
   Cool watercolour identity: teal → blue → violet, anchored by the
   AP logo steel-blue. This is the brand standard for every surface.
   ─────────────────────────────────────────────────────────────── */
:root {
  /* ── Page background — faint cool paper ── */
  --bg:            #eef0f2;

  /* ── Card surfaces (light) ── */
  --bg-surface:    #ffffff;
  --bg-card:       #f5f6f9;
  --bg-overlay:    #e9ebef;

  /* ── Brand accents — from the watercolour + AP logo ── */
  --accent:        #3f7d9c;   /* AP logo steel-blue — primary */
  --accent-mid:    #4b5fa8;   /* watercolour indigo-blue — secondary */
  --accent-deep:   #6a4f9e;   /* watercolour violet — deepest */
  --accent-teal:   #5cb0ad;   /* watercolour top teal — highlight */
  --accent-hover:  #5b9bb8;   /* lifted steel-blue for link hover */

  /* ── Text & borders (cool dark on light) ── */
  --color-text:    #1e2238;
  --color-muted:   #5f6480;
  --color-border:  #d6d8e0;

  /* ── Aliases (kept for compatibility) ── */
  --page-text:     #1e2238;
  --page-muted:    #5f6480;
  --page-border:   #d6d8e0;
  --color-link:    #3f7d9c;

  --font:          'Share Tech Mono', 'Courier New', monospace;
  --radius:        6px;
  --glow-accent:   0 0 6px #3f7d9c44, 0 0 18px #3f7d9c1f;
  --glow-mid:      0 0 6px #4b5fa844, 0 0 18px #4b5fa81f;
  --card-shadow:   0 1px 3px rgba(30,34,56,0.10), 0 0 0 1px var(--color-border);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--page-text);
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle CRT scanlines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,0.03) 3px, rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.15s, text-shadow 0.15s;
}
a:hover { color: var(--accent-hover); }

/* ── Animations ────────────────────────────────────────────── */
/* Occasional glitch burst — idle (clipped away) for most of the cycle */
@keyframes glitch {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0,0); }
  87%  { clip-path: inset(15% 0 60% 0); transform: translate(-2px,0); }
  90%  { clip-path: inset(62% 0 12% 0); transform: translate(2px,0); }
  93%  { clip-path: inset(34% 0 44% 0); transform: translate(-1px,0); }
  96%  { clip-path: inset(78% 0 8% 0);  transform: translate(1px,0); }
}
@keyframes flicker {
  0%,19%,21%,23%,25%,54%,56%,100% { opacity: 1; }
  20%,24%,55% { opacity: 0.82; }
}
@keyframes scan {
  0%   { top: -2px; }
  100% { top: 100%; }
}

/* ── Top Nav ───────────────────────────────────────────────── */
.gh-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #e7e9ee;
  border-bottom: 1px solid var(--page-border);
  height: 62px;
  display: flex;
  align-items: center;
}

.gh-nav-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gh-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-shadow: var(--glow-accent);
  animation: flicker 10s infinite;
  white-space: nowrap;
  flex-shrink: 0;
}
.gh-nav-logo { color: var(--accent); flex-shrink: 0; }
.gh-nav-brand-text {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gh-nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 1rem;
}
.gh-nav-links a {
  color: var(--page-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.gh-nav-links a:hover {
  color: var(--page-text);
  background: #d9dbe3;
  text-shadow: none;
}
.gh-nav-links a.active {
  color: var(--accent);
  background: #ede9e3;
  text-shadow: var(--glow-accent);
}

.gh-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
}
.gh-nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--page-muted);
  transition: transform 0.2s, opacity 0.2s;
}
.gh-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.gh-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.gh-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.gh-nav-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.gh-nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  object-fit: cover;
  transition: border-color 0.15s;
}
.gh-nav-avatar:hover { border-color: var(--accent); }

/* ── Layout ────────────────────────────────────────────────── */
.gh-layout {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding: 0 1rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
/* Profile sidebar shows only on the About tab */
.gh-layout.show-sidebar {
  grid-template-columns: 296px 1fr;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.gh-sidebar {
  position: sticky;
  top: 78px;
  display: none;
  flex-direction: column;
  gap: 1rem;
}
.gh-layout.show-sidebar .gh-sidebar {
  display: flex;
}

.gh-avatar-wrap {
  position: relative;
  width: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-border);
  box-shadow: 0 0 0 1px #3f7d9c33;
  aspect-ratio: 1;
}
.gh-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.7) contrast(1.05);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.gh-avatar.loaded { opacity: 1; }

.gh-display-name {
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--page-text);
  line-height: 1.25;
  margin-top: 0.25rem;
}

.gh-handle {
  font-size: 1rem;
  color: var(--page-muted);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

.gh-bio {
  font-size: 0.82rem;
  color: var(--page-text);
  line-height: 1.6;
  border-top: 1px solid var(--page-border);
  padding-top: 1rem;
}

.gh-follow-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.3rem 0.75rem;
  background: #e3e5ec;
  border: 1px solid var(--page-border);
  border-radius: var(--radius);
  color: var(--page-text);
  font-family: var(--font);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.gh-follow-btn:hover {
  border-color: var(--accent);
  background: #d9dbe3;
  color: var(--page-text);
  text-shadow: none;
}

.gh-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--page-border);
  padding-top: 1rem;
}
.gh-meta li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--page-text);
  line-height: 1.5;
}
.gh-meta-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
  fill: var(--page-muted);
  color: var(--page-muted);
}
.gh-meta a { color: var(--color-link); }
.gh-meta a:hover { color: var(--accent-hover); }

.gh-sidebar-section {
  border-top: 1px solid var(--page-border);
  padding-top: 1rem;
}
.gh-sidebar-title {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-mid);
  text-shadow: var(--glow-mid);
  margin-bottom: 0.75rem;
}

/* Social grid (sidebar) */
.social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.social-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #e3e5ec;
  border: 1px solid var(--page-border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.social-grid a:hover {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(63,125,156,0.18);
  transform: translateY(-2px);
}
.social-grid img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) opacity(0.55);
  transition: filter 0.15s;
}
.social-grid a:hover img {
  filter: brightness(0) saturate(100%) invert(44%) sepia(48%) saturate(520%) hue-rotate(162deg) brightness(91%) contrast(88%);
}

/* Language list in sidebar */
.gh-lang-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.gh-lang-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--page-text);
}
.gh-lang-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Main Content ──────────────────────────────────────────── */
.gh-main {
  min-width: 0;
}


/* ── Panels ────────────────────────────────────────────────── */
.gh-panel { display: none; }
.gh-panel.active { display: block; }

.gh-panel-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--page-border);
}
.gh-panel-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--page-text);
  line-height: 1.1;
  position: relative;
  display: inline-block;
}
.gh-panel-title::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: 0.4rem;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: var(--glow-accent);
}
.gh-panel-body {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--page-text);
  max-width: 680px;
  margin-bottom: 1.25rem;
}
.gh-panel-image {
  width: 100%;
  margin-top: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.gh-panel-image.loaded { opacity: 1; }

/* ── README card (Overview) ────────────────────────────────── */
.gh-readme {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.gh-readme-header {
  background: var(--bg-overlay);
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gh-readme-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}
.gh-readme-body {
  background: var(--bg-surface);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Scan line in readme */
.gh-readme-body::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-teal), transparent);
  animation: scan 8s linear infinite;
  opacity: 0.4;
  pointer-events: none;
}

/* ── Pinned grid ───────────────────────────────────────────── */
.gh-pinned-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.gh-pinned-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--page-muted);
  font-weight: normal;
}

.gh-pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.gh-pinned-card {
  background: var(--bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  box-shadow: var(--card-shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gh-pinned-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(63,125,156,0.14), 0 0 0 1px var(--accent);
}
.gh-pinned-name {
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.gh-pinned-desc {
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1.5;
  flex: 1;
}
.gh-pinned-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.gh-lang-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--color-muted);
}

/* ── Hero (inside README card) ─────────────────────────────── */
.hero-prefix {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--accent-mid);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  text-shadow: var(--glow-mid);
}
.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--page-text);
  text-shadow: 0 0 16px #3f7d9c33, 0 0 40px #3f7d9c11;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}
.hero-title::before, .hero-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-title::before {
  color: var(--accent);
  animation: glitch 6s infinite linear;
  opacity: 0.4;
}
.hero-title::after {
  color: var(--accent-deep);
  animation: glitch 7.3s infinite linear;
  animation-delay: -2.5s;
  opacity: 0.3;
}
.hero-subtitle {
  font-size: clamp(0.6rem, 2vw, 0.85rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--page-muted);
  margin-bottom: 2rem;
  display: block;
}
.hero-image {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.8s ease;
  box-shadow: 0 0 24px rgba(63,125,156,0.06);
}
.hero-image.loaded { opacity: 1; }

/* ── CC Notice ─────────────────────────────────────────────── */
.cc-notice {
  font-size: 0.62rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.75rem;
  letter-spacing: 0.04em;
}
.cc-notice a { color: var(--color-muted); text-decoration: underline; }
.cc-notice a:hover { color: var(--accent); text-shadow: none; }

/* ── Opensource links ──────────────────────────────────────── */
.opensource-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.opensource-links li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.opensource-links li::before {
  content: '//';
  font-size: 0.65rem;
  color: var(--accent-mid);
  flex-shrink: 0;
  text-shadow: var(--glow-mid);
}
.opensource-links a {
  font-size: 0.85rem;
  color: var(--page-text);
  border-bottom: 1px solid var(--page-border);
  padding-bottom: 0.1rem;
  transition: color 0.15s, border-color 0.15s;
}
.opensource-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Sustainability links ──────────────────────────────────── */
.sustainability-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.sustainability-links li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.sustainability-links li::before {
  content: '>_';
  font-size: 0.65rem;
  color: var(--accent);
  flex-shrink: 0;
}
.sustainability-links a {
  font-size: 0.85rem;
  color: var(--page-text);
}
.sustainability-links a:hover { color: var(--accent); }

/* ── Mix-Tape ──────────────────────────────────────────────── */
.mixtape-featured {
  background: var(--bg-surface);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
}
.mixtape-featured-title {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: var(--glow-accent);
  margin-bottom: 0.4rem;
}
.mixtape-featured-desc {
  font-size: 0.75rem;
  color: var(--color-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.mixtape-featured a {
  font-size: 0.82rem;
  color: var(--accent-mid);
  text-shadow: var(--glow-mid);
}
.mixtape-image {
  width: 100%;
  max-width: 480px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  filter: saturate(0.75) contrast(1.05);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.mixtape-image.loaded { opacity: 1; }
.mixtape-artists {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.5rem;
}
.artist-entry {
  background: var(--bg-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--accent-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.6rem 0.875rem;
  transition: border-left-color 0.15s, box-shadow 0.15s;
}
.artist-entry:hover {
  border-left-color: var(--accent);
  box-shadow: -2px 0 10px rgba(63,125,156,0.18);
}
.artist-name {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}
.artist-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 0.75rem;
}
.artist-links a { color: var(--color-muted); }
.artist-links a:hover { color: var(--accent); }

/* ── Resume blocks (About panel) ───────────────────────────── */
.resume-block { margin-top: 2rem; }
.resume-block-title {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-mid);
  text-shadow: var(--glow-mid);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* ── Timeline ──────────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 1.25rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0.5rem; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--accent-deep) 60%, transparent 100%);
  opacity: 0.35;
}
.timeline-entry {
  position: relative;
  padding: 0.875rem 0 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.timeline-entry:last-child { border-bottom: none; }
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -1.55rem; top: 1.35rem;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: var(--glow-accent);
}
.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.15rem;
}
.timeline-company {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}
.timeline-company a { color: var(--accent); }
.timeline-company a:hover { color: var(--accent-hover); }
.timeline-location {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--page-muted);
}
.timeline-role {
  font-size: 0.8rem;
  color: var(--page-text);
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}
.timeline-dates {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--page-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.timeline-dates a { color: var(--accent-mid); }
.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.timeline-bullets li {
  font-size: 0.78rem;
  color: var(--page-muted);
  line-height: 1.55;
  padding-left: 1rem;
  position: relative;
}
.timeline-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent-mid);
}

/* ── Skills list ───────────────────────────────────────────── */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.skills-list li {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-left: 2px solid var(--accent-mid);
  padding: 0.25rem 0.6rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ── Absolutely Plausible ──────────────────────────────────── */
.ap-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 580px) {
  .ap-layout { grid-template-columns: 140px 1fr; align-items: start; }
}
.ap-logo {
  width: 100%;
  max-width: 140px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  filter: saturate(0.6);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.ap-logo.loaded { opacity: 1; }
.ap-est {
  font-size: 0.7rem;
  color: var(--page-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
/* ── Gallery ───────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  margin-top: 0.25rem;
}
.gallery-item {
  margin: 0;
  background: var(--bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.gallery-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(63,125,156,0.16), 0 0 0 1px var(--accent);
  transform: translateY(-2px);
}
.gallery-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  filter: saturate(0.85) contrast(1.03);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.gallery-image.loaded { opacity: 1; }
.gallery-caption {
  font-size: 0.62rem;
  color: var(--color-muted);
  letter-spacing: 0.03em;
  line-height: 1.5;
  padding: 0.5rem 0.6rem 0.6rem;
}
.gallery-caption a { color: var(--color-muted); text-decoration: underline; }
.gallery-caption a:hover { color: var(--accent); text-shadow: none; }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--page-border);
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
}
.footer-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 1px;
  background: var(--accent);
  box-shadow: var(--glow-accent);
}
.footer-license {
  font-size: 0.62rem;
  color: var(--page-muted);
  letter-spacing: 0.05em;
  line-height: 2;
}
.footer-license a { color: var(--page-muted); text-decoration: underline; }
.footer-license a:hover { color: var(--accent); text-shadow: none; }
.footer-version {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-mid);
  text-shadow: var(--glow-mid);
  border: 1px solid var(--color-border);
  padding: 0.15rem 0.6rem;
  border-radius: 2em;
}

/* ── Responsive ────────────────────────────────────────────── */
/* Nav collapses to a menu before the seven tabs would crowd. */
@media (max-width: 1000px) {
  .gh-nav-links { display: none; }
  .gh-nav-toggle { display: flex; margin-left: auto; }
  .gh-nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 62px; left: 0; right: 0;
    background: #e7e9ee;
    border-bottom: 1px solid var(--page-border);
    padding: 0.5rem 1rem;
    gap: 0;
    z-index: 100;
  }
  .gh-nav-links.open a {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--page-border);
  }
  .gh-nav-links.open a:last-child { border-bottom: none; }
}

/* Single-column layout on small screens. */
@media (max-width: 768px) {
  .gh-layout,
  .gh-layout.show-sidebar {
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }
  .gh-sidebar {
    position: static;
  }
  .gh-avatar-wrap {
    width: 64px;
    height: 64px;
    aspect-ratio: unset;
  }
  .gh-profile-names { display: flex; align-items: baseline; gap: 0.75rem; }
  .gh-pinned-grid { grid-template-columns: 1fr; }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero-title::before,
  .hero-title::after,
  .gh-readme-body::after { display: none; }
  .gh-avatar,
  .hero-image,
  .gh-panel-image,
  .mixtape-image,
  .ap-logo { opacity: 1 !important; }
}
