@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=VT323&display=swap');

:root {
  --bg:       #f0f6f0; /* #1a1a28 */
  --bg2:      #f0f6f0; /* #0e0e18 */
  --text:     #b8b8c8;
  --accent:   #ff4fa3;
  --purple:   #222323; /* #7000cc; */
  --dim:      #444458;
  --border:   #1e0028;
}

/* ---- parallax background ---- */

.parallax-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.pl-far,
.pl-near {
  position: absolute;
  bottom: 0;
  left: 0;
  white-space: nowrap;
  line-height: 0;
}

.pl-far img,
.pl-near img {
  display: inline-block;
  width: auto;
  image-rendering: pixelated;
  vertical-align: bottom;
}

.pl-far {
  opacity: 0.2;
  animation: scroll-bg 90s linear infinite;
}

.pl-far img {
  height: 30vh;
}

.pl-near {
  opacity: 0.3;
  animation: scroll-bg 45s linear infinite;
}

.pl-near img {
  height: 42vh;
}

@keyframes scroll-bg {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- selection + scrollbar ---- */

::selection {
  color: #ff4fa3;
  background: #1a0020;
}

* {
  box-sizing: border-box;
  scrollbar-color: #ff4fa3 #000;
  scrollbar-width: thin;
}

::-webkit-scrollbar        { width: 7px; background: #000; }
::-webkit-scrollbar-thumb  { background: #ff4fa3; }
::-webkit-scrollbar-thumb:hover { background: #ff4fa3; }

/* ---- base ---- */

html {
  background-color: var(--bg);
  background-image: url('../images/backgrounds/bubblespurplebg.jpg');
  background-repeat: repeat;
  background-attachment: fixed;
  animation: bg-tile-scroll 60s linear infinite;
}

@keyframes bg-tile-scroll {
  from { background-position: 0 0; }
  to   { background-position: 785px 360px; }
}

body {
  font-family: 'Special Elite', 'Courier New', Courier, monospace;
  background-color: transparent;
  color: var(--text);
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  line-height: 1.7;
  font-size: 1.2em;
}

/* ---- header ---- */

header {
  position: relative;
  text-align: left;
  padding: 8px 12px 18px;
  margin-bottom: 24px;
  background: var(--bg2) url('../images/backgrounds/gmbg.gif') repeat;
  border: 2px solid;
  border-color: #b8b8c8 #0a0a0a #0a0a0a #b8b8c8;
  box-shadow: 1px 1px 0 #000;
}

header::after {
  content: '─ □ ✕';
  position: absolute;
  top: 0;
  right: 0;
  padding: 3px 6px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 4px;
  user-select: none;
  pointer-events: none;
}

header::before {
  content: 'プロセス 0xFFF';
  display: block;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 6px;
  margin: -8px -12px 12px;
  letter-spacing: 0.06em;
  user-select: none;
}

.header-body {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.header-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.header-right .win--full {
  margin: 0;
}

/* ---- win component (reusable window for images, gifs, etc.) ---- */

.win {
  display: inline-block;
  vertical-align: top;
  border: 2px solid;
  border-color: #b8b8c8 #0a0a0a #0a0a0a #b8b8c8;
  box-shadow: 1px 1px 0 #000;
  background: var(--bg2);
  margin: 0 8px 8px 0;
}

/* block-level win — for nav strip etc. */
.win--full {
  display: block;
  margin: 0 0 20px;
}

/* flex-fill win — expands inside a flex row */
.win--flex {
  flex: 1;
  display: block;
}

.win-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff; /* text */
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 6px;
  letter-spacing: 0.06em;
  user-select: none;
}

.win-btns {
  letter-spacing: 3px;
  margin-left: 8px;
  opacity: 0.85;
  flex-shrink: 0;
}

.win-body {
  padding: 4px;
}

.win-body--flush {
  padding: 0;
  line-height: 0;
  font-size: 0;
}

/* ---- minimisable win boxes (details/summary) ---- */

details.win {
  display: block;
}

summary.win-bar {
  cursor: pointer;
  list-style: none;
}

summary.win-bar::-webkit-details-marker {
  display: none;
}

.win--float-corner {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.win--float-corner .win {
  margin: 0;
}

.win--float-corner .win--rollin {
  width: 170px;
  align-self: flex-end;
}

.win--float-corner .win--gb {
  width: fit-content;
  align-self: flex-end;
}

.win--float-corner img {
  display: block;
  max-width: 340px;
  height: auto;
}

.tile-scroll-link {
  display: block;
  border-bottom: none;
}

.tile-scroll {
  width: 100%;
  height: 100px;
  background-image: url('../images/tiles/mon-e.jpg');
  background-repeat: repeat;
  background-size: 100px 100px;
  animation: tile-scroll-down 4s linear infinite;
}

@keyframes tile-scroll-down {
  from { background-position: 0 0; }
  to   { background-position: 0 100px; }
}

/* counter digits placeholder */
.counter-digits {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 1.6em;
  color: var(--purple);
  text-align: center;
  opacity: 0.45;
  letter-spacing: 0.2em;
}

header > p {
  font-family: 'VT323', monospace;
  color: var(--purple);
  font-size: 1.25em;
  letter-spacing: 0.25em;
  margin: 10px 0 0;
  opacity: 0.8;
}

img.avatar {
  display: block;
  width: 128px;
  height: auto;
  border: 1px solid #ff4fa330;
  box-shadow: inset 0 0 0 2px #16001e;
  image-rendering: pixelated;
  filter: saturate(0.75) contrast(1.1);
}

/* ---- blockquote wrapper ---- */

blockquote {
  margin: 0;
  padding: 0;
  border: none;
}

/* ---- headings ---- */

h1 {
  color: var(--accent);
  font-size: 1.5em;
  letter-spacing: 0.12em;
  font-weight: normal;
  text-transform: lowercase;
  margin: 32px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #ff4fa320;
}

/* ---- paragraphs ---- */

p {
  color: #8888a0;
  font-size: 0.9em;
  margin: 6px 0;
}

/* ---- two-column grid ---- */

.col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 14px;
  margin-bottom: 14px;
}

.col-grid > section {
  margin-bottom: 0;
}

.col-grid > .col-full {
  grid-column: 1 / -1;
}

.col-grid > .col-compact {
  grid-column: 1 / -1;
  max-width: 480px;
}

.col-grid > .col-shrink {
  width: fit-content;
}

.col-grid > .win {
  margin: 0;
}

.gallery-img {
  display: block;
  width: 100%;
  height: auto;
}

.col-grid > .row-span {
  grid-row: span 2;
}

@media (max-width: 520px) {
  .col-grid { grid-template-columns: 1fr; }
}

/* ---- sections ---- */

section {
  background: var(--bg2);
  border: 2px solid;
  border-color: #b8b8c8 #0a0a0a #0a0a0a #b8b8c8;
  box-shadow: 1px 1px 0 #000;
  padding: 8px 14px 12px;
  margin-bottom: 14px;
  color: #666680;
  font-size: 0.88em;
}

section .win-bar {
  margin: -8px -14px 8px;
}

/* ---- lists ---- */

ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

li {
  padding: 3px 0;
  color: var(--dim);
}

li::before {
  content: '> ';
  color: #ff4fa350;
}

/* ---- links ---- */

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted #ff4fa340;
  transition: color 0.15s, border-color 0.15s;
}

a:visited {
  color: #cc3a88;
  border-bottom-color: #cc3a8840;
}

a:hover {
  color: #222323;
  border-bottom-color: #222323;
}

/* ---- headings h2 / h3 ---- */

h2 {
  color: var(--accent);
  font-size: 1.3em;
  letter-spacing: 0.1em;
  font-weight: normal;
  margin: 28px 0 8px;
  padding-bottom: 3px;
  border-bottom: 1px dashed #ff4fa318;
}

h3 {
  font-family: 'Special Elite', 'Courier New', Courier, monospace;
  color: var(--dim);
  font-size: 0.95em;
  font-weight: normal;
  margin: 16px 0 6px;
}

/* ---- scrolling marquee nav ---- */

.marquee-wrap {
  overflow: hidden;
  background: var(--bg2);
  border-bottom: 1px dashed #1e0028;
  margin-bottom: 24px;
  padding: 2px 0;
}

.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-wrap:hover .marquee-inner {
  animation-play-state: paused;
}

.marquee-inner a {
  display: inline;
  font-family: 'VT323', monospace;
  font-size: 0.85em;
  color: var(--purple);
  border-bottom: none;
  letter-spacing: 0.06em;
  padding: 0 0.5em;
  opacity: 0.7;
}

.marquee-inner a:hover {
  color: #222323;
  opacity: 1;
}

.marquee-sep {
  display: inline;
  color: #2a0035;
  padding: 0 0.1em;
  user-select: none;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- updates list ---- */

ul.updates {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  max-height: 180px;
  overflow-y: auto;
}

ul.updates li {
  padding: 4px 0;
  color: var(--dim);
  font-size: 0.88em;
  border-bottom: 1px solid #16001e;
}

ul.updates li::before {
  content: none;
}

.date {
  font-family: 'VT323', monospace;
  color: var(--purple);
  letter-spacing: 0.08em;
  margin-right: 0.6em;
}

/* ---- todo list ---- */

ul.todo {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  max-height: 180px;
  overflow-y: auto;
}

ul.todo li {
  padding: 3px 0;
  color: #555568;
  font-size: 0.88em;
}

ul.todo li::before {
  content: '☆ ';
  color: var(--purple);
}

ul.todo li.done {
  text-decoration: line-through;
  color: #333344;
}

ul.todo li.done::before {
  content: '★ ';
  color: #333344;
}

/* ---- visitor counter ---- */

.counter {
  text-align: center;
  margin-top: 24px;
}

.counter img {
  display: block;
  margin: 0 auto 4px;
  image-rendering: pixelated;
}

.counter-label {
  font-family: 'VT323', monospace;
  font-size: 0.7em;
  color: #2a0035;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

/* ---- utility: transparent link wrapper ---- */

.link-unstyled,
.link-unstyled:visited,
.link-unstyled:hover {
  color: inherit;
  border-bottom: none;
  text-decoration: none;
}

/* ---- blinkies ---- */

.blinkie-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 6px 0 10px;
}

.blinkie {
  font-family: 'VT323', monospace;
  font-size: 13px;
  padding: 2px 5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
  animation: blink-1 0.8s step-start infinite;
}
.blinkie:nth-child(2) { animation-name: blink-2; animation-duration: 0.65s; }
.blinkie:nth-child(3) { animation-name: blink-3; animation-duration: 1.0s; }
.blinkie:nth-child(4) { animation-name: blink-2; animation-duration: 0.75s; animation-delay: 0.15s; }
.blinkie:nth-child(5) { animation-name: blink-1; animation-duration: 0.9s;  animation-delay: 0.3s; }

@keyframes blink-1 {
  0%  { background: #7000cc; color: #ff4fa3; }
  50% { background: #ff4fa3; color: #0a0010; }
}
@keyframes blink-2 {
  0%  { background: #000080; color: #00e0ff; }
  50% { background: #00e0ff; color: #000018; }
}
@keyframes blink-3 {
  0%  { background: #0a0010; color: #ff4fa3; outline: 1px solid #ff4fa3; }
  50% { background: #ff4fa3; color: #0a0010; outline: 1px solid #ff4fa3; }
}

@media (prefers-reduced-motion: reduce) {
  .blinkie { animation: none; background: #7000cc; color: #ff4fa3; }
}

/* ---- 88x31 web buttons ---- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.btn-88 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 31px;
  font-family: 'VT323', monospace;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  line-height: 1.15;
  text-decoration: none;
  border-bottom: none;
  letter-spacing: 0.06em;
  border: 1px solid;
  flex-shrink: 0;
  transition: filter 0.08s;
}
.btn-88:hover        { filter: brightness(1.6); border-color: #fff !important; color: #fff !important; }
.btn-88:visited      { color: inherit; }

.btn-88--purple { background: linear-gradient(160deg,#16001e 55%,#2a0045); border-color:#7000cc; color:#cc88ff; }
.btn-88--green  { background: linear-gradient(160deg,#00140a,#001e10);     border-color:#00cc66; color:#00ff88; }
.btn-88--orange { background: linear-gradient(160deg,#1a0800,#281000);     border-color:#cc5500; color:#ff8833; }
.btn-88--blue   { background: linear-gradient(160deg,#000814,#001428);     border-color:#1084d0; color:#6fc3ff; }
.btn-88--dark   { background: #0e0e18;                                      border-color:#444458; color:#8888a0; }

/* ---- footer span ---- */

.footer-note {
  display: block;
  font-family: 'VT323', monospace;
  color: #2a0035;
  font-size: 0.85em;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 48px;
  padding-top: 14px;
  border-top: 1px solid #16001e;
}

/* ---- scanlines overlay ---- */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.032) 3px,
    rgba(0, 0, 0, 0.032) 4px
  );
}

/* ---- gallery image hover ---- */

.gallery-img {
  transition: filter 0.2s, box-shadow 0.2s;
}

.gallery-img:hover {
  filter: saturate(1.15) brightness(1.04);
  box-shadow: 0 0 14px #ff4fa330;
}

/* ---- stamp / gif strip ---- */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-start;
  padding: 2px 0;
}

.badge-row img {
  display: block;
  image-rendering: pixelated;
  height: 15px;
  width: auto;
}

.stamp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
  padding: 2px 0;
}

.stamp-row img {
  display: block;
  image-rendering: pixelated;
  height: 56px;
  width: auto;
}

/* ---- extra site-nav btn-88 variants ---- */

.btn-88--art   { background: linear-gradient(160deg,#1a0010 55%,#2a0018); border-color:#cc0044; color:#ff4488; }
.btn-88--music { background: linear-gradient(160deg,#001818 55%,#002828); border-color:#00aacc; color:#00ddff; }
.btn-88--shows { background: linear-gradient(160deg,#1a1000 55%,#2a1800); border-color:#cc8800; color:#ffcc00; }
.btn-88--blog  { background: linear-gradient(160deg,#001a10 55%,#002a18); border-color:#00cc88; color:#00ffaa; }

/* ---- glitch text effect ---- */

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg2);
  overflow: hidden;
}

.glitch::before {
  left: -2px;
  color: #00e0ff;
  animation: glitch-clip-a 6s infinite step-start;
}

.glitch::after {
  left: 2px;
  color: #ff4fa3;
  animation: glitch-clip-b 6s 0.9s infinite step-start;
}

@keyframes glitch-clip-a {
  0%,90%,100% { clip-path: inset(95% 0 2% 0); }
  10%  { clip-path: inset(30% 0 60% 0); }
  20%  { clip-path: inset(70% 0 5% 0); }
  30%  { clip-path: inset(5% 0 80% 0); }
  40%  { clip-path: inset(50% 0 20% 0); }
  50%  { clip-path: inset(15% 0 70% 0); }
  60%  { clip-path: inset(85% 0 10% 0); }
}

@keyframes glitch-clip-b {
  0%,90%,100% { clip-path: inset(2% 0 95% 0); }
  10%  { clip-path: inset(60% 0 30% 0); }
  20%  { clip-path: inset(5% 0 70% 0); }
  30%  { clip-path: inset(80% 0 5% 0); }
  40%  { clip-path: inset(20% 0 50% 0); }
  50%  { clip-path: inset(70% 0 15% 0); }
  60%  { clip-path: inset(10% 0 85% 0); }
}

@media (prefers-reduced-motion: reduce) {
  .glitch::before,
  .glitch::after { animation: none; clip-path: none; opacity: 0; }
}

/* ---- featured section ---- */

.featured-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.featured-screenshot {
  width: 160px;
  flex-shrink: 0;
  display: block;
  image-rendering: pixelated;
  border: 1px solid var(--border);
}

.featured-info {
  flex: 1;
  min-width: 0;
}

.featured-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-family: 'VT323', monospace;
  font-size: 1em;
  color: var(--dim);
}

.featured-nav-arrows a {
  cursor: pointer;
  border: none;
  font-size: 1.2em;
  margin-left: 6px;
  color: var(--accent);
}

.featured-meta {
  font-family: 'VT323', monospace;
  font-size: 0.9em;
  color: var(--dim);
  line-height: 1.4;
  margin-bottom: 4px;
}

.featured-title {
  font-family: 'VT323', monospace;
  color: var(--accent);
  font-size: 1.15em;
  margin: 4px 0 10px;
  letter-spacing: 0.05em;
}

.featured-char-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.featured-char {
  flex-shrink: 0;
  image-rendering: pixelated;
}

.speech-bubble {
  position: relative;
  background: #e8eef0;
  border: 2px solid #0a0a0a;
  padding: 6px 10px;
  font-family: 'VT323', monospace;
  font-size: 1em;
  color: #1a1a28;
  line-height: 1.25;
  align-self: center;
  max-width: 50ch;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #0a0a0a;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-right-color: #e8eef0;
}

.tex, .latex, .tex sub, .latex sub {
  font-size: 1em;
  text-transform: uppercase;
}

.tex sub, .latex sub {
  vertical-align: -0.4ex;
  margin-left: -0.25em;
  margin-right: -0.125em;
}

.latex sup {
  font-size: 0.85em;
  vertical-align: 0.15em;
  margin-left: -0.36em;
  margin-right: -0.15em;
}   
