/* ─────────────────────────────────────────────
   COMPONENTS — Reusable UI elements
   ───────────────────────────────────────────── */

/* ── Section pill label ─────────────────────── */
.pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--a1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-block;
}

/* ── Section heading ────────────────────────── */
.heading {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

/* ── Tech / skill badges ─────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.6rem;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  margin: 2px;
}

.badge.y  { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3);  color: #f59e0b; }
.badge.o  { background: rgba(251, 146, 60, 0.12); border: 1px solid rgba(251, 146, 60, 0.3);  color: #fb923c; }
.badge.p  { background: rgba(124, 58, 237, 0.15); border: 1px solid rgba(124, 58, 237, 0.35); color: #a78bfa; }
.badge.gr { background: rgba(100, 116, 139, 0.12); border: 1px solid rgba(100, 116, 139, 0.3); color: #94a3b8; }
.badge.g  { background: rgba(34, 197, 94, 0.12);  border: 1px solid rgba(34, 197, 94, 0.3);  color: #4ade80; }
.badge.b  { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.3);  color: #60a5fa; }

/* ── Project cards ──────────────────────────── */
.proj-card {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(245, 158, 11, 0.04);
  transition: border-color 0.3s, background 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.proj-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
  transform: translateY(-2px);
}

/* ── "View Project" hover/click overlay ─────── */
.proj-card::after {
  content: "View Project";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 5;
  white-space: nowrap;
}

.proj-card:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Keep the label visible after click (JS toggles this class) */
.proj-card.viewing::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  content: "▼ Open";
}

.proj-card.viewing:hover::after {
  content: "▼ Open";
}

/* ── Stats table ─────────────────────────────── */
table.t {
  width: 100%;
  border-collapse: collapse;
}

table.t th {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

table.t td {
  font-size: 0.72rem;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

table.t tr:last-child td {
  border-bottom: none;
}

/* ── Skill progress bars ─────────────────────── */
.stat-bar-bg {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 5px;
}

.stat-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 1s ease;
}

/* ── Contact link cards ──────────────────────── */
a.link-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.03);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s;
}

a.link-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.08);
}

/* ── Hero impact numbers ─────────────────────── */
.impact-num {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--a1);
  line-height: 1;
}

/* ── API loading state ──────────────────────── */
.stat-loading {
  opacity: 0.4;
  font-style: italic;
}

.stat-error {
  color: var(--text-dim);
  font-size: 0.65rem;
}

/* ── Project Modal Overlay ────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  position: relative;
  width: 90vw;
  height: 85vh;
  max-width: 1200px;
  background: var(--bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(245, 158, 11, 0.1);
  overflow: hidden;
  transform: translateY(50px) scale(0.95);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(245, 158, 11, 0.8);
  border-color: #f59e0b;
  transform: scale(1.1);
}

#modal-iframe {
  width: 100%;
  height: 100%;
  background: transparent;
}
