:root {
  --ink: #f6f1ea;
  --bg: #3a2c22;
  --gutter: clamp(16px, 4.5vw, 80px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.home {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.hero {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
}

.column {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(40px, 7vh, 72px) var(--gutter) clamp(56px, 10vh, 104px);
  text-shadow: 0 0 12px rgba(0, 0, 0, .25);
}

.title {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.2vh, 26px);
  font-size: clamp(17px, 1.15vw, 22px);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.2;
}

nav {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vh, 14px);
  margin-top: clamp(36px, 5.5vh, 60px);
  font-size: clamp(11px, .7vw, 13px);
  letter-spacing: .04em;
}

nav a,
.title {
  color: var(--ink);
  text-decoration: none;
  width: fit-content;
}

nav a:hover,
nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.manifesto {
  max-width: 31ch;
  font-size: clamp(11px, .7vw, 13px);
  line-height: 1.3;
  letter-spacing: .02em;
}

.manifesto p + p { margin-top: 1.3em; }

/* journal */

/* darker photo so long text stays readable */
.journal-page .hero { filter: brightness(.5) saturate(.9); }

.journal-layout {
  position: relative;
  display: grid;
  grid-template-columns: 280px 210px minmax(0, 360px);
  align-items: start;
  padding: clamp(40px, 7vh, 72px) var(--gutter) 120px;
  text-shadow: 0 0 12px rgba(0, 0, 0, .25);
}

nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }

.explore,
.entries {
  font-size: clamp(11px, .7vw, 13px);
  letter-spacing: .04em;
}

.explore-label { padding-top: .3em; margin-bottom: 22px; }

.explore summary {
  list-style: none;
  cursor: pointer;
  margin-bottom: 12px;
  margin-left: -1.4em;
}
.explore summary::-webkit-details-marker { display: none; }
.explore summary::before {
  content: "";
  display: inline-block;
  width: .45em;
  height: .45em;
  margin: 0 .75em .2em .1em;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s;
}
.explore details[open] summary::before { transform: rotate(45deg); }

.explore ul { list-style: none; margin: 0 0 16px; }
.explore li + li { margin-top: 8px; }
.explore { min-width: 0; padding-right: 28px; }
.explore a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.explore a:hover { text-decoration: underline; text-underline-offset: 3px; }

.entries h1 {
  font-size: clamp(17px, 1.15vw, 22px);
  font-weight: 400;
  letter-spacing: .04em;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(246, 241, 234, .7);
}

/* desktop: the page stays put and only the entries scroll, under the rule below "journal" */
@media (min-width: 901px) {
  .journal-layout {
    height: 100vh;
    height: 100svh;
    padding-bottom: 0;
    overflow: hidden;
  }
  .entries {
    display: flex;
    flex-direction: column;
    height: calc(100svh - clamp(40px, 7vh, 72px));
  }
  .entry-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    padding-bottom: 80px;
  }
  .entry-list::-webkit-scrollbar { display: none; }
}

.entry {
  padding-top: 26px;
  margin-bottom: 40px;
}
.entry + .entry { border-top: 1px solid rgba(246, 241, 234, .7); }

.entry h2 { font-size: inherit; font-weight: 400; }

.entry .date { margin: 14px 0 64px; }

.entry p:not(.date) { line-height: 1.4; }
.entry p:not(.date) + p { margin-top: 1.4em; }

.entry img,
.photo-placeholder {
  display: block;
  width: 100%;
  margin: 40px 0;
}
.entry img { height: auto; }
.photo-placeholder { aspect-ratio: 7 / 4; background: #d9d9d9; }

@media (max-width: 900px) {
  .journal-layout {
    grid-template-columns: 1fr;
    row-gap: 40px;
    max-width: 480px;
  }
  .sidebar,
  .explore { position: static; }
  .explore summary { margin-left: 0; }
  .explore-label { margin-bottom: 14px; }
}

@media (max-width: 640px) {
  .journal-layout {
    background: linear-gradient(to right, rgba(20, 14, 10, .6), rgba(20, 14, 10, .3));
    min-height: 100vh;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
  }
  .explore, .entries { font-size: 13px; }
  .entries h1 { font-size: 20px; }
  .hero { object-position: 45% center; }
  .column {
    background: linear-gradient(to right, rgba(20, 14, 10, .6), rgba(20, 14, 10, .15) 90%);
    text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
  }
  .title { font-size: 20px; }
  nav, .manifesto { font-size: 13px; }
  .manifesto { max-width: 30ch; }
}
