/* ==========================================================================
   Showcase-specific presentation. Builds on ../shared/base.css (fonts, tokens,
   reset, base typography, .eyebrow) and Font Awesome (icons).
   ========================================================================== */

/* Light section bands: white hero, then projects alternate between a lighter
   and a slightly darker gray. */
:root {
  --band-a: #f5f6f8;       /* lighter gray  */
  --band-b: #e8eaee;       /* slightly darker gray */
  --stats-tint: #fdfdfe;   /* near-white core for the info band */
  --radius: 5px;           /* corner radius for cards, thumbs, tooltips */
  font-size: 110%;
}

body { background: #fff; }

/* Inner container: centres each full-width band's content. */
.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

/* ---- Hero --------------------------------------------------------------- */

.hero {
  background: #fff;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.hero-title {
  font-size: var(--step-3);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.8rem;
  text-wrap: balance;
}

.lead {
  max-width: 40rem;
  font-size: var(--step-1);
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

/* ---- Projects ----------------------------------------------------------- */

.project { padding-block: clamp(2.5rem, 6vw, 4rem); }

.project:nth-of-type(odd)  { background: var(--band-a); }
.project:nth-of-type(even) { background: var(--band-b); }

/* The info-band glow is near-white; on the darker band that would contrast too
   hard, so soften the tint there to keep the *lift* gentle (inherited by the
   nested .stats-band via the custom property). */
.project:nth-of-type(even) { --stats-tint: #f1f2f5; }

.project-head { margin-bottom: 1.25rem; }

.project-title {
  font-size: var(--step-2);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.project-lead {
  margin-top: 0.4rem;
  font-size: var(--step-1);
  color: var(--ink-soft);
}

.lead-muted { color: var(--muted); }

/* Placeholder projects sit quietly until fleshed out. */
.project--stub .project-title { color: var(--ink-soft); }

/* ---- Short description + "Mehr" disclosure ------------------------------ */

.more { margin-top: 0.4rem; }

/* The summary is the whole short-description line: description on the left,
   the "Mehr" toggle pinned to the right. */
.lead-row {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  cursor: pointer;
  list-style: none;
}

.lead-row::-webkit-details-marker { display: none; }

.lead-row .project-lead { margin: 0; flex: 1; }

.more-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.more-chevron {
  font-size: 0.8em;
  transition: transform 0.2s ease;
}

.more[open] .more-chevron { transform: rotate(180deg); }

/* Collapsible wrapper — its height is animated open/closed by main.js. The
   body's top padding lives inside, so it's clipped away when collapsed. */
.more-content { overflow: hidden; }

.more-body {
  max-width: 42rem;
  padding-top: 0.9rem;
  color: var(--accent);
  line-height: 1.6;
}

/* ---- Info band ---------------------------------------------------------- */

/* A soft white strip centred on the page: opaque across a ±20rem core and
   fading to transparent by ±30rem, so it reads as a gentle highlight behind the
   stats rather than a hard band. */
.stats-band {
  padding-block: 0.5rem;
  margin-bottom: 1.75rem;
  background: linear-gradient(
          90deg,
          transparent calc(50% - 30rem),
          var(--stats-tint) calc(50% - 20rem),
          var(--stats-tint) calc(50% + 20rem),
          transparent calc(50% + 30rem)
  );
}

.stats {
  max-width: var(--measure);
  margin-inline: auto;
  margin-block: 0;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
}

.stat {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: var(--step--1);
  color: var(--muted);
}

.stat .fa-solid,
.stat .fa-brands {
  font-size: 1.05em;
  color: var(--accent-muted);
  width: 1.2em;
  text-align: center;
}

.stat-value {
  font-weight: 400;
  text-transform: uppercase;
}

/* A stat whose content is a link (e.g. the repository). */
.stat a {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: inherit;
}

.stat a:hover .stat-value,
.stat a:focus-visible .stat-value {
  color: var(--ink);
  text-decoration: underline;
}

/* Visually hidden but available to screen readers (each stat's category label). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Tooltip explaining what each icon/metric means. The box (::after) and its
   caret (::before) share one animation so they always move together — the caret
   sits flush under the box and never separates or gets covered. */
.stat::after,
.stat::before {
  position: absolute;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.stat::after {
  content: attr(data-tip);
  bottom: calc(100% + 9px);
  left: 0;
  z-index: 2;
  padding: 0.3em 0.55em;
  background: var(--ink);
  color: #fff;
  font-size: var(--step--1);
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius);
}

.stat::before {
  content: "";
  bottom: calc(100% + 4px);
  left: 1.1em;
  z-index: 1;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--ink);
}

.stat:hover::after,
.stat:hover::before,
.stat:focus-within::after,
.stat:focus-within::before {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Gallery ------------------------------------------------------------ */

.gallery { margin-bottom: 0; }

.gallery-main {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sheet);
  box-shadow: 0 1px 2px rgba(20, 22, 26, 0.04),
              0 12px 32px rgba(20, 22, 26, 0.08);
}

.gallery-main-img {
  width: 100%;
  height: auto;
  display: block;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.thumb {
  display: block;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--sheet);
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.thumb img {
  width: 7rem;
  height: 4.6rem;
  object-fit: cover;
  object-position: top;
}

.thumb:hover { border-color: var(--muted); }

.thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ---- Narrow screens ----------------------------------------------------- */

@media (max-width: 34rem) {
  :root { font-size: 90%; }
  .stats { gap: 0.75rem 1.25rem; }
  .thumb img { width: 5.5rem; height: 3.6rem; }
}
