/* Gallery page (/gallery.html), generated from _data/gallery.yml */

.g2 {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px 3em;
  font-family: 'Catamaran', sans-serif;
}

.g2-intro {
  max-width: 40em;
  margin: 0 auto 1.5em;
  text-align: center;
  font-size: 1.15em;
  line-height: 1.5;
  color: #444;
}

/* Filters */
.g2-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5em;
  margin-bottom: 2em;
}
.g2-filter {
  font: inherit;
  font-size: 0.95em;
  padding: 0.35em 1.1em;
  border: 1px solid var(--dark-grey);
  border-radius: 999px;
  background: transparent;
  color: var(--dark-grey);
  cursor: pointer;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.g2-filter:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.g2-filter.is-active {
  background: var(--dark-grey);
  border-color: var(--dark-grey);
  color: #fff;
}

/* Card grid */
.g2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-flow: dense;
  gap: 1.25em;
}
.g2-card {
  display: flex;
  flex-direction: column;
  background: var(--dark-grey);
  color: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.g2-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.g2-card[hidden] {
  display: none;
}

.g2-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111;
  border: none;
}
.g2-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.g2-card:hover .g2-media img {
  transform: scale(1.04);
}

.g2-credit {
  position: absolute;
  right: 0.5em;
  bottom: 0.35em;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
}
.g2-award {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 75%;
  padding: 0.4em 0.75em;
  background: #b04f00;
  color: #fff;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.3;
}

.g2-body {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding: 0.9em 1.1em 1.1em;
  flex: 1;
}
.g2-body p {
  margin: 0;
}
.g2-title {
  margin: 0;
  font-size: 1.3em;
  font-style: italic;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}
.g2-title a,
.g2-links a {
  color: inherit !important;
  border: none;
  text-decoration: none;
}
.g2-title a:hover,
.g2-links a:hover {
  color: var(--orange) !important;
}
.g2-artists {
  font-size: 1em;
  line-height: 1.35;
  color: #e0e0e0;
}
.g2-meta {
  font-size: 0.85em;
  line-height: 1.35;
  color: var(--light-blue);
  letter-spacing: 0.02em;
}
.g2-ossia {
  margin-top: 0.4em !important;
  padding-top: 0.6em;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9em;
  line-height: 1.45;
  color: var(--light-grey);
}
.g2-links {
  font-size: 0.9em;
  color: var(--light-grey);
}
.g2-sat {
  font-size: 0.85em;
  color: var(--light-grey);
}
.g2-sat a {
  color: var(--light-blue) !important;
  border: none;
  text-decoration: none;
}
.g2-sat a:hover {
  color: var(--orange) !important;
}
.g2-table-sat {
  font-size: 0.85em;
  color: #595959;
}

/* Featured works take two columns on wide screens */
@media (min-width: 640px) {
  .g2-card--wide {
    grid-column: span 2;
  }
  .g2-card--wide .g2-media {
    aspect-ratio: 16 / 8;
  }
  .g2-card--wide .g2-title {
    font-size: 1.6em;
  }
}

/* "More works" table */
.g2-heading {
  margin: 2.5em 0 0.8em;
  text-align: center;
  font-size: 1.8em;
}
.g2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  line-height: 1.4;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.g2-table th {
  text-align: left;
  padding: 0.7em 0.9em;
  background: var(--dark-grey);
  color: #fff;
  font-weight: 600;
}
.g2-table td {
  padding: 0.6em 0.9em;
  vertical-align: top;
  border-top: 1px solid #e3e3e3;
}
.g2-table tbody tr:hover {
  background: #f7f4f1;
}
.g2-table td[data-label='Year'] {
  white-space: nowrap;
  color: #595959;
}
.g2-table-title {
  font-style: italic;
  font-weight: 600;
}
.g2-table-award {
  font-style: normal;
  font-weight: 400;
  font-size: 0.85em;
  color: var(--orange);
}

@media (max-width: 736px) {
  .g2-table thead {
    display: none;
  }
  .g2-table,
  .g2-table tbody,
  .g2-table tr,
  .g2-table td {
    display: block;
    width: 100%;
  }
  .g2-table tr {
    padding: 0.6em 0;
    border-top: 1px solid #e3e3e3;
  }
  .g2-table td {
    border: none;
    padding: 0.15em 0.9em;
  }
  .g2-table td:empty,
  .g2-table tr[hidden] {
    display: none;
  }
  .g2-table td[data-label='Artists'],
  .g2-table td[data-label='Where'],
  .g2-table td[data-label='With ossia'] {
    color: #555;
  }
}

/* The site's mobile stylesheet justifies paragraphs; keep card text ragged. */
.g2 p,
.g2 td {
  text-align: left;
}
.g2-intro {
  text-align: center !important;
}
.g2-table-title a {
  color: var(--dark-grey) !important;
  border-bottom: 1px solid var(--orange);
  text-decoration: none;
}
.g2-table-title a:hover {
  color: var(--orange) !important;
}
