/* ============================================================
   RIGELKID BBS — projects.css
   "My Computer" style project archive.
   ============================================================ */

.layout--projects {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

.rail--readme {
  position: sticky;
  top: 18px;
}
.project-rail { min-width: 0; }

/* ------------------------------------------------------------------ desktop icons */
.desktop-icons {
  position: absolute;
  left: 28px;
  bottom: 66px;
  z-index: 0;
  display: flex;
  gap: 13px;
}
.desk-icon {
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 5px 3px;
  border: 1px solid transparent;
  background: transparent;
  color: #f1e7cf;
  font: 10px/1.4 var(--pixel);
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 5px rgba(0, 0, 0, .4);
  cursor: pointer;
}
.desk-icon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  filter: invert(.92) sepia(.18) brightness(1.25) drop-shadow(0 2px 1px rgba(0, 0, 0, .5));
}
.desk-icon:hover,
.desk-icon:focus-visible {
  background: rgba(8, 31, 26, .42);
  border-color: rgba(230, 208, 160, .5);
  outline: 1px dotted rgba(230, 208, 160, .6);
  outline-offset: -3px;
}
@media (max-width: 1139px) {
  .desktop-icons { display: none; }
}
@media (max-height: 900px) {
  .desktop-icons { display: none; }
}

/* ------------------------------------------------------------------ app header */
.app-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 15px 20px 14px;
  color: var(--paper);
  background:
    radial-gradient(ellipse at 82% 0%, rgba(88, 135, 110, .25), transparent 55%),
    linear-gradient(180deg, #17453c, #0e312b);
  border-bottom: 1px solid #071c18;
}
.app-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 244, 210, .028) 0 1px, transparent 1px 3px),
    url("../img/dither.png");
  opacity: .7;
}
.app-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-lo), var(--gold), var(--gold-lo), transparent);
  opacity: .5;
}
.app-head__crest {
  position: relative;
  width: 46px;
  height: 46px;
  flex: none;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .4));
  image-rendering: pixelated;
}
.app-head__text { position: relative; min-width: 0; }
.app-head__kicker {
  margin: 0 0 2px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: .2em;
  line-height: 1.5;
}
.app-head h1 {
  margin: 0;
  color: #f8eed4;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .02em;
}
.app-head__sub {
  margin: 2px 0 0;
  color: #b9ab89;
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: .02em;
}
.app-head__meta {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-left: auto;
  flex: none;
  color: #9aac93;
  font-size: 8px;
  letter-spacing: .08em;
  line-height: 1.6;
  text-align: right;
}
.app-head__meta b {
  color: var(--gold-hi);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}
.app-head__meta span { display: block; }
.app-head__back {
  display: none;
  align-items: center;
  gap: 4px;
  color: var(--gold-hi);
  font-size: 9px;
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 168, 106, .5);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ explorer */
.app-body {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  min-height: 560px;
}

.app-tree {
  padding: 10px 7px 12px;
  background: linear-gradient(180deg, #efe4c8, #e6d7b6);
  border-right: 1px solid #c9b88f;
}
.tree-title {
  margin: 0 6px 5px;
  color: #8b7b60;
  font-size: 8px;
  letter-spacing: .14em;
}
.tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 27px;
  padding: 2px 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #4d4230;
  font: 10px/1.3 var(--pixel);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.tree-item img { width: 14px; height: 14px; flex: none; opacity: .7; image-rendering: pixelated; }
.tree-item b { margin-left: auto; color: #8b7b60; font-size: 8px; font-weight: 400; }
.tree-item:hover { background: rgba(201, 168, 106, .16); }
.tree-item.is-active {
  background: var(--teal-800);
  border-color: #0a2620;
  box-shadow: inset 0 0 0 1px #4e6d59;
  color: var(--gold-hi);
}
.tree-item.is-active img { filter: brightness(0) invert(.92); opacity: .9; }
.tree-item.is-active b { color: #c9b98f; }
.tree-sep {
  height: 1px;
  margin: 7px 5px;
  background: #cdbd96;
  border-bottom: 1px solid rgba(255, 250, 238, .65);
}
.tree-note {
  margin: 10px 7px 0;
  color: #8b7b60;
  font-size: 8px;
  line-height: 1.8;
}

.app-main {
  min-width: 0;
  padding: 13px 15px 16px;
  background: rgba(255, 250, 238, .38);
}
.app-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #cdbd96;
}
.app-toolbar > img { width: 20px; height: 20px; flex: none; opacity: .7; }
.app-toolbar h2 {
  margin: 0;
  color: var(--teal-900);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}
.app-toolbar .count {
  padding: 1px 5px;
  background: #efe2c5;
  border: 1px solid #cdbd96;
  color: #6d5b3d;
  font-size: 8px;
  white-space: nowrap;
}
.app-toolbar .path {
  margin-left: auto;
  color: #8b7b60;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.files {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 11px;
}
.file {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 10px 9px;
  background: rgba(255, 250, 238, .62);
  border: 1px solid #cdbd96;
  box-shadow: 2px 2px 0 rgba(80, 64, 36, .06);
  color: inherit;
  text-decoration: none;
  transition: transform .08s steps(2), border-color .08s steps(2), background .08s steps(2);
}
.file:hover {
  transform: translate(-1px, -1px);
  background: #fcf5e3;
  border-color: var(--teal-500);
  box-shadow: 3px 3px 0 rgba(80, 64, 36, .12);
}
.file.is-hidden { display: none; }
.file__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #efe2c5;
  border: 1px solid #c9b88f;
  box-shadow: inset 1px 1px 0 #fff8e2, inset -1px -1px 0 #b3a17b;
}
.file__icon img { width: 25px; height: 25px; opacity: .74; image-rendering: pixelated; }
.file h3 {
  margin: 0;
  padding-right: 15px;
  color: var(--teal-900);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}
.file p {
  margin: 2px 0 4px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.75;
}
.file__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: #8b7b60;
  font-size: 8px;
  line-height: 1.5;
}
.file__meta .new { color: var(--rose-deep); }
.file__tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.file__tags span {
  padding: 0 4px;
  border: 1px solid #d7c8a5;
  background: #f5ead2;
  color: #7b6a4c;
  font-size: 7.5px;
  line-height: 1.7;
}
.file__arrow {
  position: absolute;
  top: 7px;
  right: 8px;
  color: var(--teal-600);
  font-size: 11px;
}

.app-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 0;
  padding: 7px 9px;
  background: #efe2c5;
  border-left: 3px solid var(--gold);
  color: #6d5b3d;
  font-size: 9.5px;
  line-height: 1.8;
}
.app-note img { width: 14px; height: 14px; flex: none; margin-top: 1px; opacity: .6; }

/* ------------------------------------------------------------------ readme window */
.readme { width: 100%; }
.readme .titlebar {
  background: linear-gradient(90deg, #513223 0%, #8d603e 60%, #a87954 100%);
  border-top-color: #c79a75;
}
.readme__menu {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 22px;
  padding: 0 9px;
  background: var(--chrome);
  border-bottom: 1px solid #8e8b7e;
  color: #2a2821;
  font-size: 10px;
}
.readme__menu span { opacity: .75; }
.readme__body {
  padding: 15px 15px 14px;
  background: #f7efdb;
}
.readme__kicker {
  margin: 0 0 2px;
  color: var(--rose-deep);
  font-size: 7.5px;
  letter-spacing: .18em;
}
.readme__body h2 {
  margin: 0 0 7px;
  color: var(--teal-800);
  font: 400 27px/1.1 var(--gothic);
  letter-spacing: .01em;
}
.readme__body p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.9;
}
.readme__body p b { font-weight: 400; color: var(--teal-800); }
.readme__body hr {
  height: 1px;
  margin: 9px 0;
  border: 0;
  background: #d6c6a2;
}
.readme__filter { display: flex; flex-wrap: wrap; gap: 4px; }
.readme__filter button {
  min-height: 22px;
  padding: 0 6px;
  background: transparent;
  border: 1px solid #c9b88f;
  color: #6d5b3d;
  font: 9px/1 var(--pixel);
  cursor: pointer;
}
.readme__filter button:hover { background: #efe2c5; }
.readme__filter button.is-active {
  background: var(--teal-800);
  border-color: #0a2620;
  color: var(--gold-hi);
  box-shadow: inset 0 0 0 1px #4e6d59;
}
.readme__body .btn { margin-top: 3px; }
.readme__foot {
  margin-top: 12px;
  padding-top: 7px;
  border-top: 1px dotted #cdbd96;
  color: #8b7b60;
  font-size: 7.5px;
  letter-spacing: .06em;
  line-height: 1.8;
}
.readme__barcode {
  width: 100%;
  height: 12px;
  margin-top: 5px;
  background: repeating-linear-gradient(90deg, #4b422f 0 1px, transparent 1px 3px, #4b422f 3px 5px, transparent 5px 8px);
  opacity: .32;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .layout--projects { grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
  .readme__body h2 { font-size: 24px; }
  .files { gap: 8px; }
}

@media (max-width: 1080px) {
  .layout--projects { display: block; }
  .rail--readme { display: none; }
}

@media (max-width: 760px) {
  .app-head { padding: 12px 14px; gap: 10px; }
  .app-head__crest { width: 36px; height: 36px; }
  .app-head h1 { font-size: 18px; }
  .app-head__kicker { font-size: 7px; }
  .app-head__meta { display: none; }
  .app-head__back {
    position: absolute;
    right: 11px;
    top: 11px;
    display: inline-flex;
    font-size: 8px;
  }
  .app-head__sub { font-size: 8px; }
  .app-body { display: block; min-height: 0; }
  .app-tree {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 6px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #c9b88f;
    scrollbar-width: none;
  }
  .app-tree::-webkit-scrollbar { display: none; }
  .tree-title, .tree-sep, .tree-note { display: none; }
  .tree-item {
    width: auto;
    flex: none;
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid #c9b88f;
    font-size: 9px;
    white-space: nowrap;
  }
  .tree-item img { width: 12px; height: 12px; }
  .tree-item b { margin-left: 3px; }
  .app-main { padding: 10px; }
  .app-toolbar .path { display: none; }
  .files { grid-template-columns: 1fr; }
  .file { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 9px; }
  .file__icon { width: 34px; height: 34px; }
  .file__icon img { width: 22px; height: 22px; }
  .file h3 { font-size: 11.5px; }
  .file p { font-size: 9.5px; }
}

@media (max-width: 620px) {
  .app-head { padding: 10px 12px; }
  .app-head h1 { font-size: 16px; }
  .app-head__sub { display: none; }
  .app-toolbar h2 { font-size: 12px; }
  .app-toolbar .count { font-size: 7.5px; }
  .file__tags { display: none; }
  .app-note { font-size: 8.5px; }
}
