:root {
  color-scheme: dark;
  --bg: #071019;
  --surface: #0b1823;
  --surface-2: #101f2b;
  --card: #122430;
  --line: rgba(113, 165, 190, 0.25);
  --line-strong: rgba(66, 217, 232, 0.44);
  --text: #f2f7fa;
  --muted: #93a8b5;
  --cyan: #42d9e8;
  --purple: #a98bff;
  --amber: #ffb84d;
  --radius: 16px;
  --content: min(1320px, calc(100% - 64px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(66, 217, 232, 0.065), transparent 60%),
    radial-gradient(760px 520px at 90% 8%, rgba(169, 139, 255, 0.04), transparent 62%),
    linear-gradient(180deg, #071019, #040b12 70%);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(66, 217, 232, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 217, 232, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  width: var(--content);
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand strong { letter-spacing: 0.04em; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(66, 217, 232, 0.13);
}
.nav-links { display: flex; align-items: stretch; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  position: relative;
  padding: 25px 13px 22px;
  color: #c1ced6;
  font-size: 0.88rem;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a:focus-visible, .nav-links .active { color: var(--cyan); }
.nav-links .active::after {
  position: absolute;
  right: 13px;
  bottom: 12px;
  left: 13px;
  height: 2px;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(66, 217, 232, 0.5);
}

.page-shell { width: var(--content); margin: 0 auto; }
.hero {
  position: relative;
  min-height: 387px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: var(--surface);
}
.hero-art { width: 100%; height: 387px; display: block; object-fit: cover; object-position: center; }
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 10, 16, 0.04), rgba(4, 10, 16, 0.18) 48%, rgba(4, 10, 16, 0.88)),
    linear-gradient(90deg, rgba(4, 10, 16, 0.28), transparent 60%);
}
.identity-panel {
  position: absolute;
  left: 28px;
  bottom: 0;
  min-width: 470px;
  display: grid;
  grid-template-columns: 138px 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 26px 18px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(8, 22, 33, 0.96), rgba(6, 17, 26, 0.92));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}
.identity-panel a { border-radius: 50%; }
.avatar {
  width: 138px;
  aspect-ratio: 1;
  display: block;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 26px rgba(66, 217, 232, 0.17);
}
.identity-panel h1 { margin-bottom: 8px; font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1; }
.identity-panel p { margin-bottom: 0; color: #bed0da; font-size: 1.05rem; }

.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.quick-links a {
  min-height: 104px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(13, 31, 43, 0.96), rgba(7, 18, 27, 0.96));
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.quick-links a:hover, .quick-links a:focus-visible { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25); }
.quick-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--cyan); border-radius: 50%; color: var(--cyan); font-size: 1.45rem; }
.quick-links strong, .quick-links small { display: block; }
.quick-links strong { font-size: 1.08rem; }
.quick-links small { margin-top: 3px; color: var(--muted); }
.quick-links b { color: var(--cyan); font-size: 2rem; font-weight: 300; }

.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 14px; margin-top: 14px; }
.main-column { display: grid; gap: 14px; min-width: 0; }
.panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(12, 29, 41, 0.96), rgba(7, 18, 27, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
}
.video-section, .screenshots-section, .now-column, .projects-section { padding: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.panel-heading h2 { margin: 0; font-size: 1.25rem; }
.panel-heading a { color: var(--cyan); font-size: 0.9rem; font-weight: 750; text-decoration: none; }
.heading-icon { color: var(--cyan); margin-right: 7px; }
.loading-state { min-height: 130px; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }

.video-news-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr); gap: 14px; align-items: stretch; }
.latest-video { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #03080d; }
.youtube-frame { position: relative; aspect-ratio: 16 / 9; background: #03080d; }
.youtube-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-details { padding: 12px 14px 14px; }
.video-details strong { display: block; font-size: 1rem; }
.video-details p { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }
.game-news-preview { min-width: 0; display: flex; flex-direction: column; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: rgba(8, 22, 32, 0.74); }
.game-news-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.game-news-heading .eyebrow { margin-bottom: 4px; }
.game-news-heading h3 { margin: 0; font-size: 1.02rem; }
.news-pulse { width: 9px; height: 9px; flex: 0 0 9px; margin-top: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px rgba(255, 184, 77, 0.52); }
.game-news-list { display: grid; align-content: start; flex: 1; }
.game-news-list .loading-state { min-height: 170px; padding: 18px; }
.game-news-item { display: block; padding: 11px 0; border-bottom: 1px solid rgba(113, 165, 190, 0.16); color: var(--text); text-decoration: none; }
.game-news-item:hover strong, .game-news-item:focus-visible strong { color: var(--cyan); }
.game-news-item strong { display: -webkit-box; overflow: hidden; color: #eaf2f6; font-size: 0.84rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; transition: color 160ms ease; }
.game-news-item small { display: block; margin-top: 5px; color: var(--muted); font-size: 0.72rem; }
.game-news-link { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; color: var(--cyan); font-size: 0.84rem; font-weight: 750; text-decoration: none; }
.game-news-link span { font-size: 1.35rem; font-weight: 300; }
.panel-action {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.panel-action span { margin-left: auto; padding-right: 14px; font-size: 1.4rem; }

.screenshots-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.screenshot-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); text-decoration: none; }
.screenshot-card img { width: 100%; aspect-ratio: 16 / 10; display: block; object-fit: cover; transition: transform 220ms ease; }
.screenshot-card:hover img, .screenshot-card:focus-visible img { transform: scale(1.035); }
.screenshot-copy { position: absolute; inset: auto 0 0; padding: 28px 10px 9px; background: linear-gradient(transparent, rgba(2, 8, 13, 0.96)); }
.screenshot-copy strong, .screenshot-copy small { display: block; }
.screenshot-copy strong { color: var(--text); font-size: 0.76rem; text-transform: uppercase; }
.screenshot-copy small { color: #c1d1da; font-size: 0.72rem; }
.screenshot-copy b { position: absolute; right: 9px; bottom: 9px; color: var(--cyan); }

.now-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: hidden;
}
.now-column > * { min-width: 0; max-width: 100%; }
.now-heading { margin-bottom: 0; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px rgba(66, 217, 232, 0.55); }
.bluesky-card, .twitch-card { min-width: 0; max-width: 100%; overflow: hidden; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(8, 22, 32, 0.74); }
.bluesky-card a { min-width: 0; display: block; color: inherit; text-decoration: none; }
.bluesky-card p { max-width: 100%; color: #c7d5dd; font-size: 0.9rem; overflow-wrap: anywhere; word-break: break-word; }
.bluesky-card .bluesky-inline-link { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.bluesky-post-link { display: inline-block; margin-bottom: 8px; color: var(--cyan); font-size: 0.88rem; font-weight: 750; text-decoration: none; }
.eyebrow { display: block; margin-bottom: 10px; color: var(--cyan); font-size: 0.82rem; font-weight: 800; }
.bluesky-time { margin-bottom: 0 !important; color: var(--cyan) !important; }
.twitch-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.twitch-heading h3 { margin: 0; color: var(--purple); }
.stream-status { color: var(--muted); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.stream-status.live { color: var(--amber); }
.twitch-player { min-width: 0; width: 100%; max-width: 100%; overflow: hidden; border-radius: 7px; background: #03080d; }
.twitch-player iframe { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; }
.twitch-meta { max-width: 100%; margin: 12px 0; color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; }
.twitch-link { min-height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(169, 139, 255, 0.38); border-radius: 7px; color: #ddd1ff; font-size: 0.86rem; font-weight: 750; text-decoration: none; }

.projects-section { margin-top: 14px; }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(180deg, rgba(17, 37, 50, 0.95), rgba(8, 22, 32, 0.98)); text-decoration: none; transition: border-color 160ms ease, transform 160ms ease; }
.project-card:hover, .project-card:focus-visible { transform: translateY(-2px); border-color: var(--line-strong); }
.project-image { position: relative; aspect-ratio: 16 / 7.2; display: grid; place-items: center; overflow: hidden; background: #101b27; background-position: center; background-size: cover; }
.project-game-image { background-image: linear-gradient(180deg, rgba(5, 13, 20, 0.05), rgba(5, 13, 20, 0.45)); }
.bot-image { background: radial-gradient(circle at 55% 45%, rgba(169, 139, 255, 0.45), transparent 18%), linear-gradient(135deg, #1f1645, #182746 55%, #151125); }
.bot-image::before { width: 72px; height: 54px; content: ""; border: 2px solid #af9aff; border-radius: 18px; box-shadow: 0 0 28px rgba(169, 139, 255, 0.28); }
.bot-image span { position: absolute; right: 12px; bottom: 10px; color: #bcaeff; font: 700 0.7rem ui-monospace, monospace; }
.bot-image-photo { background: url("/qwertyhouse-assets/img/qwertyhouse-bot-coding.webp") center 28% / cover no-repeat, #101024; }
.bot-image-photo::before { display: none; }
.music-image { grid-template-columns: 1fr 1fr; background: linear-gradient(90deg, #4a4438, #b48b43 50%, #555043); }
.music-play { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: #ff173c; color: white; font-size: 1.6rem; }
.music-note { width: 60px; height: 60px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; color: white; font-size: 1.8rem; }
.project-copy { padding: 16px 18px 18px; }
.project-copy span { display: block; color: var(--cyan); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; }
.project-copy h3 { margin: 18px 0 12px; font-size: 1.08rem; }
.project-copy p { min-height: 48px; margin-bottom: 15px; color: var(--muted); font-size: 0.9rem; }
.project-copy b { color: var(--cyan); font-size: 0.88rem; }

.footer {
  width: var(--content);
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) 1.3fr;
  gap: 36px;
  margin: 28px auto 0;
  padding: 28px 18px 42px;
  border-top: 1px solid var(--line);
}
.footer > div { display: grid; align-content: start; gap: 7px; }
.footer span { color: #718594; font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; }
.footer a { color: #aebdc7; font-size: 0.8rem; text-decoration: none; }
.footer-brand { grid-template-columns: auto 1fr; align-items: center; }
.footer-brand .brand-mark { grid-row: 1 / span 2; }
.footer-brand small { color: var(--muted); }
.footer-status small { color: var(--muted); }
.footer-status b { margin-top: 18px; color: var(--cyan); font-size: 0.78rem; }
.footer-status i { width: 7px; height: 7px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--cyan); }

@media (max-width: 1080px) {
  :root { --content: min(100% - 28px, 1320px); }
  .topbar { align-items: flex-start; flex-direction: column; padding: 16px 0; }
  .nav-links { justify-content: flex-start; }
  .nav-links a { padding: 8px 11px 12px; }
  .nav-links .active::after { right: 11px; bottom: 5px; left: 11px; }
  .dashboard { grid-template-columns: 1fr; }
  .video-news-grid { grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr); }
  .footer { grid-template-columns: repeat(3, 1fr); }
  .footer-brand, .footer-status { grid-column: span 3; }
}

@media (max-width: 720px) {
  :root { --content: 100%; }
  .topbar { width: calc(100% - 28px); }
  .page-shell { width: 100%; }
  .hero { min-height: 351px; border-right: 0; border-left: 0; border-radius: 0; }
  .hero-art { height: 234px; }
  .identity-panel { right: 14px; bottom: 0; left: 14px; min-width: 0; grid-template-columns: 88px 1fr; padding: 14px; border-bottom: 1px solid var(--line-strong); border-radius: 14px; }
  .avatar { width: 88px; }
  .identity-panel h1 { font-size: 1.7rem; }
  .identity-panel p { font-size: 0.88rem; }
  .quick-links, .projects-grid { grid-template-columns: 1fr; margin-right: 14px; margin-left: 14px; }
  .dashboard, .projects-section { margin-right: 14px; margin-left: 14px; }
  .video-news-grid { grid-template-columns: 1fr; }
  .screenshots-grid { grid-template-columns: 1fr; }
  .screenshot-card img { aspect-ratio: 16 / 8; }
  .footer { width: calc(100% - 28px); grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .footer-brand, .footer-status { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.music-visual-embed { padding: 0 !important; display: block !important; grid-template-columns: none !important; background: #0c1320 !important; }
.music-card-embed { width: 100%; height: 100%; border: 0; display: block; }
