/* RunnerQuan interface polish v5
 * Strengthens inner-page hierarchy, project conversion, accessibility,
 * and responsive presentation while preserving the pixel / orbital identity.
 */

:root {
  --rq-focus-ring: rgba(143, 231, 255, 0.92);
  --rq-grid-faint: rgba(143, 231, 255, 0.045);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--rq-focus-ring) !important;
  outline-offset: 4px !important;
}

.rq-nav .rq-brand,
.rq-nav nav a {
  min-height: 44px;
}

.rq-nav nav a {
  display: inline-flex;
  align-items: center;
  padding-inline: 0.18rem;
}

.rq-menu-button {
  min-width: 44px;
  min-height: 44px;
}

.rq-projects-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
}

.rq-projects-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: -1;
  width: clamp(16rem, 34vw, 30rem);
  aspect-ratio: 1;
  border: 1px solid rgba(143, 231, 255, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 2.4rem rgba(143, 231, 255, 0.025),
    0 0 0 6rem rgba(143, 231, 255, 0.018),
    0 0 5rem rgba(143, 231, 255, 0.06);
  transform: translate(-50%, -50%) rotate(-12deg);
}

.rq-projects-hero::after {
  content: "SYS / PROJECT INDEX";
  position: absolute;
  right: 1.2rem;
  bottom: 0.8rem;
  color: rgba(143, 231, 255, 0.42);
  font: 0.62rem/1 var(--rq-mono);
  letter-spacing: 0.18em;
}

.rq-projects-hero h1 {
  font-family: var(--rq-pixel) !important;
  font-size: clamp(2.5rem, 5.4vw, 4.7rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 0 2.4rem rgba(255, 255, 255, 0.12);
}

.rq-projects-section-head h2,
.rq-project-atlas h2 {
  font-family: var(--rq-pixel) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

.rq-project-card-meta span:first-child,
.rq-projects-kicker,
.rq-projects-section-head > span,
.rq-project-atlas > div > span {
  color: var(--rq-accent) !important;
}

.rq-project-links a {
  min-height: 44px;
}

.rq-project-links .rq-project-link--primary {
  border-color: rgba(143, 231, 255, 0.55) !important;
  color: var(--rq-accent-strong) !important;
  background: rgba(143, 231, 255, 0.09) !important;
  box-shadow: inset 0 0 1.2rem rgba(143, 231, 255, 0.035);
}

.rq-project-links .rq-project-link--primary:hover,
.rq-project-links .rq-project-link--primary:focus-visible {
  color: #031015 !important;
  border-color: var(--rq-accent) !important;
  background: var(--rq-accent) !important;
}

.rq-project-showcase:focus-within {
  border-color: var(--rq-accent-line) !important;
}

.rq-inner-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  width: min(1180px, calc(100vw - 3rem));
  min-height: clamp(22rem, 38vw, 30rem);
  margin: 0 auto;
  padding: clamp(8rem, 12vw, 10.5rem) 0 clamp(2.4rem, 5vw, 4rem);
  overflow: hidden;
  border-bottom: 1px solid rgba(143, 231, 255, 0.14);
  isolation: isolate;
}

.rq-inner-hero::before,
.rq-inner-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.rq-inner-hero::before {
  right: clamp(-8rem, -7vw, -3rem);
  top: 50%;
  width: clamp(17rem, 35vw, 30rem);
  aspect-ratio: 1;
  border: 1px solid rgba(143, 231, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(143, 231, 255, 0.08) 0 1px, transparent 1.5px) 0 0 / 1.4rem 1.4rem,
    radial-gradient(circle, rgba(143, 231, 255, 0.06), transparent 64%);
  box-shadow:
    0 0 0 2.8rem rgba(143, 231, 255, 0.02),
    0 0 0 6.4rem rgba(143, 231, 255, 0.012);
  transform: translateY(-50%);
}

.rq-inner-hero::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background:
    linear-gradient(90deg, var(--rq-grid-faint) 1px, transparent 1px) 0 0 / 4rem 4rem,
    linear-gradient(0deg, var(--rq-grid-faint) 1px, transparent 1px) 0 0 / 4rem 4rem;
  mask-image: linear-gradient(180deg, transparent, #000);
}

.rq-inner-hero__eyebrow {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 1rem;
  color: var(--rq-accent);
  font: 0.76rem/1.4 var(--rq-mono);
  letter-spacing: 0.22em;
}

.rq-inner-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 14ch;
  margin: 0;
  color: #fff;
  font-family: var(--rq-pixel);
  font-size: clamp(2.45rem, 6vw, 5.3rem);
  font-weight: 400;
  line-height: 1.08;
  text-shadow: 0 0 2.4rem rgba(255, 255, 255, 0.12);
}

.rq-inner-hero p {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 1.15rem 0 0;
  color: rgba(235, 244, 248, 0.7);
  font-family: var(--rq-cjk-code);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  line-height: 1.7;
}

.rq-inner-hero__orbit {
  position: absolute;
  right: clamp(1rem, 8vw, 7rem);
  top: 50%;
  z-index: 0;
  width: clamp(8rem, 15vw, 13rem);
  aspect-ratio: 1;
  transform: translateY(-50%);
}

.rq-inner-hero__orbit i {
  position: absolute;
  inset: calc(var(--ring, 0) * 17%);
  border: 1px solid rgba(143, 231, 255, calc(0.36 - var(--ring, 0) * 0.08));
  border-radius: 50%;
}

.rq-inner-hero__orbit i:nth-child(1) { --ring: 0; }
.rq-inner-hero__orbit i:nth-child(2) { --ring: 1; transform: rotate(28deg); }
.rq-inner-hero__orbit i:nth-child(3) {
  --ring: 2;
  background: radial-gradient(circle, rgba(143, 231, 255, 0.18), transparent 64%);
  box-shadow: 0 0 2rem rgba(143, 231, 255, 0.08);
}

.rq-blog-page .page-main-content-middle,
.rq-about-page .page-main-content-middle,
.rq-tags-page .page-main-content-middle,
.rq-categories-page .page-main-content-middle {
  padding-top: 0 !important;
}

.rq-blog-page .archive-container,
.rq-tags-page .tag-container,
.rq-categories-page .category-container {
  width: min(1040px, calc(100vw - 3rem));
  margin-inline: auto;
}

.rq-blog-page .archive-list,
.rq-tags-page .tag-list-content,
.rq-categories-page .category-list-content {
  position: relative;
  overflow: hidden;
  border-color: rgba(143, 231, 255, 0.22) !important;
  background:
    linear-gradient(135deg, rgba(143, 231, 255, 0.045), transparent 36%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px),
    rgba(10, 14, 18, 0.84) !important;
  box-shadow:
    inset 0 1px 0 rgba(143, 231, 255, 0.08),
    0 2rem 6rem rgba(0, 0, 0, 0.28) !important;
}

.rq-blog-page .archive-list::before,
.rq-tags-page .tag-list-content::before,
.rq-categories-page .category-list-content::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: min(18rem, 42%);
  height: 1px;
  background: linear-gradient(90deg, var(--rq-accent), transparent);
}

.rq-blog-page .archive-year,
.rq-blog-page .archive-title {
  color: var(--rq-accent-strong) !important;
  font-family: var(--rq-pixel) !important;
  font-size: clamp(1rem, 2vw, 1.45rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

.rq-blog-page .archive-list .archive-post-item {
  min-height: 64px;
  padding: 0.7rem 0.8rem !important;
  border-bottom-color: rgba(143, 231, 255, 0.12) !important;
  border-radius: 6px;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.rq-blog-page .archive-list .archive-post-item:hover,
.rq-blog-page .archive-list .archive-post-item:focus-within {
  border-bottom-color: rgba(143, 231, 255, 0.34) !important;
  background: rgba(143, 231, 255, 0.055);
  transform: translateX(0.35rem);
}

.rq-blog-page .archive-list .archive-post-item a {
  color: rgba(244, 249, 251, 0.9) !important;
  font-family: var(--rq-cjk-code) !important;
  font-size: 1.05rem;
  text-decoration: none !important;
}

.rq-blog-page .archive-list .archive-post-item span,
.rq-blog-page .archive-item .post-date {
  color: rgba(143, 231, 255, 0.68) !important;
  font-family: var(--rq-mono) !important;
}

.rq-about-page .page-template-container {
  margin-top: 0 !important;
}

.rq-about-page .page-template-content > h2:first-child,
.rq-about-page .keep-markdown-body > h2:first-child {
  margin: 0 0 1.6rem !important;
  color: var(--rq-accent) !important;
  font-family: var(--rq-pixel) !important;
  font-size: clamp(0.92rem, 1.5vw, 1.15rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.08em !important;
}

.rq-about-page .rq-about-grid section,
.rq-about-page .rq-about-panel {
  border-color: rgba(143, 231, 255, 0.16) !important;
  background:
    linear-gradient(145deg, rgba(143, 231, 255, 0.035), transparent 45%),
    radial-gradient(circle, rgba(255, 255, 255, 0.045) 0 1px, transparent 1.2px) 0 0 / 0.75rem 0.75rem,
    rgba(8, 11, 14, 0.82) !important;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.rq-about-page .rq-about-grid section:hover,
.rq-about-page .rq-about-panel:hover {
  border-color: rgba(143, 231, 255, 0.34) !important;
  box-shadow: 0 1.4rem 3.8rem rgba(0, 0, 0, 0.24);
  transform: translateY(-3px);
}

.rq-about-page .rq-about-tags span:hover {
  color: var(--rq-accent-strong) !important;
  border-color: rgba(143, 231, 255, 0.42) !important;
  background: rgba(143, 231, 255, 0.08) !important;
}

.rq-about-page .rq-about-actions a,
.rq-footer-links a {
  min-height: 44px;
}

@media (max-width: 980px) {
  .rq-inner-hero {
    width: calc(100vw - 2rem);
    min-height: clamp(20rem, 56vw, 25rem);
    padding: 7.5rem 0 2.6rem;
  }

  .rq-inner-hero::before {
    right: -9rem;
    opacity: 0.68;
  }

  .rq-inner-hero__orbit {
    right: 1rem;
    opacity: 0.52;
  }

  .rq-nav nav a {
    min-height: 48px;
    padding-inline: 0.85rem;
  }
}

@media (max-width: 640px) {
  .rq-projects-hero {
    padding-inline: 0.4rem;
  }

  .rq-projects-hero::after {
    display: none;
  }

  .rq-projects-hero h1 {
    font-size: clamp(2.05rem, 11vw, 3rem) !important;
  }

  .rq-projects-section-head h2,
  .rq-project-atlas h2 {
    font-size: clamp(1.25rem, 6vw, 1.8rem) !important;
  }

  .rq-project-links a {
    flex: 1 1 100%;
    min-height: 48px;
    justify-content: center;
  }

  .rq-inner-hero {
    width: calc(100vw - 1.5rem);
    min-height: 21rem;
    padding-top: 6.7rem;
  }

  .rq-inner-hero h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .rq-inner-hero__orbit {
    right: -2rem;
    width: 9rem;
    opacity: 0.35;
  }

  .rq-blog-page .archive-container,
  .rq-tags-page .tag-container,
  .rq-categories-page .category-container {
    width: calc(100vw - 1.5rem);
  }

  .rq-blog-page .archive-list .archive-post-item {
    grid-template-columns: 1fr !important;
    gap: 0.35rem !important;
    min-height: 70px;
    padding: 0.85rem 0.65rem !important;
  }

  .rq-about-page .rq-about-grid section:hover,
  .rq-about-page .rq-about-panel:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rq-blog-page .archive-list .archive-post-item,
  .rq-about-page .rq-about-grid section,
  .rq-about-page .rq-about-panel {
    transition: none !important;
    transform: none !important;
  }
}
