/* Pearl-white and pale sky-blue light on a neutral dark canvas. */
:root {
  --neon-white: #ffffff;
  --neon-ice: #f3f2fa;
  --neon-cyan: #e9edf5;
}

body:not([data-view="landing"]) {
  --bg: #08090e;
  --text: #edf5fb;
  --muted: #b4c2cf;
  --pink: var(--neon-white);
  --lilac: var(--neon-ice);
  --line: #2d3d49;
  background: var(--bg);
}

body:not([data-view="landing"]) .space-glow {
  background:
    radial-gradient(ellipse 44% 50% at 50% 18%, #f9f7ff0a, transparent 76%),
    radial-gradient(ellipse 42% 64% at -8% 18%, #ffffff0b, transparent 78%),
    radial-gradient(ellipse 40% 65% at 108% 68%, #f4f3ff0d, transparent 80%),
    radial-gradient(ellipse 45% 34% at 77% -12%, #f7f5ff0a, transparent 80%),
    #08090e;
}
body:not([data-view="landing"]) .space-glow::before {
  content: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(117deg, transparent 9%, #fffffe05 14%, #fffffe0a 16%, transparent 20%),
    linear-gradient(63deg, transparent 65%, #f7f5ff08 71%, transparent 76%);
  -webkit-mask-image: linear-gradient(#0009, #000 32%, transparent 90%);
  mask-image: linear-gradient(#0009, #000 32%, transparent 90%);
  pointer-events: none;
}

/* Only the outside margins receive stars; the reading column stays clear. */
body:not([data-view="landing"]) .star-field {
  --neon-margin: max(18px, calc((100vw - 1070px) / 2));
  display: block;
  opacity: .82;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent var(--neon-margin), transparent calc(100% - var(--neon-margin)), #000);
  mask-image: linear-gradient(90deg, #000, transparent var(--neon-margin), transparent calc(100% - var(--neon-margin)), #000);
}
body:not([data-view="landing"]) .star:nth-child(n+85) { display: none; }
body:not([data-view="landing"]) .star.cross { filter: drop-shadow(0 0 5px #bde7ff88); }

body:not([data-view="landing"]) .page-header {
  background: #090a10ed;
  border-bottom-color: #b4d6ee23;
  box-shadow: 0 5px 30px #02080f30;
}
body:not([data-view="landing"]) .page-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 3%, #eef8ff80 26%, #a8deff70 73%, transparent 97%);
  box-shadow: 0 0 15px #b9e1ff48;
  pointer-events: none;
}
body:not([data-view="landing"]) .page-header nav a {
  position: relative;
  color: #becbd6;
  transition: color .18s ease, text-shadow .18s ease;
}
body:not([data-view="landing"]) .page-header nav a:hover,
body:not([data-view="landing"]) .page-header nav a.active {
  color: #eef8ff;
  text-shadow: 0 0 16px #a8dcff40;
}
body:not([data-view="landing"]) .page-header nav a.active::after {
  content: "";
  position: absolute;
  height: 2px;
  bottom: 2px;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #f7fbff, #ccecff 68%, #a9dfff);
  box-shadow: 0 0 8px #bde5ff50;
}

body:not([data-view="landing"]) .profile-copy h1 {
  color: #f4faff;
  text-shadow: 0 0 18px #d9f1ff28, 0 0 42px #8fcfff18;
}
body:not([data-view="landing"]) .hacker-handle,
body:not([data-view="landing"]) .about-identity > span:last-child {
  color: var(--neon-cyan);
  text-shadow: 0 0 15px #a0d8ff30;
}
body:not([data-view="landing"]) .scene-moon {
  fill: #eaf7ff;
  opacity: .84;
  filter: drop-shadow(0 0 5px #acdfff45);
}
body:not([data-view="landing"]) .pixel-ground {
  opacity: .6;
  background: linear-gradient(90deg, transparent, #d1edff7a, #9dd6f56b, transparent);
}

body:not([data-view="landing"]) .section-header {
  position: relative;
  border-bottom-color: transparent;
}
body:not([data-view="landing"]) .section-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, #e6f5ffd9, #a4cbe794 39%, #9ed7f155 76%, #9ed7f100);
  box-shadow: 0 0 10px #a8d8f92e;
}
body:not([data-view="landing"]) .section-header::before {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  left: 0;
  bottom: -2px;
  background: #f4faff;
  box-shadow: 0 0 7px #cceaffbf;
}
body:not([data-view="landing"]) .section-header > svg {
  fill: var(--neon-white);
  filter: none;
}
body:not([data-view="landing"]) .notes-section .section-header > svg {
  fill: var(--neon-cyan);
  filter: none;
}
body:not([data-view="landing"]) .about-preview .section-header > svg {
  fill: var(--neon-ice);
  filter: none;
}
body:not([data-view="landing"]) .section-header h2,
body:not([data-view="landing"]) .about-content > h1 {
  color: #edf7ff;
  text-shadow: 0 0 22px #c5e5ff1c;
}

.about-preview-body { flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 0 28px; }
.about-preview-body > p {
  max-width: 730px;
  font-size: 16px;
  line-height: 2;
  color: #bdcbd6;
  word-break: keep-all;
}
.about-preview-link {
  display: inline-block;
  width: fit-content;
  margin-top: 0;
  padding-bottom: 3px;
  border-bottom: 1px solid #b7d5ea65;
  color: #c4e7ff;
  font-size: 14px;
  line-height: 1.8;
  transition: color .18s ease, text-shadow .18s ease, border-color .18s ease;
}
.about-preview-link:hover,
.about-preview-link:focus-visible {
  color: #f3faff;
  border-bottom-color: #cceaff;
  text-shadow: 0 0 12px #b0dcff40;
}

body:not([data-view="landing"]) .work-entry {
  border-bottom-color: #a3c8e12b;
}
body:not([data-view="landing"]) .work-index > svg {
  fill: var(--neon-ice);
  filter: none;
}
body:not([data-view="landing"]) .work-entry:nth-child(3n+1) .work-index > svg {
  fill: var(--neon-cyan);
  filter: none;
}
body:not([data-view="landing"]) .work-entry:nth-child(3n+2) .work-index > svg {
  fill: var(--neon-white);
  filter: none;
}
body:not([data-view="landing"]) .work-index > span { color: #c5deef; }
body:not([data-view="landing"]) .work-entry:nth-child(3n+1) .work-index > span { color: #aedcf6; }
body:not([data-view="landing"]) .work-entry:nth-child(3n+2) .work-index > span { color: #e1f2ff; }
body:not([data-view="landing"]) .work-index > small { color: #a2b5c5; }
body:not([data-view="landing"]) .work-text h3 { color: #eaf2f9; }
body:not([data-view="landing"]) .work-detail h4 { color: #bed6e8; }
body:not([data-view="landing"]) .work-tags span { color: #a9bfd2; }
body:not([data-view="landing"]) .work-tags span::before { color: #c7e6fa; }

body:not([data-view="landing"]) .note-entry { border-bottom-color: #a7cbe329; }
body:not([data-view="landing"]) .note-kind { color: #b1dff7; }
body:not([data-view="landing"]) .note-plus { color: #c9eaff; }
body:not([data-view="landing"]) .note-entry[open] .note-title { color: #edf8ff; }
body:not([data-view="landing"]) .note-entry[open] .note-plus {
  color: #eaf6ff;
  text-shadow: 0 0 12px #b1deff55;
}
body:not([data-view="landing"]) .blog-link {
  color: #bce3ff;
  border-color: #a7cee863;
}
body:not([data-view="landing"]) .blog-link:hover { color: #f4faff; }
body:not([data-view="landing"]) .about-facts { border-top-color: #c5e3f645; }
body:not([data-view="landing"]) .about-facts > div { border-bottom-color: #b4d4eb2a; }
body:not([data-view="landing"]) .about-facts dt { color: #b6d3e7; }
body:not([data-view="landing"]) .about-research h2 { color: #d2eafb; }
body:not([data-view="landing"]) .page-footer { border-top-color: #bad9ef30; }
body:not([data-view="landing"]) .home-button {
  color: #e1f3ff;
  filter: drop-shadow(0 0 6px #bfE7ff25);
}
body:not([data-view="landing"]) .home-button:hover {
  color: #f5fbff;
  background: #a9d9ff12;
  border-color: #b2d8f03d;
}
body:not([data-view="landing"]) :is(a, button, summary):focus-visible {
  outline-color: #bce7ff;
}

/* The entrance keeps its black base, exact arrangement and original sprite. */
body[data-view="landing"] .space-glow {
  background:
    radial-gradient(ellipse at 50% 45%, #ffffff12, transparent 43%),
    radial-gradient(ellipse at 62% 56%, #f4f1ff12, transparent 45%),
    #08090d;
}
.landing .dock-button { color: #d4e3ed; }
.landing .dock-button:nth-child(even) { color: #b9d9ed; }
.landing .dock-button:hover,
.landing .dock-button:focus-visible {
  color: #f4faff;
  border-color: #beddf44a;
  background: #7cafcf13;
  box-shadow: 0 0 17px #a6d6f414;
}
.landing .dock-button:hover svg,
.landing .dock-button:focus-visible svg { filter: drop-shadow(0 0 5px #bce5ff70); }
.motion-toggle:hover { color: var(--neon-cyan); }

@media (max-width: 600px) {
  body:not([data-view="landing"]) .space-glow {
    background:
      radial-gradient(ellipse 72% 38% at 50% 28%, #fffdf512, transparent 84%),
      radial-gradient(ellipse 78% 48% at -30% 11%, #ffffff0d, transparent 84%),
      radial-gradient(ellipse 68% 56% at 128% 74%, #f1f0ff0e, transparent 84%),
      #08090e;
  }
  body:not([data-view="landing"]) .star-field { display: none; }
  .about-preview-body { padding-top: 21px; padding-bottom: 28px; }
  .about-preview-link { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .about-preview-link,
  body:not([data-view="landing"]) .page-header nav a { transition: none; }
}

/* Keep supporting text and focus details in the same cool palette. */
::selection{background:#315872;color:#fff}
.motion-toggle{color:#8ea3b5}
body:not([data-view="landing"]) :is(.work-intro,.work-detail p,.work-detail li,.note-title,.note-content>p,.about-intro,.about-facts dd,.about-research p){color:#b9c7d3}
body:not([data-view="landing"]) .about-identity>span:first-child{color:#edf6ff}
body:not([data-view="landing"]) .about-pixel-detail>svg{fill:#dcefff}

/* White starlight with a bright core and a softer pearl halo. */
body:not([data-view="landing"]) .star-field{display:block;opacity:.9;-webkit-mask-image:linear-gradient(90deg,#000,#0005 25%,#0005 75%,#000);mask-image:linear-gradient(90deg,#000,#0005 25%,#0005 75%,#000)}
body:not([data-view="landing"]) .star:nth-child(n+75){display:none}
.star{filter:drop-shadow(0 0 3px #ffffff80);animation-name:pearl-twinkle;animation-timing-function:ease-in-out}
body:not([data-view="landing"]) .star.cross,.star.cross{filter:drop-shadow(0 0 4px #ffffffcc) drop-shadow(0 0 12px #f0ebff88)}
.star.large{filter:drop-shadow(0 0 5px #fff) drop-shadow(0 0 20px #f0edff99)!important}
.near-star{background:#fff;box-shadow:0 -4px #fff,0 4px #fff,-4px 0 #fff,4px 0 #fff;filter:drop-shadow(0 0 5px #fff9)}
@keyframes pearl-twinkle{0%,100%{opacity:.3;transform:scale(.75)}45%{opacity:.75;transform:scale(1)}55%{opacity:1;transform:scale(1.12)}}
.meteor-field{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.meteor{--mx:280px;--my:370px;position:absolute;width:3px;height:3px;background:#fff;opacity:0;box-shadow:-3px -3px #fff,-6px -6px #fffffff2,-9px -9px #ffffffe6,-12px -12px #ffffffcc,-15px -15px #ffffffb3,-18px -18px #ffffff99,-21px -21px #ffffff88,-24px -24px #ffffff66,-27px -27px #ffffff55,-30px -30px #ffffff44,-33px -33px #ffffff33,-36px -36px #ffffff22,-39px -39px #ffffff11;filter:drop-shadow(0 0 4px #ffffffcc) drop-shadow(0 0 11px #eeeaff88);animation:shooting-star 14s -.8s linear infinite}
.meteor::after{content:"";position:absolute;inset:0;background:#fff;box-shadow:0 -3px #ffffffaa,0 3px #ffffffaa,-3px 0 #ffffffaa,3px 0 #ffffffaa}
.meteor:nth-child(1){left:3%;top:-4%}
.meteor:nth-child(2){left:72%;top:-8%;--mx:330px;--my:440px;animation-duration:18s;animation-delay:-6s}
.meteor:nth-child(3){left:13%;top:46%;--mx:200px;--my:270px;animation-duration:21s;animation-delay:-12s}
.meteor:nth-child(4){left:78%;top:38%;--mx:240px;--my:330px;animation-duration:24s;animation-delay:-19s}
@keyframes shooting-star{0%{opacity:0;transform:translate(0,0)}3%{opacity:1}19%{opacity:0;transform:translate(var(--mx),var(--my))}100%{opacity:0;transform:translate(var(--mx),var(--my))}}
body:not([data-view="landing"]) .section-header>svg{width:28px;height:28px;flex:0 0 28px;filter:none;image-rendering:pixelated;shape-rendering:crispEdges}
.section-face{--face-scale:.066;display:block;width:30px;height:20px;flex:0 0 30px;background-image:url('assets/usagi-casual-dress-light.png');background-size:calc(1254px * var(--face-scale)) calc(1254px * var(--face-scale));background-position:calc(-125px * var(--face-scale)) calc(-129px * var(--face-scale));background-repeat:no-repeat;image-rendering:pixelated;image-rendering:crisp-edges;filter:grayscale(1) brightness(1.35);opacity:.94}
body:not([data-view="landing"]) .work-index>svg{width:24px;height:24px;flex:0 0 24px;filter:none;image-rendering:pixelated;shape-rendering:crispEdges}
body:not([data-view="landing"]) .about-page-header h1{font-family:var(--sans);font-size:28px;font-weight:700;line-height:1.5;letter-spacing:-.025em;color:#f3f6fa;text-shadow:none}
body:not([data-view="landing"]) .section-header::after{background:linear-gradient(90deg,#f6f5ffb3,#dbdce866 45%,#f4f4ff00);box-shadow:0 0 10px #fff2}
body:not([data-view="landing"]) .section-header::before{background:#fff;box-shadow:0 0 8px #fffc}
body:not([data-view="landing"]) .page-header::after{background:linear-gradient(90deg,transparent,#e9e8f666 25%,#fffffc66 75%,transparent);box-shadow:0 0 13px #fff2}
body:not([data-view="landing"]) .page-header nav a.active::after{background:#f5f4ff;box-shadow:0 0 8px #fff8}
body:not([data-view="landing"]) .home-button{color:#f5f4ff;filter:drop-shadow(0 0 5px #fff5)}
body:not([data-view="landing"]) :is(.about-preview-link,.blog-link,.work-index>span,.note-kind){color:#d7dce8}
@media(max-width:600px){body:not([data-view="landing"]) .star-field{display:block;opacity:.65}.meteor{--mx:170px;--my:300px}.meteor:nth-child(2){left:66%;--mx:150px;--my:330px}.meteor:nth-child(3){left:-8%;--mx:160px;--my:290px}.meteor:nth-child(4){left:83%;--mx:100px;--my:280px}}
