﻿/* ==========================================================================
   Project Archive
   ========================================================================== */

.project-visual-index {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 16px;
  margin: 0 0 20px;
  overflow-x: auto;
  padding: 2px 2px 10px;
}

.project-visual {
  --project-card-image-top: 8px;
  --project-card-body-top: 136px;
  position: relative;
  overflow: hidden;
  min-height: 306px;
  border: 1px solid rgba(173,126,58,.74);
  border-radius: 3px;
  padding: 0;
  background:
    linear-gradient(90deg, transparent calc(100% - 10px), rgba(83, 61, 34, .2) calc(100% - 10px), rgba(255, 246, 215, .24) calc(100% - 8px), rgba(77, 55, 30, .28) 100%),
    linear-gradient(180deg, rgba(244,232,199,.98), rgba(211,188,141,.95)),
    url("../generated/world-map-ui-texture.png") center / 250% auto no-repeat;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: #1b1711;
  box-shadow:
    0 18px 34px rgba(0,0,0,.28),
    5px 5px 0 rgba(69, 49, 28, .46),
    inset 0 0 0 1px rgba(255,246,215,.34);
}

.project-visual::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 4;
  width: 34px;
  height: 34px;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(92,66,35,.45) 0 47%, rgba(255,247,220,.5) 48% 52%, rgba(187,139,66,.7) 53% 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  opacity: .78;
}

.project-visual-frame {
  position: absolute;
  top: var(--project-card-image-top);
  left: 12px;
  width: calc(100% - 24px);
  height: 132px;
  margin: 0;
  border-radius: 2px 2px 0 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,246,218,.86), rgba(205,178,126,.55)),
    url("../generated/world-map-ui-texture.png") center / 180% auto no-repeat;
  border: 1px solid rgba(82,58,31,.42);
  border-bottom-color: rgba(82,58,31,.58);
  box-shadow: 0 5px 12px rgba(57,39,21,.2);
}

.project-visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .88;
  border: 0;
  box-shadow: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.project-visual span {
  display: block;
  min-height: 150px;
  margin-top: var(--project-card-body-top);
  padding: 24px 18px 30px;
  border-top: 1px solid rgba(101,73,38,.28);
  background:
    linear-gradient(rgba(93,66,35,.18) 1px, transparent 1px) 18px 62px / calc(100% - 44px) 28px no-repeat,
    linear-gradient(rgba(93,66,35,.12) 1px, transparent 1px) 18px 92px / calc(100% - 44px) 28px no-repeat,
    linear-gradient(180deg, rgba(246,235,205,.76), rgba(213,190,145,.34));
}

.project-visual small,
.project-visual b,
.project-visual em {
  display: block;
  line-height: 1.25;
  font-style: normal;
}

.project-visual small {
  margin-bottom: 8px;
  color: rgba(105,75,36,.76);
  font-size: 11px;
  font-weight: 800;
}

.project-visual b {
  font-size: 19px;
  color: #15110c;
  word-break: keep-all;
}

.project-visual em {
  margin-top: 8px;
  min-height: 34px;
  font-size: 13px;
  color: rgba(44,35,24,.78);
}

.project-visual.is-active {
  border-color: rgba(220,174,87,.78);
  box-shadow: 0 0 0 2px rgba(220,174,87,.22), 0 22px 42px rgba(0,0,0,.32);
}

.project-visual.is-active img,
.project-visual:hover img {
  opacity: 1;
  transform: scale(1.025);
}

@media (max-width: 980px) {
  .project-visual-index {
    grid-template-columns: repeat(5, minmax(180px, 1fr));
  }
}

.compact-work-section {
  min-height: auto;
}

.compact-section-inner {
  padding-top: 68px;
  padding-bottom: 68px;
}

.compact-head {
  margin-bottom: 20px;
}

.project-browser {
  display: block;
}

.work-subnav {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 6px;
  margin: 0 0 14px;
  padding: 6px;
  border: 1px solid rgba(199,148,63,.32);
  border-radius: 8px;
  background: rgba(8, 12, 15, .74);
  box-shadow: inset 0 0 0 1px rgba(255,230,160,.04), 0 12px 24px rgba(0,0,0,.22);
}

.work-subtab {
  border: 1px solid rgba(199,148,63,.24);
  border-radius: 6px;
  padding: 10px 18px;
  background:
    linear-gradient(180deg, rgba(18,25,29,.86), rgba(9,14,17,.9));
  color: rgba(232, 223, 201, .78);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,230,160,.04);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.work-subtab:hover,
.work-subtab:focus-visible {
  border-color: rgba(241,199,91,.58);
  color: #fffdf8;
  background:
    linear-gradient(180deg, rgba(27,37,42,.96), rgba(12,18,22,.96));
}

.work-subtab.is-active {
  border-color: rgba(214, 161, 72, .78);
  background:
    linear-gradient(180deg, rgba(173, 55, 42, .96), rgba(121, 37, 31, .98));
  color: #fff;
  box-shadow: 0 8px 20px rgba(158,52,39,.28), inset 0 0 0 1px rgba(255,230,160,.12);
}

.work-panel {
  display: none;
}

.work-panel.is-active {
  display: block;
}

.work-etc-panel {
  max-width: 980px;
}

.project-panels {
  border: 1px solid rgba(199, 148, 63, .34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(202,154,71,.12), transparent 30%),
    linear-gradient(180deg, rgba(18,25,29,.94), rgba(9,14,17,.96)),
    url("../generated/document-portal-tiles.png") center / cover no-repeat;
  min-height: 540px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,230,160,.06), 0 18px 44px rgba(0,0,0,.32);
}

.project-panel {
  display: none;
  padding: 24px;
}

.project-panel.is-active {
  display: block;
}

.project-panel-head h3 {
  margin: 4px 0 10px;
  color: #f2d28a;
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.1;
}

.project-panel-head h3 small {
  display: inline-block;
  color: rgba(242, 210, 138, .76);
  font-size: .56em;
  font-weight: 800;
}

.project-panel-head p {
  margin: 0;
  color: rgba(232, 223, 201, .76);
  max-width: 780px;
}

.compact-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.75fr);
  gap: 18px;
  margin-top: 18px;
}

.compact-detail-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.compact-proof,
.compact-project-docs {
  border-top: 1px solid rgba(199,148,63,.24);
  padding-top: 14px;
}

.compact-proof h4,
.compact-project-docs h4 {
  margin: 0 0 8px;
  color: #f1c75b;
  font-size: 13px;
}

.compact-proof ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(232, 223, 201, .74);
  font-size: 14px;
}

.project-panels .badge {
  border-color: rgba(241,199,91,.3);
  background: rgba(255,255,255,.035);
  color: var(--fantasy-text);
}

.compact-docs {
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.compact-docs .doc-chip {
  padding: 9px 10px;
}

.etc-details {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(199, 148, 63, .34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 12%, rgba(202,154,71,.12), transparent 28%),
    linear-gradient(180deg, rgba(18,25,29,.94), rgba(9,14,17,.96)),
    url("../generated/document-portal-tiles.png") center / cover no-repeat;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255,230,160,.06), 0 18px 44px rgba(0,0,0,.32);
}

.etc-details::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(211, 160, 70, .18);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}

.etc-details summary {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 24px 28px 18px;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid rgba(211, 160, 70, .16);
}

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

.etc-details summary span {
  color: #f2d28a;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.etc-details summary b {
  color: #fffdf8;
  font-size: 18px;
}

.etc-details[open] {
  padding-bottom: 18px;
}

.etc-details .etc-layout {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  padding: 18px 28px 28px;
}

.work-etc-panel .next-card {
  border-color: var(--fantasy-line);
  background:
    linear-gradient(180deg, rgba(18,25,29,.72), rgba(9,14,17,.82));
  color: var(--fantasy-text);
  box-shadow: var(--fantasy-inset);
}

.work-etc-panel .next-card h3 {
  color: var(--fantasy-gold);
}

.work-etc-panel .next-card p {
  color: var(--fantasy-text);
}

@media (max-width: 900px) {
  .project-browser,
  .compact-detail-grid {
    grid-template-columns: 1fr;
  }

  .project-panels {
    min-height: auto;
  }
}

.doc-chip-list {
  display: grid;
  gap: 8px;
}

.doc-chip {
  display: block;
  width: 100%;
  border: 1px solid var(--fantasy-line);
  border-radius: 8px;
  background: var(--fantasy-chip-bg);
  padding: 10px 12px;
  color: var(--fantasy-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
  box-shadow: var(--fantasy-inset);
}

.doc-chip:hover,
.doc-chip:focus-visible {
  border-color: var(--fantasy-line-strong);
  background: var(--fantasy-chip-bg-hover);
}

.doc-chip b {
  color: var(--fantasy-gold);
  font-size: 12px;
  margin-right: 6px;
}

.doc-chip-action {
  display: block;
  margin-top: 6px;
  color: var(--fantasy-teal);
  font-size: 12px;
  font-weight: 800;
}

.stage-evidence-docs {
  margin-top: 8px;
}

