/* ==========================================================================
   ARCADE × Reimu — the blog wears the same night as the arcade.
   Loaded last from params.injector.head_end, so it only has to override
   colour, surface, and type. Layout stays entirely Reimu's.
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/arcade/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --arc-void: #05050b;
  --arc-panel: rgba(15, 13, 32, 0.72);
  --arc-panel-solid: #0c0a1a;
  --arc-ink: #f3f0ff;
  --arc-ink-2: #b6b0d8;
  --arc-ink-3: #837da8;
  --arc-violet: #a970ff;
  --arc-cyan: #2ee4ff;
  --arc-magenta: #ff3d9e;
  --arc-line: rgba(169, 112, 255, 0.16);
  --arc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------------ ground */
html {
  background: var(--arc-void) !important;
}
body {
  background:
    radial-gradient(ellipse 70% 50% at 12% -6%, rgba(169, 112, 255, 0.18), transparent 62%),
    radial-gradient(ellipse 60% 45% at 92% 8%, rgba(46, 228, 255, 0.12), transparent 60%),
    radial-gradient(ellipse 80% 40% at 50% 108%, rgba(255, 61, 158, 0.14), transparent 66%),
    var(--arc-void) !important;
  background-attachment: fixed !important;
  color: var(--arc-ink-2) !important;
  font-family: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, sans-serif !important;
}

/* the theme paints these white in light mode */
#container,
#wrap,
#main,
#content,
#page-nav,
.post-wrapper,
.post-article,
.sidebar,
#sidebar,
.widget,
.sidebar-menu,
.sidebar-menu-link-wrap,
.sidebar-author,
.comment,
#footer {
  background-color: transparent !important;
}

/* selection, caret, scrollbar belong to the palette */
::selection {
  background: rgba(169, 112, 255, 0.42) !important;
  color: #fff !important;
}
html {
  caret-color: var(--arc-cyan);
  scrollbar-color: rgba(169, 112, 255, 0.5) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(169, 112, 255, 0.6), rgba(46, 228, 255, 0.45));
  border-radius: 99px;
  border: 2px solid var(--arc-void);
}

/* ------------------------------------------------------------------ header */
/* #header-nav is the top strip; #header-outer is the title layer that sits ON
   the banner — darkening it here would paint out the photo. */
#header-nav {
  background: rgba(5, 5, 11, 0.86) !important;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--arc-line) !important;
  box-shadow: none !important;
}
#header-outer {
  background: transparent !important;
  box-shadow: none !important;
}
/* the banner photo sits in the night instead of glowing out of it */
header {
  position: relative;
}
header picture img,
header > img {
  filter: brightness(0.55) saturate(0.86) contrast(1.06) !important;
}
/* and it dissolves into the page instead of ending on a hard edge */
header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to bottom, transparent, rgba(5, 5, 11, 0.88));
  pointer-events: none;
  z-index: 1;
}
#header-outer {
  position: absolute !important;
  inset: 0;
  display: grid;
  place-items: center;
  width: auto;
  padding-inline: 1.5rem;
}
#header-title {
  width: 100%;
  text-align: center;
}
/* AOS fades the title in on scroll; on a dark page it can stay hidden, so the
   title is simply always on */
#header-title [data-aos],
#header-title h1,
#header-title h2 {
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  width: 100%;
}
#header-title,
#logo,
#subtitle,
#header-title a {
  color: var(--arc-ink) !important;
  text-shadow: 0 0 28px rgba(46, 228, 255, 0.45), 0 2px 18px rgba(0, 0, 0, 0.85);
}
#header-title h1,
#header-title h2 {
  color: var(--arc-ink) !important;
}
#subtitle {
  color: var(--arc-ink-2) !important;
}
#subtitle-wrap:before,
#subtitle-wrap:after {
  background: var(--arc-line) !important;
}

.main-nav-link,
#main-nav a,
.main-nav-icon {
  color: var(--arc-ink-2) !important;
  transition: color 0.25s var(--arc-ease);
}
.main-nav-link:hover,
#main-nav a:hover {
  color: var(--arc-cyan) !important;
  text-shadow: 0 0 18px rgba(46, 228, 255, 0.6);
}
#main-nav-toggle,
.mobile-nav-link {
  color: var(--arc-ink-2) !important;
}

#mobile-nav,
#mask {
  background: rgba(5, 5, 11, 0.96) !important;
  backdrop-filter: blur(16px);
}

/* ------------------------------------------------------------------- cards */
.post-wrapper {
  background: var(--arc-panel) !important;
  border: 1px solid var(--arc-line) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 20px 50px -40px rgba(0, 0, 0, 0.9) !important;
  transition: border-color 0.35s var(--arc-ease), box-shadow 0.35s var(--arc-ease),
    transform 0.35s var(--arc-ease);
}
.post-wrapper:hover {
  border-color: rgba(46, 228, 255, 0.45) !important;
  box-shadow: 0 26px 60px -34px rgba(46, 228, 255, 0.55) !important;
  transform: translateY(-2px);
}
.post-article {
  border-radius: 16px !important;
}
/* Reimu's dark mode paints #272b30 on the text panel; that grey is what made
   the cards look unfinished against the violet ground. The cover keeps its own
   box so lazysizes still has a sized target to fill. */
.post-wrap {
  background: transparent !important;
}
.post-title,
.post-title a {
  color: var(--arc-ink) !important;
  transition: color 0.25s var(--arc-ease);
}
.post-title a:hover {
  color: var(--arc-cyan) !important;
  text-shadow: 0 0 22px rgba(46, 228, 255, 0.45);
}
.post-meta,
.post-meta a,
.post-meta .icon-calendar,
.post-meta .icon-clock,
.post-meta .icon-eye {
  color: var(--arc-ink-3) !important;
}
/* the theme ships pink date chips and a dashed pink rule under the title */
.post-meta .post-date,
.post-meta > span:first-child,
.article-date-link {
  background: rgba(169, 112, 255, 0.16) !important;
  border: 1px solid var(--arc-line) !important;
  color: var(--arc-ink) !important;
  box-shadow: none !important;
}
.article-date-link time {
  color: var(--arc-ink) !important;
}
.hr-line {
  border: none !important;
  border-top: 1px dashed rgba(169, 112, 255, 0.3) !important;
  background: none !important;
  height: 0 !important;
}
/* article pages get their title rendered into the content column, because the
   theme's banner overlay collapses it on this ground */
.arc-post-title {
  font-family: "Space Grotesk", "Noto Sans SC", "PingFang SC", sans-serif !important;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  color: var(--arc-ink) !important;
  margin: 0 0 1.4rem !important;
  padding-bottom: 1.1rem !important;
  border-bottom: 1px solid var(--arc-line) !important;
  text-wrap: balance;
}
.post-title:after,
.post-meta:after,
.post-wrapper .dashed,
.post-wrap .dashed {
  border-color: var(--arc-line) !important;
  background-image: repeating-linear-gradient(
    90deg,
    var(--arc-line) 0 6px,
    transparent 6px 12px
  ) !important;
}
.post-excerpt,
.post-content,
.post-content p,
.post-content li {
  color: var(--arc-ink-2) !important;
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--arc-ink) !important;
}
.post-content a {
  color: var(--arc-cyan) !important;
  text-decoration-color: rgba(46, 228, 255, 0.4);
}
.post-content blockquote {
  background: rgba(169, 112, 255, 0.08) !important;
  border-left: 3px solid var(--arc-violet) !important;
  color: var(--arc-ink-2) !important;
  border-radius: 0 10px 10px 0;
}
.post-content code {
  background: rgba(46, 228, 255, 0.1) !important;
  color: #9df0ff !important;
  border-radius: 5px;
}
.post-content pre,
.highlight,
figure.highlight,
.gutter {
  background: #0a0916 !important;
  border: 1px solid var(--arc-line) !important;
  border-radius: 12px !important;
  color: #cdc7ee !important;
}
.post-content table tr:nth-child(2n) {
  background: rgba(169, 112, 255, 0.07) !important;
}
.post-content table th,
.post-content table td {
  border-color: var(--arc-line) !important;
}
hr {
  border-color: var(--arc-line) !important;
  background: var(--arc-line) !important;
}

/* ----------------------------------------------------------------- sidebar */
.sidebar,
.sidebar-right,
.widget {
  background: var(--arc-panel) !important;
  border: 1px solid var(--arc-line) !important;
  border-radius: 16px !important;
}
.sidebar-author-name,
.sidebar-state-number {
  color: var(--arc-ink) !important;
}
.sidebar-description,
.sidebar-state,
.sidebar-state-article,
.sidebar-state-category,
.sidebar-state-tag {
  color: var(--arc-ink-3) !important;
}
.sidebar-menu-link,
.sidebar-menu-link-dummy {
  color: var(--arc-ink-2) !important;
  border-color: var(--arc-line) !important;
  transition: color 0.25s var(--arc-ease), background 0.25s var(--arc-ease),
    border-color 0.25s var(--arc-ease);
}
/* the dummy anchor is the click target laid over the row; Reimu gives it a
   light fill in light mode, which reads as a grey block on this ground */
.sidebar-menu-link-dummy {
  background: transparent !important;
  border: none !important;
}
.sidebar-menu-link-wrap {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid var(--arc-line);
  /* the theme hangs a red glow on every row; on this ground it reads as dirt */
  box-shadow: none !important;
  transition: background 0.25s var(--arc-ease), box-shadow 0.25s var(--arc-ease),
    border-color 0.25s var(--arc-ease);
}
.sidebar-menu-link-wrap:hover {
  background: rgba(46, 228, 255, 0.08) !important;
  border-color: rgba(46, 228, 255, 0.35);
  box-shadow: 0 0 22px -10px rgba(46, 228, 255, 0.9) !important;
}
.sidebar-menu-link-wrap:hover .sidebar-menu-link {
  color: var(--arc-cyan) !important;
}
.sidebar-menu-icon img,
.sidebar-menu-icon .icon {
  filter: grayscale(1) brightness(1.7) sepia(1) hue-rotate(150deg) saturate(3);
}
.sidebar-menu-link:hover {
  color: var(--arc-cyan) !important;
  background: rgba(46, 228, 255, 0.08) !important;
  border-color: rgba(46, 228, 255, 0.4) !important;
}
.sidebar-menu-link.current {
  color: var(--arc-void) !important;
  background: linear-gradient(120deg, var(--arc-cyan), var(--arc-violet)) !important;
  border-color: transparent !important;
  font-weight: 600;
}
.category-list-link,
.category-list-count,
.tag-list-link,
.archive-list-link {
  color: var(--arc-ink-2) !important;
}
.category-list-link:hover {
  color: var(--arc-cyan) !important;
}

/* --------------------------------------------------------------- pagination */
#page-nav,
.page-number,
.extend,
.next,
.prev {
  color: var(--arc-ink-2) !important;
  background: transparent !important;
  border-color: var(--arc-line) !important;
}
.page-number:hover,
.next:hover,
.prev:hover {
  color: var(--arc-void) !important;
  background: var(--arc-cyan) !important;
  border-color: var(--arc-cyan) !important;
}
.page-number.current {
  background: var(--arc-violet) !important;
  border-color: var(--arc-violet) !important;
  color: #0a0714 !important;
  font-weight: 600;
}

/* ------------------------------------------------------------------ footer */
#footer,
#footer-info,
.footer-line {
  color: var(--arc-ink-3) !important;
  border-color: var(--arc-line) !important;
}
#footer a,
.footer-info-sep {
  color: var(--arc-ink-2) !important;
}
#footer a:hover {
  color: var(--arc-cyan) !important;
}
#footer:before {
  background: none !important;
}

/* --------------------------------------------------------- loading screen */
.loading-bg {
  background: var(--arc-void) !important;
}
.loading-word {
  color: var(--arc-ink-3) !important;
}
.loading-taichi img {
  filter: drop-shadow(0 0 18px rgba(46, 228, 255, 0.75));
}

/* ------------------------------------------------------------ focus + misc */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--arc-cyan) !important;
  outline-offset: 3px;
}
#top,
.footer-icon {
  color: var(--arc-ink-2) !important;
}
#heatmap-tooltip,
#copy-tooltip,
#lang-tooltip {
  background: var(--arc-panel-solid) !important;
  color: var(--arc-ink) !important;
  border: 1px solid var(--arc-line) !important;
  border-radius: 8px;
}
