/*
Theme Name: Yasue Mono
Description: Minimal grey gallery theme for Yasue Kobe, modeled on the austere aesthetic of sugimotohiroshi.com — solid grey canvas, letterspaced serif title, small uppercase nav, uncropped artwork grids.
Version: 1.0
Author: Paul McInerney
Text Domain: yasue-mono
*/

:root {
  --bg: #ffffff;
  --text: #333333;
  --muted: #565656;
  --faint: #6a6a6a;
  --title: #514c47;
  --accent: #4d7ba3;
  --light: #e9e9e9;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Jost", Futura, "Century Gothic", "Helvetica Neue", sans-serif;
  font-weight: 400;
  font-size: 13.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #2e5d85; }

/* ---------- header ---------- */

.site-header { position: relative; text-align: center; padding-top: 46px; margin-bottom: 62px; }

/* language toggle, top right */
.lang-switch {
  position: absolute;
  top: 22px;
  right: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 13px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lang-switch li { margin: 0; }
.lang-switch a { color: var(--faint); }
.lang-switch a:hover { color: var(--accent); }
.lang-switch .current-lang > a,
.lang-switch .current-lang { color: var(--text); font-weight: 500; }

.site-title {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--title);
  margin: 0 0 36px;
}
.site-title a, .site-title a:hover { color: inherit; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 27px;
}
.site-nav a {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2e2e2e;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--accent); }

/* ---------- home ---------- */

.hero { margin: 0; }
.hero img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 72vh;   /* the whole artwork stays in view, portrait or landscape */
  width: auto;
  height: auto;
}
img { max-width: 100%; height: auto; }
.hero-caption {
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 12px;
}
.hero-caption a { color: var(--muted); }
.hero-caption a:hover { color: var(--accent); }

/* ---------- works: grouped series index ---------- */

.works-group { margin-bottom: 74px; }
.works-group:last-of-type { margin-bottom: 0; }

.works-group-title {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: left;
  color: #3c3c3c;
  margin: 0 0 8px;
}

.works-group-desc {
  font-size: 12.5px;
  color: var(--muted);
  text-align: left;
  max-width: 640px;
  margin: 0 0 26px;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
}
.series-grid figure { margin: 0; }
.series-grid a { display: block; }
.series-grid img {
  width: 100%;
  height: auto;          /* neutralize the HTML height attribute... */
  aspect-ratio: 1 / 1;   /* ...so every tile is the same square */
  object-fit: cover;     /* crop to fill - uniform tiles across all groups */
  display: block;
  transition: opacity 0.25s ease;
}
.series-grid a:hover img { opacity: 0.8; }

/* ---------- grids ---------- */

.page-heading {
  text-align: center;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #3c3c3c;
  margin: 0 0 44px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
}
.work-grid figure { margin: 0; }
.work-grid a { display: block; }
.work-grid img {
  width: 100%;
  height: auto;          /* neutralize the HTML height attribute... */
  aspect-ratio: 1 / 1;   /* ...so the square cell wins */
  object-fit: contain;   /* letterbox is transparent, so it disappears into the background */
  display: block;
  transition: opacity 0.25s ease;
}
.work-grid a:hover img { opacity: 0.8; }
/* Exhibitions grid: uniform cropped squares (per Yasue), unlike the
   uncropped collection grids */
.work-grid--cover img { object-fit: cover; }
.grid-label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: #454545;
  line-height: 1.5;
  margin-top: 11px;
}
.grid-label a { color: #454545; }
.grid-label a:hover { color: var(--accent); }

/* ---------- single artwork / pages ---------- */

.artwork-image { margin: 0 0 14px; }
.artwork-image img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
}

.entry-title {
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #3a3a3a;
  margin: 34px 0 30px;
}

.entry-content {
  max-width: 700px;
  margin: 0 auto;
  font-size: 13px;
  color: #3d3d3d;
}
.entry-content img { max-width: 100%; height: auto; }
.entry-content video { max-width: 100%; height: auto; }
.entry-content figure { margin: 26px 0; }
.entry-content a { color: var(--accent); }
.entry-content a:hover { color: #2e5d85; }

.entry-meta {
  max-width: 700px;
  margin: 40px auto 0;
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* keep the collection name centred even when a boundary
   drops the previous or next link */
.entry-meta span:first-child { flex: 1; text-align: left; }
.entry-meta span:last-child { flex: 1; text-align: right; }
.entry-meta-top { margin: 0 auto 26px; }
.entry-meta a { color: var(--muted); }
.entry-meta a:hover { color: var(--accent); }

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--faint);
  padding: 90px 0 34px;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .work-grid,
  .series-grid { grid-template-columns: repeat(3, 1fr); gap: 28px 22px; }
}
@media (max-width: 600px) {
  .site-header { padding-top: 24px; margin-bottom: 40px; }
  .site-title { font-size: 18px; }
  /* on mobile the toggle sits centred above the title, never overlapping it */
  .lang-switch {
    position: static;
    justify-content: center;
    gap: 20px;
    margin: 0 0 20px;
  }
  .work-grid,
  .series-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; }
  .works-group { margin-bottom: 56px; }
}
