/* ===== WORKS HERO (standalone page) ===== */
.works-hero {
  padding: 140px 0 60px;
  background: var(--bg-primary);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.works-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('assets/hero-bg.png') center/cover no-repeat;
  opacity: 0.04; mix-blend-mode: multiply;
}
.works-hero .container { position: relative; z-index: 2; }
.works-hero .hero-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.works-hero .hero-subtitle {
  max-width: 620px; margin: 0 auto 36px;
  color: var(--text-secondary); font-size: 1.05rem;
}

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.filter-btn {
  padding: 10px 24px; border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}
.filter-btn:hover {
  border-color: rgba(232,93,38,0.2);
  color: var(--accent);
  background: var(--bg-card);
}
.filter-btn.active {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
  font-weight: 700;
}

/* ===== WORKS SECTION ===== */
.works-section { padding-top: 60px; }

/* ===== PROJECTS GRID ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ===== PROJECT CARD ===== */
.project-card {
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.project-card.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  position: absolute;
  pointer-events: none;
  width: 0; height: 0; overflow: hidden;
  margin: 0; padding: 0; border: none;
}
.project-card:hover {
  border-color: rgba(232,93,38,0.15);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* Card Accent Top Border */
.card-accent {
  height: 4px;
  width: 100%;
  border-radius: var(--radius) var(--radius) 0 0;
}
.accent-teal { background: linear-gradient(90deg, #2dd4bf, #14b8a6); }
.accent-purple { background: linear-gradient(90deg, #a78bfa, #8b5cf6); }
.accent-gold { background: linear-gradient(90deg, #f59e0b, #d97706); }
.accent-coral { background: linear-gradient(90deg, #fb7185, #f43f5e); }
.accent-blue { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.accent-emerald { background: linear-gradient(90deg, #34d399, #10b981); }

/* Card Body */
.card-body {
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Card Icon */
.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

/* Card Company Label */
.card-company {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Card Title */
.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 12px;
  transition: var(--transition);
}
.project-card:hover .card-title {
  color: var(--accent);
}

/* Card Description */
.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

/* Metric Tags Row */
.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.metric-tag {
  padding: 5px 14px;
  border-radius: 100px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

/* Skill Pills Row */
.card-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.skill-pill {
  padding: 4px 12px;
  border-radius: 100px;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.2px;
}

/* View Project Link */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: var(--transition);
  margin-top: auto;
  padding-top: 4px;
}
.card-link:hover {
  color: var(--accent-hover);
  transform: translateX(4px);
}

/* ===== ANIMATIONS ===== */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.project-card {
  animation: cardIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.12s; }
.project-card:nth-child(3) { animation-delay: 0.19s; }
.project-card:nth-child(4) { animation-delay: 0.26s; }
.project-card:nth-child(5) { animation-delay: 0.33s; }
.project-card:nth-child(6) { animation-delay: 0.40s; }

/* ===== PROJECT DETAIL MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.modal-overlay.active {
  opacity: 1; pointer-events: all;
}
.modal-container {
  width: 100%; max-width: 960px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 32px 80px rgba(0,0,0,0.15);
}
.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

/* CLOSE BUTTON */
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.8); backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text-primary); font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover {
  background: var(--accent); border-color: var(--accent); color: #fff;
  transform: rotate(90deg);
}

/* MODAL HERO */
.modal-hero {
  position: relative; height: 280px; overflow: hidden;
}
.modal-hero img {
  width: 100%; height: 100%; object-fit: cover;
}
.modal-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-card) 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
}
.modal-hero-content {
  position: absolute; bottom: 28px; left: 36px; right: 36px; z-index: 2;
}
.modal-hero-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem; font-weight: 800; line-height: 1.25;
  margin-top: 10px; color: var(--text-primary);
  text-shadow: 0 2px 8px rgba(255,255,255,0.6);
}

/* MODAL BODY */
.modal-body { padding: 0 36px 36px; }

.modal-meta-bar {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding: 18px 0; margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.modal-meta-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: var(--text-secondary);
}
.modal-meta-item .icon { font-size: 1rem; }
.modal-meta-item strong { color: var(--text-primary); font-weight: 600; }

/* MODAL GRID */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

/* MODAL MAIN CONTENT */
.modal-section { margin-bottom: 28px; }
.modal-section h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 12px; color: var(--text-primary);
}
.modal-section p {
  font-size: 0.92rem; color: var(--text-secondary);
  line-height: 1.75;
}
.modal-section ul {
  list-style: none; padding: 0; margin: 0;
}
.modal-section ul li {
  position: relative; padding-left: 24px;
  margin-bottom: 10px; font-size: 0.9rem;
  color: var(--text-secondary); line-height: 1.6;
}
.modal-section ul li::before {
  content: '✦'; position: absolute; left: 0; top: 1px;
  color: var(--accent); font-size: 0.7rem;
}

/* MODAL SIDEBAR */
.modal-sidebar-card {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.modal-sidebar-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem; font-weight: 700;
  margin-bottom: 14px; color: var(--text-primary);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* MODAL STATS */
.modal-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.modal-stat-item {
  text-align: center; padding: 12px 8px;
  background: rgba(232,93,38,0.05);
  border: 1px solid rgba(232,93,38,0.1);
  border-radius: 10px;
}
.modal-stat-item strong {
  display: block; font-size: 1.4rem; font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.modal-stat-item span {
  font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ===== MEDIA GALLERY ===== */
.modal-media-section {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.media-item {
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}
.media-item:hover {
  border-color: rgba(232,93,38,0.2);
  box-shadow: var(--shadow-hover);
}

/* Media Header */
.media-item-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.media-type-badge {
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.media-type-badge.type-pdf {
  background: rgba(239,68,68,0.08);
  color: #ef4444;
}
.media-type-badge.type-video {
  background: rgba(168,85,247,0.08);
  color: #8b5cf6;
}
.media-type-badge.type-youtube {
  background: rgba(239,68,68,0.08);
  color: #ef4444;
}
.media-type-badge.type-image {
  background: rgba(59,130,246,0.08);
  color: #3b82f6;
}
.media-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Media Body */
.media-item-body { position: relative; }
.media-item-body iframe.pdf-embed {
  width: 100%; height: 420px; border: none; background: #f5f5f5;
}
.media-item-body video {
  width: 100%; display: block; background: #000; max-height: 400px;
}
.media-item-body iframe.youtube-embed {
  width: 100%; aspect-ratio: 16/9; border: none;
}
.media-item-body img.media-image {
  width: 100%; display: block; cursor: pointer; transition: transform 0.3s ease;
}
.media-item:hover .media-image { transform: scale(1.02); }

.media-item-footer {
  padding: 10px 16px; font-size: 0.78rem;
  color: var(--text-muted); border-top: 1px solid var(--border);
  line-height: 1.5;
}
.media-gallery.single-media { grid-template-columns: 1fr; }

/* Image Lightbox */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease; cursor: zoom-out;
}
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-overlay img {
  max-width: 90vw; max-height: 90vh; border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

/* MODAL TAGS */
.modal-hero-content .project-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0;
}
.modal-hero-content .project-tag {
  padding: 3px 10px; border-radius: 100px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  font-size: 0.7rem; color: var(--text-primary);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
}
.modal-hero-content .project-tag.tag-featured {
  background: rgba(232,93,38,0.12);
  border-color: rgba(232,93,38,0.2);
  color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-hero { height: 200px; }
  .modal-hero-content { left: 24px; right: 24px; bottom: 20px; }
  .modal-hero-content h2 { font-size: 1.4rem; }
  .modal-body { padding: 0 24px 24px; }
  .media-gallery { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .works-hero { padding: 120px 0 40px; }
  .filter-tabs { gap: 6px; }
  .filter-btn { padding: 8px 16px; font-size: 0.8rem; }
  .card-body { padding: 24px 20px 20px; }
  .card-title { font-size: 1.05rem; }
  .card-metrics { gap: 6px; }
  .metric-tag { font-size: 0.7rem; padding: 4px 10px; }
  .modal-overlay { padding: 20px 12px; }
  .modal-hero { height: 160px; }
  .modal-stats { grid-template-columns: 1fr; }
  .media-item-body iframe.pdf-embed { height: 300px; }
}
