.back-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--thermal-cyan);
  text-decoration: none;
}
.back-link:hover {
  opacity: 0.7;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
}
@media (min-width: 768px) {
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .resource-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.resource-card {
  border: 1px solid rgba(0, 217, 255, 0.25);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s ease;
}
.resource-card:hover {
  border-color: var(--thermal-cyan);
}

.resource-type {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--thermal-acid);
}

.resource-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--thermal-white);
  line-height: 1.1;
}

.resource-desc {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--thermal-white);
  opacity: 0.7;
  flex-grow: 1;
}

.resource-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.resource-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  text-decoration: none;
  text-align: center;
  flex: 1;
  border: 1px solid var(--thermal-white);
  color: var(--thermal-white);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.resource-btn:hover {
  background: var(--thermal-cyan);
  border-color: var(--thermal-cyan);
  color: var(--thermal-black);
}
.resource-btn.download {
  border-color: var(--thermal-coral);
}
.resource-btn.download:hover {
  background: var(--thermal-coral);
  border-color: var(--thermal-coral);
  color: var(--thermal-black);
}

.resource-empty {
  font-family: var(--font-mono);
  color: var(--thermal-white);
  opacity: 0.5;
  font-size: 0.9375rem;
}

/* preview modal/lightbox */
.resource-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 32px;
}
.resource-modal-overlay.open {
  display: flex;
}
.resource-modal {
  background: var(--thermal-black);
  border: 1px solid var(--thermal-cyan);
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  display: flex;
  flex-direction: column;
}
.resource-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 217, 255, 0.25);
}
.resource-modal-title {
  font-family: var(--font-display);
  color: var(--thermal-white);
  font-size: 1.25rem;
  text-transform: uppercase;
}
.resource-modal-close {
  background: none;
  border: none;
  color: var(--thermal-white);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.resource-modal-close:hover {
  color: var(--thermal-coral);
}
.resource-modal-body {
  padding: 0;
  overflow: auto;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.resource-modal-body img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
}
.resource-modal-body iframe {
  width: 100%;
  height: 80vh;
  border: none;
}
