/* ── LIMBUS COMPANY PALETTE ──
   Inspired by ProjectMoon's Limbus Company:
   Deep near-black backgrounds, blood crimson, old gold, bone-white text,
   grunge textures, Victorian corporate horror aesthetic.
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Share+Tech+Mono&display=swap');

:root {
  /* Limbus palette */
  --lc-void:     #0d0b0f;   /* deepest background */
  --lc-dark:     #141018;   /* window body bg */
  --lc-surface:  #1c1826;   /* panel / content bg */
  --lc-surface2: #231e30;   /* raised surfaces */
  --lc-raised:   #2e2840;   /* info-box / cards */
  --lc-border:   #3a3254;   /* borders */
  --lc-border2:  #504870;   /* lighter border */

  --lc-gold:     #c9a227;   /* primary accent — Limbus gold */
  --lc-gold-lt:  #e8c458;   /* gold highlight */
  --lc-gold-dk:  #8c6d14;   /* gold shadow */

  --lc-crimson:  #b01c2e;   /* danger / titlebar accent */
  --lc-crimson2: #e02840;   /* brighter crimson */
  --lc-blood:    #6e0f1c;   /* deep blood red */

  --lc-text:     #e8e0d0;   /* primary text — bone-white */
  --lc-text-dim: #9e96b0;   /* muted */
  --lc-text-faint:#5e5875;  /* very muted */
  --lc-inverse:  #0d0b0f;

  /* Win95-style borders adapted to Limbus */
  --win-light:   #4a4266;
  --win-dark:    #0a0810;
  --win-mid:     #2e2840;

  --radius-sm: 0px; /* Keep the sharp 95 aesthetic */
  --transition: 150ms ease;
}

/* ── SCANLINES + GRAIN OVERLAY ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  z-index: 9998;
}

body {
  background-color: var(--lc-void);
  background-image:
    url("https://www.transparenttextures.com/patterns/dark-matter.png"),
    radial-gradient(ellipse at 20% 50%, rgba(176,28,46,0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201,162,39,0.05) 0%, transparent 50%);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 13px;
  color: var(--lc-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

/* ── WINDOW ── */
.win-window {
  position: absolute;
  width: 780px;
  min-width: 340px;
  min-height: 200px;
  background-color: var(--lc-dark);
  background-image: url("https://www.transparenttextures.com/patterns/dark-matter.png");
  /* Limbus-style bevel: gold-tinted top/left, void bottom/right */
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow:
    3px 3px 0 var(--win-dark),
    0 0 40px rgba(176,28,46,0.15),
    inset 0 0 80px rgba(13,11,15,0.4);
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* ── TITLE BAR ── */
.win-titlebar {
  height: 26px;
  background: linear-gradient(to right, var(--lc-blood), var(--lc-crimson) 50%, var(--lc-gold-dk) 100%);
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
  cursor: grab;
  flex-shrink: 0;
  border-bottom: 1px solid var(--lc-gold-dk);
  position: relative;
}
.win-titlebar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("https://www.transparenttextures.com/patterns/dark-matter.png");
  opacity: 0.3;
  pointer-events: none;
}
.win-titlebar:active { cursor: grabbing; }

.win-title-icon { width: 16px; height: 16px; flex-shrink: 0; }
.win-title-text {
  color: var(--lc-gold-lt);
  font-weight: bold;
  font-size: 12px;
  font-family: 'IM Fell English', Georgia, serif;
  letter-spacing: 0.04em;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.win-btns { display: flex; gap: 3px; }
.win-btn {
  width: 16px; height: 14px;
  background: var(--lc-raised);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: bold; cursor: pointer;
  color: var(--lc-gold); line-height: 1;
  flex-shrink: 0;
}
.win-btn:hover { background: var(--lc-crimson); color: var(--lc-text); }
.win-btn:active {
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}

/* ── MENU BAR ── */
.win-menubar {
  height: 22px;
  display: flex;
  align-items: stretch;
  padding: 0 2px;
  background: var(--lc-surface2);
  border-bottom: 1px solid var(--lc-border);
  flex-shrink: 0;
  position: relative;
}
.win-menu-item {
  padding: 2px 10px;
  cursor: pointer;
  display: flex; align-items: center;
  font-size: 12px;
  color: var(--lc-text-dim);
  position: relative;
  letter-spacing: 0.03em;
}
.win-menu-item:hover,
.win-menu-item.active {
  background: var(--lc-blood);
  color: var(--lc-gold-lt);
}

/* ── DROPDOWN ── */
.win-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--lc-surface2);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  box-shadow: 3px 3px 0 var(--win-dark), 0 4px 20px rgba(0,0,0,0.6);
  z-index: 100;
  min-width: 170px;
}
.win-dropdown.open { display: block; }
.win-dropdown-item {
  padding: 5px 20px 5px 24px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
  color: var(--lc-text);
}
.win-dropdown-item:hover { background: var(--lc-blood); color: var(--lc-gold-lt); }
.win-dropdown-sep {
  height: 1px;
  background: var(--lc-border);
  margin: 3px 4px;
  border-top: 1px solid var(--win-dark);
}

/* ── CONTENT AREA ── */
.win-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--lc-surface);
  background-image: url("https://www.transparenttextures.com/patterns/dark-matter.png");
  border-top: 1px solid var(--lc-border);
  border-left: 1px solid var(--lc-border);
  margin: 0;
}

/* ── PANELS ── */
.win-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 0;
  flex-direction: column;
}
.win-panel.active { display: flex; }
.win-panel::-webkit-scrollbar { width: 10px; }
.win-panel::-webkit-scrollbar-track { background: var(--lc-dark); }
.win-panel::-webkit-scrollbar-thumb {
  background: var(--lc-raised);
  border: 1px solid var(--lc-border);
}
.win-panel::-webkit-scrollbar-thumb:hover { background: var(--lc-gold-dk); }

/* Section header bar */
.section-header {
  padding: 10px 18px 8px;
  background: linear-gradient(to right, var(--lc-surface2), var(--lc-surface));
  border-bottom: 2px solid var(--lc-gold-dk);
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 14px;
  color: var(--lc-gold);
  letter-spacing: 0.06em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header::before {
  content: '◈';
  color: var(--lc-crimson);
  font-size: 12px;
}

/* ── PANEL: ABOUT (main "File" tab) ── */
.panel-about { background: var(--lc-surface); }
.about-hero {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  flex-shrink: 0;
  border-bottom: 2px solid var(--lc-gold-dk);
  filter: saturate(0.8) brightness(0.75);
}
.about-body { padding: 16px 20px; }
.about-body h2 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 18px;
  font-weight: normal;
  margin-bottom: 6px;
  color: var(--lc-gold);
  border-bottom: 1px solid var(--lc-border);
  padding-bottom: 6px;
  letter-spacing: 0.04em;
}
.about-body p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--lc-text);
  margin-bottom: 10px;
  max-width: none;
}
.about-body p em {
  color: var(--lc-gold);
  font-style: normal;
}

/* Interests grid */
.interests-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 14px;
}
.interest-box {
  background: var(--lc-raised);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  padding: 10px 12px;
}
.interest-box h3 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 11px;
  font-weight: normal;
  color: var(--lc-gold);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--lc-border);
  padding-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.interest-box p {
  font-size: 11px;
  color: var(--lc-text-dim);
  margin: 0;
  line-height: 1.6;
}

/* Socials */
.socials-section { margin-top: 14px; }
.socials-section h3 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 13px;
  color: var(--lc-gold);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  font-weight: normal;
}
.socials-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--lc-raised);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  color: var(--lc-text-dim);
  text-decoration: none;
  font-size: 12px;
  transition: background var(--transition), color var(--transition);
}
.social-link:hover {
  background: var(--lc-blood);
  color: var(--lc-gold-lt);
}
.social-link .social-icon {
  color: var(--lc-gold);
  font-size: 14px;
  flex-shrink: 0;
}
.social-label { flex: 1; }
.social-url { font-size: 10px; color: var(--lc-text-faint); }

/* ── PANEL: GALLERY ── */
.panel-gallery { background: var(--lc-surface); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 14px;
}
.char-card {
  background: var(--lc-raised);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.char-card:hover {
  box-shadow: 0 0 12px rgba(201,162,39,0.3), 2px 2px 0 var(--win-dark);
  transform: translate(-1px,-1px);
}
.char-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: saturate(0.85);
  border-bottom: 1px solid var(--lc-border);
}
.char-card-img-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--lc-surface2), var(--lc-raised));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border-bottom: 1px solid var(--lc-border);
  color: var(--lc-text-faint);
}
.char-card-info {
  padding: 8px 10px;
}
.char-card-name {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 13px;
  color: var(--lc-gold);
  display: block;
  letter-spacing: 0.02em;
}
.char-card-role {
  font-size: 10px;
  color: var(--lc-text-faint);
  margin-top: 2px;
  display: block;
}

/* ── PANEL: PROJECTS ── */
.panel-projects { background: var(--lc-surface); }
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px;
}
.project-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--lc-raised);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}
.project-entry:hover {
  box-shadow: 0 0 10px rgba(201,162,39,0.2);
  background: var(--lc-surface2);
}
.project-icon {
  font-size: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}
.project-info { flex: 1; }
.project-title {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 14px;
  color: var(--lc-gold);
  margin-bottom: 4px;
  font-weight: normal;
}
.project-desc {
  font-size: 11px;
  color: var(--lc-text-dim);
  line-height: 1.6;
  max-width: none;
  margin: 0;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.tag {
  font-size: 10px;
  padding: 1px 6px;
  background: var(--lc-surface2);
  border: 1px solid var(--lc-border);
  color: var(--lc-text-faint);
  letter-spacing: 0.04em;
}
.tag.tag-wip {
  border-color: var(--lc-crimson);
  color: var(--lc-crimson2);
}
.tag.tag-complete {
  border-color: var(--lc-gold-dk);
  color: var(--lc-gold);
}

/* ── STATUS BAR ── */
.win-statusbar {
  height: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  background: var(--lc-surface2);
  border-top: 1px solid var(--lc-border);
  flex-shrink: 0;
}
.status-pane {
  height: 16px;
  border-top: 1px solid var(--lc-border);
  border-left: 1px solid var(--lc-border);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  padding: 0 8px;
  font-size: 10px;
  display: flex;
  align-items: center;
  color: var(--lc-text-faint);
  letter-spacing: 0.04em;
}
.status-pane.accent { color: var(--lc-gold); }

/* ── RESIZE HANDLE ── */
.win-resize {
  position: absolute;
  bottom: 0; right: 0;
  width: 16px; height: 16px;
  cursor: se-resize;
  background: linear-gradient(135deg, transparent 50%, var(--lc-gold-dk) 50%);
}

/* ── TASKBAR ── */
.taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: var(--lc-surface2);
  border-top: 2px solid var(--lc-gold-dk);
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
  z-index: 9999;
}
.start-btn {
  height: 22px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 12px;
  font-weight: normal;
  color: var(--lc-gold-lt);
  cursor: pointer;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  background: var(--lc-raised);
}
.start-btn:hover { background: var(--lc-blood); }
.start-btn:active {
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}
.taskbar-sep {
  width: 1px; height: 20px;
  background: var(--lc-border);
  border-right: 1px solid var(--win-dark);
}
.task-btn {
  height: 22px; padding: 0 10px;
  font-size: 11px;
  letter-spacing: 0.03em;
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  background: var(--lc-raised);
  color: var(--lc-text-dim);
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  text-decoration: none;
}
.task-btn:hover { background: var(--lc-surface2); color: var(--lc-gold-lt); }
.task-btn.active {
  background: var(--lc-surface);
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
  color: var(--lc-gold);
}
.taskbar-clock {
  margin-left: auto;
  height: 22px;
  padding: 0 10px;
  border-top: 1px solid var(--lc-border);
  border-left: 1px solid var(--lc-border);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  font-size: 11px;
  display: flex; align-items: center;
  color: var(--lc-text-dim);
  letter-spacing: 0.05em;
}

/* ── DECORATIVE DIVIDER ── */
.lc-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--lc-gold-dk), transparent);
  margin: 12px 0;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   AESTHETIC FLOAT MINI-WINDOWS
   Small draggable desktop widgets showing
   atmospheric images / gifs
   ══════════════════════════════════════════════ */

.float-win {
  position: absolute;
  display: flex;
  flex-direction: column;
  user-select: none;
  z-index: 10;
  /* Same Limbus bevel as main window */
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow:
    3px 3px 0 var(--win-dark),
    0 0 24px rgba(176,28,46,0.12);
  background: var(--lc-dark);
}

/* Titlebar for float windows — thinner, subtler */
.float-titlebar {
  height: 20px;
  background: linear-gradient(to right, var(--lc-blood), var(--lc-crimson) 60%, var(--lc-gold-dk));
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
  cursor: grab;
  flex-shrink: 0;
  border-bottom: 1px solid var(--lc-gold-dk);
}
.float-titlebar:active { cursor: grabbing; }

.float-title-text {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 10px;
  color: var(--lc-gold-lt);
  letter-spacing: 0.05em;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

.float-btn-close {
  width: 13px;
  height: 11px;
  background: var(--lc-raised);
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  cursor: pointer;
  color: var(--lc-gold);
  line-height: 1;
  flex-shrink: 0;
}
.float-btn-close:hover { background: var(--lc-crimson); color: #fff; }
.float-btn-close:active {
  border-top: 1px solid var(--win-dark);
  border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}

/* The image/gif body */
.float-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: var(--lc-void);
  border-top: 1px solid var(--lc-border);
}

.float-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.75) brightness(0.85);
  transition: filter 0.3s ease;
}
.float-win:hover .float-img {
  filter: saturate(0.95) brightness(0.95);
}

/* Placeholder when no image is set */
.float-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(160deg, var(--lc-surface2), var(--lc-raised));
  color: var(--lc-text-faint);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 8px;
}
.float-placeholder-icon { font-size: 22px; }

/* Subtle gold corner ornament */
.float-win::after {
  content: '◈';
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-size: 8px;
  color: var(--lc-gold-dk);
  pointer-events: none;
  opacity: 0.6;
}

/* Taskbar re-open button for float windows */
.task-btn-float {
  height: 22px;
  padding: 0 8px;
  font-size: 10px;
  letter-spacing: 0.03em;
  border-top: 1px solid var(--win-light);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-dark);
  background: var(--lc-raised);
  color: var(--lc-text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Share Tech Mono', monospace;
}
.task-btn-float:hover { background: var(--lc-surface2); color: var(--lc-gold); }

/* ── Inline SVG placeholder sizing (main index & gallery) ── */
.char-card-img-placeholder .placeholder-svg { width: 56px; height: 56px; opacity: 0.55; }
