/* ===========================================================
   MACHAERUS — design tokens
   Warm limestone (light) / soft ink (dark text) / oxide accent
   =========================================================== */
:root{
  --limestone:   #F4EFE4;
  --limestone-2: #E8E0CE;
  --paper:       #FBF8F1;
  --ink:         #2C2620;
  --ink-soft:    #5B5347;
  --stone:       #8B8172;
  --oxide:       #A8442E;
  --oxide-soft:  rgba(168,68,46,0.12);
  --hairline:    rgba(44,38,32,0.14);

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body:    "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono:    "IBM Plex Mono", "Courier New", monospace;

  --max: 760px;
  --pad: clamp(20px, 6vw, 64px);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--limestone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

::selection{ background: var(--oxide-soft); }

/* focus visibility (accessibility floor) */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--oxide);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- Nav ---------------- */
.site-nav{
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  background: rgba(244,239,228,0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.site-nav .brand{
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--ink);
}
.site-nav ul{
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-nav a{ opacity: 0.68; transition: opacity .15s ease, color .15s ease; padding: 4px 0; border-bottom: 1px solid transparent; color: var(--ink); }
.site-nav a:hover{ opacity: 1; }
.site-nav a.active{ opacity: 1; color: var(--oxide); border-bottom-color: var(--oxide); }

/* ---------------- Hero ---------------- */
.hero{
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
  background: var(--ink);
}
.hero .hero-photo{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.2;
  overflow: hidden;
}
.hero .hero-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero .hero-photo::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20,16,10,0.86) 0%,
    rgba(20,16,10,0.42) 38%,
    rgba(20,16,10,0.02) 68%
  );
}
.hero-inner{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 44px;
  color: var(--limestone);
}

.eyebrow{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--limestone-2);
  margin: 0 0 16px;
  opacity: 0.85;
}
.eyebrow::before{ content: "— "; color: #E8895F; }

h1.title{
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 8vw, 76px);
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  line-height: 1.02;
  color: #FBF8F1;
}
.subtitle{
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  color: var(--limestone-2);
  font-size: clamp(16px, 2.2vw, 20px);
  max-width: 42ch;
  margin: 0;
}

/* ---------------- Content sections ---------------- */
main{
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--pad) 40px;
}
section + section{ margin-top: 52px; }

.epigraph{
  border-left: 2px solid var(--oxide);
  padding-left: 18px;
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 52ch;
  margin: 0 0 44px;
}

.lede{
  font-size: 19px;
  color: var(--ink);
}
p{ margin: 0 0 22px; color: var(--ink-soft); }

cite{
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--oxide);
  border-bottom: 1px dotted var(--stone);
}

h2.section-title{
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxide);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}

.institutions{
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 14px;
}
.institutions li{
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15.5px;
  color: var(--ink-soft);
}
.institutions li b{ color: var(--ink); font-weight: 600; }

.contact-block{
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--stone);
}
.contact-block a{ color: var(--ink); border-bottom: 1px solid var(--oxide); }
.contact-block a:hover{ color: var(--oxide); }

/* ---------------- List pages (Books / Articles) ---------------- */
.page-head{ margin-bottom: 8px; }
.page-head h1{
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 6vw, 48px);
  margin: 0 0 10px;
}
.page-head p{
  color: var(--stone);
  font-size: 15.5px;
  max-width: 46ch;
}

.entry-list{
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 28px 24px;
}
.entry{
  display: block;
  transition: transform .18s ease;
}
.entry:hover{ transform: translateY(-4px); }

.entry .cover{
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  overflow: hidden;
  background: var(--limestone-2);
  border: 1px solid var(--hairline);
  box-shadow: 0 0 0 0 transparent;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.entry:hover .cover{
  border-color: var(--oxide);
  box-shadow: 0 14px 28px -14px rgba(0,0,0,0.6);
}
.entry .cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.entry .cover .no-cover{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  color: var(--stone);
}
.entry .cover .view{
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--limestone);
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0));
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
}
.entry:hover .cover .view{ opacity: 1; transform: translateY(0); }

/* visually hidden, but readable by screen readers */
.entry .sr-caption{
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.empty-state{
  padding: 40px 0;
  color: var(--stone);
  font-family: var(--mono);
  font-size: 13px;
}

/* ---------------- Footer ---------------- */
footer{
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--pad) 64px;
  color: var(--stone);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--hairline);
}

@media (max-width: 560px){
  .site-nav{ padding: 18px 20px; }
  .site-nav ul{ gap: 16px; }
}
