/* Fonts are self-hosted (SIL Open Font License, see fonts/OFL.txt) –
   no requests to Google from visitors' browsers. */
@font-face {
  font-family: "Newsreader";
  src: url(fonts/newsreader.woff2) format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url(fonts/inter.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #151312;
  --bg-raised: #1c1917;
  --line: #2b2725;
  --line-soft: #231f1d;
  --text: #ecebe8;
  --muted: #a19d97;
  --faint: #7d7973;
  --red: #b8402f;
  --red-hover: #c94c39;
  --red-text: #d0614f;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 40px; }

/* ---------- top: nav + hero ---------- */
.top { position: relative; overflow: hidden; }
.top::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(closest-side at 50% 40%, rgba(120, 28, 22, .42), transparent 75%),
    repeating-linear-gradient(60deg,  rgba(255,255,255,.022) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(-60deg, rgba(255,255,255,.022) 0 1px, transparent 1px 46px);
  -webkit-mask: linear-gradient(#000 55%, transparent);
          mask: linear-gradient(#000 55%, transparent);
  pointer-events: none;
}
.top .wrap { position: relative; }

.bar { display: flex; align-items: center; padding: 22px 0; font-size: 14px; }
.brand { font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.bar-links { margin-left: auto; display: flex; gap: 24px; }
.bar-links a { color: var(--muted); text-decoration: none; transition: color .15s; }
.bar-links a:hover { color: var(--text); }

.hero { text-align: center; padding: 36px 0 100px; }
.logo { width: 240px; height: auto; margin: 0 auto; filter: drop-shadow(0 22px 50px rgba(0,0,0,.65)); }
h1 {
  font: 400 clamp(38px, 6vw, 60px)/1.06 var(--serif);
  letter-spacing: -.02em;
  margin: 30px 0 16px;
}
.lead { color: var(--muted); font-size: 18px; margin: 0 auto; max-width: 31em; }

/* ---------- category bar ---------- */
.sticky {
  position: sticky; top: 0; z-index: 5;
  background: rgba(21, 19, 18, .88);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 24px;
  padding: 14px 0;
}
.label {
  display: flex; gap: 10px;
  color: var(--faint); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap;
}
.catnav { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav a {
  white-space: nowrap; text-decoration: none; font-size: 14px; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.catnav a:hover { color: var(--text); border-color: var(--line); background: var(--bg-raised); }
.catnav a span { color: var(--faint); margin-left: 6px; font-size: 12px; }

/* ---------- categories + projects ---------- */
.category { padding-top: 64px; }
.cat-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; padding-bottom: 8px; }
.cat-head h2 { font: 400 28px/1.2 var(--serif); margin: 0; }
.cat-head p { margin: 0; color: var(--faint); font-size: 15px; }

/* tiles: all projects at a glance; "Details" opens a panel under the row */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  gap: 28px 24px; padding: 28px 0 8px;
}
.tile {
  display: flex; flex-direction: column;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: #3a3532; }
.tile.open { border-color: var(--red-text); }
.tile .shot { border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); }
.tile-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.tile h3 { font: 400 25px/1.15 var(--serif); letter-spacing: -.01em; margin: 4px 0 4px; }
.teaser {
  color: var(--muted); font-size: 14px; line-height: 1.55; margin: 2px 0 18px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tile .shot img { object-position: top; }
.tile .actions { margin-top: auto; gap: 10px 14px; }
.tile .btn { padding: 8px 15px; font-size: 14px; }
.more {
  font: inherit; font-size: 14px; color: var(--muted); background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px;
  transition: color .15s, border-color .15s;
}
.more:hover, .more[aria-expanded="true"] { color: var(--text); border-color: #55524d; }

.detail {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: start;
  background: var(--bg-raised); border: 1px solid var(--line); border-left: 3px solid var(--red);
  border-radius: 14px; padding: 26px 30px;
  animation: drop .18s ease-out;
}
.detail[hidden] { display: none; }
.detail h4 { font: 400 24px/1.2 var(--serif); margin: 0 0 10px; }
.detail .text { margin-bottom: 18px; }
.detail .facts { margin: 6px 0 0; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.kind { margin: 0; font-size: 12px; color: var(--red-text); letter-spacing: .12em; text-transform: uppercase; }
.text { color: var(--muted); margin: 0 0 22px; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; font-size: 14px; margin: 0 0 28px; }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; color: #cdc9c3; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.btn {
  display: inline-block; background: var(--red); color: #fff; text-decoration: none;
  padding: 11px 20px; border-radius: 10px; font-weight: 500; font-size: 15px;
  transition: background .15s;
}
.btn:hover { background: var(--red-hover); }
.link {
  text-decoration: none; font-size: 15px;
  border-bottom: 1px solid #55524d; padding-bottom: 1px; transition: border-color .15s;
}
.link:hover { border-color: var(--text); }
.note { margin: 18px 0 0; font-size: 13px; color: var(--faint); }

.shot {
  aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.75);
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.panel {
  display: grid; place-items: center; padding: 32px; text-align: center;
  background:
    radial-gradient(closest-side at 50% 50%, rgba(120, 28, 22, .22), transparent),
    repeating-linear-gradient(60deg,  rgba(255,255,255,.025) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-60deg, rgba(255,255,255,.025) 0 1px, transparent 1px 34px),
    var(--bg-raised);
}
.panel span { font: 400 clamp(26px, 3.4vw, 38px)/1.15 var(--serif); color: #8f8a83; max-width: 12em; }

.noscript { color: var(--muted); padding: 40px 0; }

/* ---------- footer ---------- */
.foot {
  display: flex; gap: 18px; align-items: flex-start;
  border-top: 1px solid var(--line); margin-top: 40px; padding-top: 36px; padding-bottom: 56px;
  color: var(--faint); font-size: 13px;
}
.foot img { opacity: .9; flex: none; }
.foot p { margin: 0 0 8px; max-width: 46em; }
.foot .credit { color: var(--text); font-size: 15px; }
.foot a { color: var(--muted); }

a:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; border-radius: 4px; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .wrap { padding: 0 22px; }
  .hero { padding: 20px 0 64px; }
  .logo { width: 180px; }
  .lead { font-size: 17px; }
  .sticky { gap: 12px; }
  .label { display: none; }
  .catnav { margin-left: -4px; }
  .category { padding-top: 44px; }
  .detail { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* visitor counter (hits.sh) */
.foot .hits { margin-top: 14px; }
.foot .hits img { display: inline-block; height: 20px; width: auto; border-radius: 4px; opacity: .55; }
