/* Showcase page: overview cards, section views, project and server cards, full-size viewer. */

/* ---------- views ---------- */
.sc-view { padding-block: clamp(40px, 7vw, 88px) 64px; }
.sc-view[hidden] { display: none; }
.sc-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; color: #9a9a9a; font-size: 13px; font-weight: 700; text-decoration: none; }
.sc-back:hover { color: #fff; }
.showcase-intro { display: grid; gap: 4px; margin-bottom: 30px; }
.showcase-intro .eyebrow { margin: 0 0 6px; }
.showcase-intro h1 { margin: 0; font-size: clamp(40px, 6.5vw, 72px); line-height: 1.02; letter-spacing: -.055em; }
.showcase-intro .section-description { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- overview: two large cards over three smaller ones ---------- */
.overview-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.overview-card {
  position: relative; overflow: hidden; isolation: isolate; grid-column: span 2;
  display: grid; align-content: start; gap: 10px; min-height: 220px; padding: 24px 26px;
  border: 1px solid #2e2e2e; border-radius: 16px; background: rgba(8,8,8,.7); color: inherit; text-decoration: none;
  transition: border-color .25s ease, transform .25s ease;
}
.overview-card:nth-child(-n+2) { grid-column: span 3; min-height: 250px; }
.overview-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transform: translate(-20%, -20%);
  background: radial-gradient(420px circle at 0% 0%, rgba(255,255,255,.08), transparent 60%);
  transition: opacity .4s ease, transform .6s cubic-bezier(.22,1,.36,1);
}
.overview-card:hover { border-color: #666; transform: translateY(-3px); }
.overview-card:hover::before { opacity: 1; transform: none; }
.overview-card h2 { margin: 8px 0 0; font-size: 22px; letter-spacing: -.03em; }
.overview-card p { margin: 0; color: #9a9a9a; font-size: 14px; line-height: 1.6; }
.overview-view { display: inline-flex; gap: 8px; margin-top: auto; padding-top: 14px; font-size: 13px; font-weight: 700; }
.overview-view span { transition: transform .2s ease; }
.overview-card:hover .overview-view span { transform: translateX(3px); }

/* Overview thumbnails: square profile pictures that fan out on hover. */
.overview-thumbs { display: flex; min-height: 46px; }
.overview-thumbs img, .overview-more {
  width: 46px; height: 46px; margin-left: -8px; border: 2px solid #0a0a0a; border-radius: 12px;
  object-fit: cover; background: #161616; box-shadow: 0 4px 12px rgba(0,0,0,.45);
  transition: transform .35s cubic-bezier(.22,1,.36,1), margin .35s cubic-bezier(.22,1,.36,1);
}
.overview-thumbs img:first-child { margin-left: 0; }
.overview-more { display: grid; place-items: center; color: #9a9a9a; font-size: 12px; font-weight: 700; }
.overview-soon { width: auto; padding: 0 12px; }
.overview-card:hover .overview-thumbs img, .overview-card:hover .overview-more { margin-left: 4px; }
.overview-card:hover .overview-thumbs img:first-child { margin-left: 0; }
.overview-card:hover .overview-thumbs img:nth-child(odd) { transform: rotate(-4deg) translateY(-2px); }
.overview-card:hover .overview-thumbs img:nth-child(even) { transform: rotate(4deg) translateY(-2px); }

/* ---------- project cards (websites, scripts, UI/UX) ---------- */
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.showcase-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 0;
  border: 1px solid #2e2e2e; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: zoom-in;
  transition: border-color .25s ease, transform .25s ease;
}
.showcase-card:hover { border-color: #777; transform: translateY(-4px); }
.showcase-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; border-bottom: 1px solid #222; background: rgba(255,255,255,.02); }
.showcase-media video { width: 100%; height: 100%; object-fit: cover; }
.showcase-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.showcase-card:hover .showcase-media img { transform: scale(1.04); }
.showcase-body { display: grid; gap: 8px; padding: 18px 18px 20px; }
.showcase-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.showcase-title { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.showcase-arrow { color: #8a8a8a; font-size: 16px; transition: color .2s ease, transform .2s ease; }
.showcase-card:hover .showcase-arrow { color: #fff; transform: translate(2px, -2px); }
.showcase-desc { margin: 0; color: #a3a3a3; font-size: 13px; line-height: 1.6; }
.showcase-empty { margin: 0; padding: 48px 20px; border: 1px dashed #333; border-radius: 10px; color: #8a8a8a; text-align: center; font-size: 14px; }
.showcase-empty[hidden], .showcase-grid[hidden], .server-grid[hidden] { display: none; }

/* ---------- server cards (servers, external menus) ---------- */
.server-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid #2e2e2e; border-radius: 12px; }
.server-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: #9a9a9a; font-size: 12px; font-weight: 700; cursor: pointer; }
.server-tabs button:hover { color: #fff; }
.server-tabs button.is-selected { background: #f5f5f5; color: #0a0a0a; }
.tab-count { padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,.08); font-size: 10px; }
.server-tabs button.is-selected .tab-count { background: rgba(0,0,0,.1); }
.server-note { margin: 0 0 16px; color: #8a8a8a; font-size: 13px; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.server-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 0;
  border: 1px solid #2e2e2e; border-radius: 14px; background: rgba(8,8,8,.75); color: inherit; font: inherit; text-align: left; cursor: zoom-in;
  transition: border-color .25s ease, transform .25s ease;
}
.server-card:not(:disabled):hover { border-color: #666; transform: translateY(-3px); }
.server-card:disabled { cursor: default; }
.server-banner { height: 132px; background: linear-gradient(135deg, #1b1b1b, #0c0c0c); }
.server-banner img { width: 100%; height: 100%; object-fit: cover; }
.server-banner.is-contain img { object-fit: contain; padding: 14px; }
.server-row { display: flex; align-items: flex-end; gap: 12px; margin-top: -38px; padding: 0 20px; }
.server-icon { display: grid; place-items: center; width: 72px; height: 72px; flex-shrink: 0; overflow: hidden; border: 3px solid #0a0a0a; border-radius: 14px; background: #161616; color: #777; font: 700 32px/1 'Caveat', cursive; box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.server-icon img { width: 100%; height: 100%; object-fit: cover; }
.server-body { display: grid; gap: 8px; padding: 14px 20px 20px; }
.server-body h3 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.server-role { margin: 0; color: #8a8a8a; font-size: 13px; }
.server-role strong { color: #fff; }
.server-desc { margin: 0; color: #a3a3a3; font-size: 13px; line-height: 1.6; }
.server-soon { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 300px; padding: 24px; border-style: dashed; background: none; text-align: center; cursor: default; }
.server-soon h3 { margin: 0; font-size: 18px; }
.server-soon p { margin: 0; color: #8a8a8a; font-size: 13px; }
.server-soon-plus { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 6px; border: 1px solid #333; border-radius: 10px; font-size: 20px; }
.sc-credit { margin: 22px 0 0; color: #6f6f6f; font-size: 12px; }

/* ---------- full-size viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 56px 24px 24px; background: rgba(0,0,0,.92); backdrop-filter: blur(10px); }
.viewer[hidden] { display: none; }
.viewer-stage { grid-column: 2; grid-row: 1; display: grid; place-items: center; height: 100%; min-height: 0; }
.viewer-stage video, .viewer-stage img { max-width: 100%; max-height: 100%; border: 1px solid #2e2e2e; border-radius: 10px; background: #000; }
.viewer-caption { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; text-align: center; color: #a3a3a3; font-size: 13px; }
.viewer-caption strong { color: #fff; font-size: 16px; }
.viewer-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #333; border-radius: 10px; background: rgba(20,20,20,.8); color: #fff; font-size: 18px; cursor: pointer; }
.viewer-btn:hover { border-color: #777; }
.viewer-btn[hidden] { visibility: hidden; }
.viewer-prev { grid-column: 1; grid-row: 1; }
.viewer-next { grid-column: 3; grid-row: 1; }
.viewer-close { position: absolute; top: 12px; right: 16px; }
.viewer-open, .viewer-open body { overflow: hidden; }

/* ---------- entrance: cards rise in one after another when a section opens ---------- */
@keyframes sc-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.is-entering .showcase-intro { animation: sc-rise .6s cubic-bezier(.22,1,.36,1) both; }
.is-entering .overview-card,
.is-entering .showcase-card,
.is-entering .server-card { animation: sc-rise .6s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(120ms + var(--i, 0) * 60ms); }

@media (max-width: 900px) {
  .overview-card, .overview-card:nth-child(-n+2) { grid-column: span 3; }
}
@media (max-width: 600px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-card, .overview-card:nth-child(-n+2) { grid-column: auto; min-height: 200px; }
  .showcase-grid { grid-template-columns: 1fr; }
  .viewer { padding: 60px 8px 16px; gap: 8px; }
  .viewer-btn { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .is-entering .showcase-intro, .is-entering .overview-card, .is-entering .showcase-card, .is-entering .server-card { animation: none; }
  .overview-card:hover, .showcase-card:hover, .server-card:hover,
  .overview-card:hover .overview-view span, .overview-card:hover .overview-thumbs img,
  .showcase-card:hover .showcase-media img, .showcase-card:hover .showcase-arrow { transform: none; }
}
