/*
======================================================================
PROJECT DETAIL PAGE STYLES
Extends css/style.css for individual project pages.
======================================================================
*/

/* ── PROJECT HERO SECTION ── */
.proj-hero {
  padding-top: 66px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.proj-hero-inner {
  padding: 64px 0 52px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--light);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 32px;
  transition: color .2s;
}

.back-link:hover {
  color: var(--orange);
}

.proj-hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.proj-hero-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--sec-num);
  user-select: none;
}

.proj-hero-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.proj-hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--dark);
  margin-bottom: 40px;
}

.proj-hero-sub {
  color: var(--dark);
}

/* Detail meta strip */
.proj-hero-details {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  max-width: 720px;
}

.proj-detail-item {
  flex: 1;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  background: var(--paper);
}

.proj-detail-item:last-child {
  border-right: none;
}

.proj-detail-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.proj-detail-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--dark);
  font-weight: 500;
}

/* ── HERO IMAGE SLOT ── */
.proj-img-hero {
  margin-top: 0;
  padding-top: 48px;
  padding-bottom: 0;
}

/* ── IMAGE PLACEHOLDERS ── */
.img-placeholder {
  background: var(--paper);
  border: 2px dashed var(--border);
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .25s;
}

.img-placeholder:hover {
  border-color: var(--orange-border-hover);
}

.img-placeholder--hero {
  aspect-ratio: 21 / 8;
}

.img-placeholder--wide {
  aspect-ratio: 21 / 7;
}

.img-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--light);
  text-align: center;
  padding: 24px;
}

.img-placeholder-inner svg {
  opacity: 0.45;
  flex-shrink: 0;
}

.img-placeholder-inner span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── PROJECT PAGE IMAGES ── */
.img-row img,
.img-wide img,
.proj-img-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

/* ── CONTENT GRID ── */
.proj-main {
  background: var(--white);
  padding-bottom: 100px;
}

.proj-content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 72px;
  padding-top: 64px;
}

/* ── BODY SECTIONS ── */
.proj-body {
  min-width: 0;
}

.proj-section {
  margin-bottom: 56px;
}

.proj-section p {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.82;
  margin-bottom: 18px;
}

.proj-section p:last-child {
  margin-bottom: 0;
}

.proj-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.proj-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--dark);
  margin-bottom: 20px;
}

/* Image rows */
.img-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 56px;
}

.img-wide {
  margin-bottom: 56px;
}

/* Unordered lists within project body */
.proj-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.proj-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.7;
}

.proj-list li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 1px;
  transform: rotate(45deg);
  margin-top: 7px;
}

.proj-list li strong {
  color: var(--dark);
}

/* ── TABLES ── */
.proj-table-wrap {
  overflow-x: auto;
  border-radius: 3px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.proj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  min-width: 480px;
}

.proj-table thead {
  background: var(--dark);
}

.proj-table thead th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.proj-table thead th:last-child {
  border-right: none;
}

.proj-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

.proj-table tbody tr:last-child {
  border-bottom: none;
}

.proj-table tbody tr:hover {
  background: var(--orange-hover-subtle);
}

.proj-table tbody tr:nth-child(even) {
  background: var(--paper);
}

.proj-table tbody tr:nth-child(even):hover {
  background: var(--orange-hover-subtle);
}

.proj-table tbody td {
  padding: 12px 16px;
  color: var(--mid);
  border-right: 1px solid var(--border);
  line-height: 1.5;
}

.proj-table tbody td:last-child {
  border-right: none;
}

.proj-table tbody td:first-child {
  color: var(--dark);
  font-weight: 500;
}

.proj-table-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  color: var(--light);
  line-height: 1.7;
  padding: 0 4px;
}

/* Status badges in tables */
.status-pass {
  color: #2a7a4a !important;
  font-weight: 600 !important;
}

.status-fail {
  color: #b83232 !important;
  font-weight: 600 !important;
}

[data-theme="dark"] .status-pass {
  color: #4acd7a !important;
}

[data-theme="dark"] .status-fail {
  color: #f06060 !important;
}

/* Dark mode: table header column divider */
[data-theme="dark"] .proj-table thead th {
  border-right-color: rgba(255,255,255,0.06);
}

/* ── SIDEBAR ── */
.proj-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 24px;
}

.sidebar-card-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--orange);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* Tag list in sidebar */
.sidebar-tag-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-tag-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--mid);
}

.sidebar-tag-list li::before {
  content: '';
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  background: var(--orange);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* Metrics */
.sidebar-metric {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-metric:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-metric:first-of-type {
  padding-top: 0;
}

.sidebar-metric-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 2px;
}

.sidebar-metric-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: var(--light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-text {
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.7;
}

/* Sidebar Stats Grid (Checkerboard Box style) */
.sidebar-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.sidebar-stats-grid .stat {
  padding: 16px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.sidebar-stats-grid .stat:nth-child(2n) {
  border-right: none;
}

.sidebar-stats-grid .stat:nth-child(7),
.sidebar-stats-grid .stat:nth-child(8) {
  border-bottom: none;
}

/* Sidebar buttons */
.sidebar-btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  .proj-content-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .proj-sidebar {
    order: -1;
  }

  .proj-hero-details {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .proj-detail-item {
    min-width: 140px;
  }

  .img-placeholder--hero {
    aspect-ratio: 16 / 7;
  }
}

@media (max-width: 600px) {
  .proj-hero-title {
    font-size: 2.6rem;
  }

  .img-row {
    grid-template-columns: 1fr;
  }

  .proj-hero-details {
    flex-direction: column;
  }

  .proj-detail-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .proj-detail-item:last-child {
    border-bottom: none;
  }
}
