:root {
  --bg: #c4a484;
  --ink: #111111;
  --ink-soft: #4b4b4b;
  --line: #4a4a4a;
  --max: 760px;
  --max-wide: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-wide {
  max-width: var(--max-wide);
}

/* Header */

.site-header {
  padding: 32px 0 28px;
  /* border-bottom: 1px solid var(--line); */
}

.header-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 40px;
}

.name {
  margin: 0;
}

.name img {
  display: block;
  /* Width frozen at what "height: clamp(38px, 5vw, 56px); width: auto;"
     used to render (image is 2319x322), so doubling height alone
     stretches it vertically without widening it. */
  width: clamp(274px, 36vw, 403px);
  height: clamp(76px, 10vw, 112px);
}

.filters {
  flex: 1 1 auto;
}

.filters-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: Helvetica, Arial, sans-serif;
  color: green;
  gap: 24px;
}

.blurb {
  margin-top: 40px;
  color: var(--ink);
  font-size: 1.05rem;
}

/* Filters — bold uppercase category labels, underline on active */

.pill {
  appearance: none;
  border: none;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 0 4px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.pill:hover {
  color: var(--ink);
}

.pill.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Entries */

.entries {
  list-style: none;
  margin: 40px 0 56px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 28px;
}

@media (max-width: 980px) {
  .entries {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.entry {
  display: block;
}

.entry-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.entry-link:hover .entry-image {
  opacity: 0.85;
}

.entry-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: left top;
  background: var(--line);
  transition: opacity 0.15s ease;
}

.entry-text {
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}

.entry-client {
  font-weight: 700;
}

.entry-lede {
  font-weight: 400;
}

.empty {
  color: var(--ink-soft);
  padding: 48px 0;
}

/* Article detail page */

.article-main {
  padding: 40px 0 72px;
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.article-image {
  display: block;
  width: 100%;
  height: auto;
  background: var(--line);
  margin-bottom: 32px;
}

.article-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.article-images img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: left top;
  background: var(--line);
}

@media (max-width: 700px) {
  .article-images {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .article-images {
    grid-template-columns: 1fr;
  }
}

.article-client {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.article-title {
  margin: 0 0 32px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.article-tasks {
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-tasks[hidden] {
  display: none;
}

.article-tasks li {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
}

.article-image,
.article-images img {
  cursor: pointer;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  max-width: min(90vw, 1400px);
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-close,
.lightbox-arrow {
  appearance: none;
  border: none;
  background: none;
  color: #f2f2f2;
  font-size: 2.2rem;
  line-height: 1;
  padding: 8px 16px;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-arrow:hover:not(:disabled) {
  color: #ffffff;
}

.lightbox-arrow:disabled {
  color: #6a6a6a;
  cursor: default;
}

@media (max-width: 600px) {
  .lightbox-arrow {
    font-size: 1.8rem;
    padding: 8px;
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 56px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* Dark mode */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --ink: #f2f2f2;
    --ink-soft: #999999;
    --line: #2c2c2c;
  }
}
