@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
}

@font-face {
  font-family: 'Michroma';
  src: url('fonts/Michroma-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Audiowide';
  src: url('fonts/Audiowide-Regular.ttf') format('truetype');
}

:root {
  --bg-dark: #222A2E;
  --primary: #343E43;
  --light: #C1DFEA;
  --accent: #FF3D81;
  --mid: #6E8F9C;
  --fixed-width: 960px;
}

[data-theme="vaporwave"] {
  --bg-dark: #2D1B3D;
  --primary: #3D2B50;
  --light:   #6FFFE9;
  --accent:  #F8B4FF;
  --mid:     #9B6FBF;
}

[data-theme="amber-neo"] {
  --bg-dark: #1C1A18;
  --primary: #2A2620;
  --light:   #FFD369;
  --accent:  #F5D08C;
  --mid:     #8A7A50;
}

[data-theme="mint-noir"] {
  --bg-dark: #101417;
  --primary: #1A2025;
  --light:   #D4FFF2;
  --accent:  #8FF6C7;
  --mid:     #4A7A65;
}

[data-theme="neon-azure"] {
  --bg-dark: #0B1B2B;
  --primary: #112233;
  --light:   #CFEFFF;
  --accent:  #47FFC0;
  --mid:     #3A7A9A;
}

[data-theme="rosepunk"] {
  --bg-dark: #141016;
  --primary: #1F1520;
  --light:   #FFD3E8;
  --accent:  #FF4D8D;
  --mid:     #7A4560;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

h1, h2 {
  font-family: 'Michroma', sans-serif;
}

/* keep monospace where it was intentional */
.width-toggle,
.card::after,
.fanart-credit,
.carousel-btn,
time {
  font-family: monospace;
}

body {
  background: var(--bg-dark);
  color: var(--light);
}

/* ── PAGE WRAP (fixed-width mode) ── */
.page-wrap {
  width: 100%;
  transition: max-width 0.3s ease, margin 0.3s ease;
}

.page-wrap.fixed-width {
  max-width: var(--fixed-width);
  margin-left: auto;
  margin-right: auto;
}

/* ── WIDTH TOGGLE BUTTON ── */
.width-toggle {
  display: block;
  margin: 0.6rem 1rem 0 auto;
  background: var(--primary);
  color: var(--mid);
  border: 1px solid var(--mid);
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.width-toggle:hover,
.width-toggle.active {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* ── TOP PROFILE ── */
.top-profile {
  display: block;
  padding: 0;
  margin: 1rem;
  overflow: hidden;
}

.profile-pic {
  width: 100%;
  height: auto;
  display: block;
  transition: box-shadow 0.2s ease;
}

/* ── NAVBAR ── */
.nav-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 1rem;
  padding: 0.8rem;
  background: var(--primary);
  border: 2px solid var(--mid);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-bar:hover {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.nav-bar a {
  color: var(--light);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  transition: all 0.2s ease;
}

.nav-bar a:hover {
  text-shadow: 0 0 6px var(--accent);
}

/* ── 2×2 INFO GRID ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem;
}

/* ── CARDS ── */
.card {
  padding: 1.2rem;
  border: 2px solid var(--mid);
  background: var(--primary);
  position: relative;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  text-align: center;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.card h2 {
  margin-bottom: 0.3rem;
}

.card-sub {
  font-size: 0.7rem;
  color: var(--mid);
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

/* tag on each card */
.card::after {
  content: "[//]";
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 0.65rem;
  color: var(--mid);
}

/* ── LIST ── */
ul {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.3rem;
}

/* ── GRAPHICS CARD ── */
.blinkie-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--mid) transparent;
}

.blinkie-grid::-webkit-scrollbar { width: 4px; }
.blinkie-grid::-webkit-scrollbar-thumb { background: var(--mid); }

.blinkie-placeholder {
  width: 88px;
  height: 31px;
  background: var(--bg-dark);
  border: 1px dashed var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: var(--mid);
  flex-shrink: 0;
}

.blinkie-placeholder.sticker {
  width: 60px;
  height: 60px;
  border-radius: 4px;
}

.blinkie-grid img {
  image-rendering: pixelated;
  display: block;
}

/* ── GRAPHIC SECTION LABELS ── */
.graphic-label {
  width: 100%;
  text-align: left;
  font-size: 0.65rem;
  color: var(--mid);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  padding: 4px 0 2px;
  border-bottom: 1px solid var(--mid);
  margin-bottom: 2px;
}

/* ── FANART CAROUSEL ── */
.fanart-card {
  display: flex;
  flex-direction: column;
}

.fanart-carousel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.fanart-stage {
  flex: 1;
  position: relative;
  min-height: 180px;
}

.fanart-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeSlide 0.25s ease;
}

.fanart-slide.active {
  display: flex;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fanart-img-wrap { width: 100%; }

.fanart-placeholder {
  width: 100%;
  height: 150px;
  background: var(--bg-dark);
  border: 1px dashed var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--mid);
}

.fanart-img-wrap img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
}

.fanart-credit {
  font-size: 0.7rem;
  color: var(--mid);
}

.fanart-credit a {
  color: var(--accent);
  text-decoration: none;
}

.fanart-credit a:hover {
  text-shadow: 0 0 4px var(--accent);
}

.carousel-btn {
  background: none;
  border: 1px solid var(--mid);
  color: var(--mid);
  font-size: 1.1rem;
  width: 28px;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.fanart-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 0.5rem;
}

.fanart-dot {
  width: 8px;
  height: 8px;
  background: var(--mid);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, box-shadow 0.2s;
}

.fanart-dot.active {
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent);
}

/* ── FOOTER ── */
.footer {
  text-align: center;
  margin: 1rem;
  padding: 0.8rem;
  font-size: 0.8rem;
  background: var(--primary);
  border: 2px solid var(--mid);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.footer:hover {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ── SCANLINES ── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.03) 3px
  );
}

/* ── BORDER RADIUS ── */
.card, .nav-bar, .footer, .top-profile {
  border-radius: 10px;
}

/* ── BLOG FEED ── */
.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem;
}

.blog-entry {
  padding: 1.2rem 1.5rem;
  background: var(--primary);
  border: 2px solid var(--mid);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-entry:hover {
  box-shadow: 0 0 10px var(--accent);
}

.blog-entry time {
  display: block;
  font-size: 0.75rem;
  color: var(--mid);
  margin-bottom: 0.5rem;
}

.blog-entry a {
  color: var(--accent);
  text-decoration: none;
}

.blog-entry a:hover {
  text-shadow: 0 0 4px var(--accent);
}

/* ── ACTIVE NAV LINK ── */
.nav-active {
  color: var(--accent) !important;
  text-shadow: 0 0 6px var(--accent);
}

/* ── SINGLE COLUMN VARIANT ── */
.single-col {
  grid-template-columns: 1fr;
}

/* ── PAGE TITLE ── */
.page-title {
  text-align: center;
  margin: 1.5rem 1rem 0.5rem;
}

.page-title h1 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--mid);
  letter-spacing: 0.05em;
}

/* ── LEFT-ALIGNED CARD TEXT ── */
.card.left-text { text-align: left; }
.card.left-text h2 { text-align: center; }
.card.left-text .card-sub { text-align: center; }

/* ── PROJECT LAYOUT ── */
.project-body { margin: 1rem; }
.project-split { grid-template-columns: 1fr 1fr; }

/* ── THEME PANEL ── */
.theme-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0.3rem 1rem 0 auto;
  width: fit-content;
  font-family: monospace;
  font-size: 0.7rem;
  position: relative;
  z-index: 100;
}

.theme-toggle-btn {
  display: block;
  margin-left: auto;
  background: var(--primary);
  color: var(--mid);
  border: 1px solid var(--mid);
  padding: 0.3rem 0.7rem;
  font-family: monospace;
  font-size: 0.7rem;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.theme-toggle-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.theme-drawer {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--primary);
  border: 1px solid var(--mid);
  border-radius: 6px;
  padding: 0.6rem;
  margin-top: 0.4rem;
  min-width: 180px;
  position: absolute;
  right: 0;
  top: 100%;
}

.theme-drawer.open { display: flex; }

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--light);
  font-family: monospace;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  text-align: left;
  transition: background 0.15s;
}

.theme-option:hover { background: var(--bg-dark); }
.theme-option.active { color: var(--accent); }

.theme-swatch {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.theme-swatch span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: block;
}

/* ── PROJECTS PAGE CURSOR ── */
body.projects-page {
  cursor: url('oth163.cur'), auto;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .info-grid { grid-template-columns: 1fr; }
  .nav-bar { flex-wrap: wrap; gap: 0.4rem; }
  .profile-pic { width: 100%; }
  .width-toggle { display: none; }
  .project-split { grid-template-columns: 1fr; }
}

/* ── LINK ME BOX ── */
.link-me-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--mid);
}

.link-me-box textarea {
  width: 100%;
  background: var(--bg-dark);
  color: var(--mid);
  border: 1px solid var(--mid);
  font-family: monospace;
  font-size: 0.6rem;
  padding: 0.3rem;
  resize: none;
  cursor: pointer;
  border-radius: 4px;
}

.link-me-box textarea:focus {
  outline: none;
  border-color: var(--accent);
}