/* Professional Credentials — CreativeCR */
:root {
  --cred-accent: #f5aa5f;
  --cred-accent-rgb: 245, 170, 95;
  --cred-bg: #f3f0e8;
  --cred-panel: #ffffff;
  --cred-text: #232834;
  --cred-muted: #6f7787;
  --cred-line: rgba(35, 40, 52, 0.1);
  --cred-shadow: rgba(35, 40, 52, 0.12);
}

html.dark {
  --cred-bg: #1a202c;
  --cred-panel: #2d3748;
  --cred-text: #f7fafc;
  --cred-muted: #a0aec0;
  --cred-line: rgba(255, 255, 255, 0.1);
  --cred-shadow: rgba(0, 0, 0, 0.35);
}

.cred-page {
  background: var(--cred-bg);
  min-height: 100vh;
}

.cred-main {
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.cred-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.cred-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.cred-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cred-accent);
  margin-bottom: 0.75rem;
}

.cred-hero h1 {
  font-family: 'BatmanForever', 'Arial Black', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--cred-accent);
  text-shadow: 0 0 12px rgba(var(--cred-accent-rgb), 0.35);
  margin-bottom: 0.75rem;
}

.cred-hero-lead {
  max-width: 42rem;
  margin: 0 auto 1rem;
  color: var(--cred-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.cred-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.cred-stat {
  background: var(--cred-panel);
  border: 1px solid var(--cred-line);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  color: var(--cred-text);
  box-shadow: 0 2px 8px var(--cred-shadow);
}

.cred-stat strong {
  color: var(--cred-accent);
}

/* Timeline */
.cred-timeline-section {
  margin-bottom: 2.5rem;
}

.cred-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Rufina', serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--cred-text);
  margin-bottom: 1rem;
}

.cred-section-title .material-symbols-outlined {
  color: var(--cred-accent);
}

.cred-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.cred-timeline li {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  align-items: start;
  background: var(--cred-panel);
  border: 1px solid var(--cred-line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  box-shadow: 0 2px 10px var(--cred-shadow);
}

.cred-timeline-year {
  font-family: 'BatmanForever', sans-serif;
  font-size: 0.85rem;
  color: var(--cred-accent);
  line-height: 1.3;
}

.cred-timeline-body strong {
  display: block;
  color: var(--cred-text);
  margin-bottom: 0.25rem;
}

.cred-timeline-body span {
  color: var(--cred-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Toolbar */
.cred-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--cred-panel);
  border: 1px solid var(--cred-line);
  border-radius: 14px;
  box-shadow: 0 2px 12px var(--cred-shadow);
}

.cred-search-wrap {
  flex: 1 1 220px;
  position: relative;
}

.cred-search-wrap .material-symbols-outlined {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cred-muted);
  font-size: 1.2rem;
  pointer-events: none;
}

.cred-search {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  border: 1px solid var(--cred-line);
  border-radius: 10px;
  background: var(--cred-bg);
  color: var(--cred-text);
  font-family: 'Rufina', serif;
  font-size: 0.95rem;
}

.cred-search:focus {
  outline: 2px solid rgba(var(--cred-accent-rgb), 0.45);
  outline-offset: 1px;
}

.cred-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cred-filter-btn {
  border: 1px solid var(--cred-line);
  background: var(--cred-bg);
  color: var(--cred-muted);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-family: 'Rufina', serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.cred-filter-btn:hover,
.cred-filter-btn.is-active {
  border-color: rgba(var(--cred-accent-rgb), 0.55);
  background: rgba(var(--cred-accent-rgb), 0.12);
  color: var(--cred-accent);
}

.cred-results-count {
  width: 100%;
  font-size: 0.85rem;
  color: var(--cred-muted);
}

.cred-results-count strong {
  color: var(--cred-accent);
}

/* Grid */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.cred-card {
  background: var(--cred-panel);
  border: 1px solid var(--cred-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px var(--cred-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cred-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--cred-shadow);
}

.cred-card-preview {
  position: relative;
  aspect-ratio: 4/3;
  background: #e8e4dc;
  cursor: pointer;
  overflow: hidden;
}

html.dark .cred-card-preview {
  background: #111827;
}

.cred-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.cred-card:hover .cred-card-preview img {
  transform: scale(1.03);
}

.cred-card-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  gap: 0.35rem;
}

.cred-card-preview:hover .cred-card-preview-overlay {
  opacity: 1;
}

.cred-card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cred-card-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cred-cat-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(var(--cred-accent-rgb), 0.14);
  color: var(--cred-accent);
}

.cred-card-title {
  font-family: 'Rufina', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--cred-text);
  line-height: 1.35;
}

.cred-card-inst {
  font-size: 0.88rem;
  color: var(--cred-muted);
}

.cred-card-meta {
  font-size: 0.8rem;
  color: var(--cred-muted);
}

.cred-card-desc {
  font-size: 0.88rem;
  color: var(--cred-muted);
  line-height: 1.55;
  flex: 1;
}

.cred-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.cred-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--cred-bg);
  color: var(--cred-text);
  border: 1px solid var(--cred-line);
}

.cred-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cred-line);
}

.cred-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: 'Rufina', serif;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.cred-btn-primary {
  background: var(--cred-accent);
  color: #1a202c;
}

.cred-btn-primary:hover {
  filter: brightness(1.08);
}

.cred-btn-ghost {
  background: transparent;
  border: 1px solid var(--cred-line);
  color: var(--cred-text);
}

.cred-btn-ghost:hover {
  border-color: rgba(var(--cred-accent-rgb), 0.5);
  color: var(--cred-accent);
}

.cred-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--cred-muted);
  grid-column: 1 / -1;
}

/* Modal */
.cred-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.cred-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.cred-modal-dialog {
  background: var(--cred-panel);
  border-radius: 16px;
  max-width: min(920px, 96vw);
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transform: scale(0.96);
  transition: transform 0.25s;
}

.cred-modal.is-open .cred-modal-dialog {
  transform: scale(1);
}

.cred-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--cred-line);
}

.cred-modal-header h2 {
  font-family: 'Rufina', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--cred-text);
}

.cred-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cred-muted);
  padding: 0.25rem;
  border-radius: 8px;
}

.cred-modal-close:hover {
  background: var(--cred-bg);
  color: var(--cred-accent);
}

.cred-modal-image-wrap {
  padding: 1rem 1.25rem;
  background: #111;
  text-align: center;
}

.cred-modal-image-wrap img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
}

.cred-modal-body {
  padding: 1.15rem 1.25rem 1.5rem;
}

.cred-modal-section {
  margin-bottom: 1rem;
}

.cred-modal-section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cred-accent);
  margin-bottom: 0.4rem;
}

.cred-modal-section p,
.cred-modal-section ul {
  font-size: 0.92rem;
  color: var(--cred-muted);
  line-height: 1.55;
}

.cred-modal-section ul {
  padding-left: 1.1rem;
  margin: 0;
}

.cred-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.cred-loading {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--cred-muted);
}

.cred-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

@media (max-width: 640px) {
  .cred-timeline li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .cred-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media print {
  .cred-toolbar,
  .cred-modal,
  #site-header,
  #site-footer {
    display: none !important;
  }
}
