/* NOURSABBAGH — "uniform grid" design, inspired by the Pinterest reference */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@400;500;700;800&display=swap');

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #faf6ea;
  color: #1a1a1a;
  font-family: 'Space Mono', 'Courier New', monospace;
}

a { color: inherit; text-decoration: none; }

/* header — smaller and more compact */
header.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.logo { font-size: 15px; letter-spacing: 2px; font-weight: 500; flex-shrink: 0; }
.logo .logo-strong { font-weight: 700; }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  letter-spacing: 1px;
}

nav.main-nav a {
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

nav.main-nav a.active,
nav.main-nav a:hover {
  border-bottom: 1px solid #1a1a1a;
}

nav.main-nav svg { width: 16px; height: 16px; }

/* hero title — same line, same font and size as the logo next to it */
.hero-title {
  font-family: 'Space Mono', 'Courier New', monospace;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  margin: 0;
}

/* uniform, edge-to-edge tile grid — no gaps, no overlap, portrait cards */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/*
  Every tile — color or photo — uses the same system: title pinned to
  the top, detailed text pinned to the bottom via margin-top: auto on
  .tile-details. If the details run long, that block scrolls on its own
  rather than pushing the card taller, so every card keeps the same
  portrait shape.
*/
.tile {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tile-details {
  margin-top: auto;
  min-height: 0;
  overflow-y: auto;
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.tile.photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%);
  z-index: 0;
}

.tile-title {
  position: relative;
  z-index: 1;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
}

.tile-credit {
  position: relative;
  z-index: 1;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3px;
  line-height: 1.4;
  margin: 0;
}

.tile-body {
  position: relative;
  z-index: 1;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 8px;
}

.tile-body:last-child {
  margin-bottom: 0;
}

.tile-title.light,
.tile-credit.light,
.tile-body.light {
  color: #fff;
}

@media (max-width: 900px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  header.site-header { padding: 14px 20px; flex-wrap: wrap; gap: 10px; }
  .header-left { min-width: 100%; order: -1; }
}

@media (max-width: 520px) {
  .tile-grid { grid-template-columns: 1fr; }
}
