/* ---------------------------------------------------
   Tokens
--------------------------------------------------- */
:root {
  --ink: #fbfbf2;
  --surface: #1a1f28;
  --rule: #2c333f;
  --paper: #12161d;
  --paper-dim: #3a424e;
  --brass: #dfa002;
  --brass-dim: #a78633;

  --display: "Fraunces", Georgia, serif;
  --body: "PT Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --max-width: 720px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img {
  max-width: 100%;
  display: block;
}

button {
  background: var(--ink);
  color: var(--brass);
  
  font-family: var(--display);
  font-size: 1.2rem;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------
   Header / Footer
--------------------------------------------------- */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  align-items: center;  
}

.site-header-img {
  max-width: 30rem;

}

.site-title {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.9rem;
  text-decoration: none;
  color: var(--paper);
  letter-spacing: 0.01em;
}

.site-sub {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--paper-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--paper-dim);
  border-top: 1px solid var(--rule);
}

/* ---------------------------------------------------
   Ledger (homepage list)
--------------------------------------------------- */
.ledger {
  list-style: none;
  margin: 0 auto;
  padding: 0 1.5rem;
  max-width: var(--max-width);
}

.ledger-entry {
  border-bottom: 1px solid var(--rule);
}

.entry-link {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 2rem 0;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.entry-link:hover .entry-title,
.entry-link:focus-visible .entry-title {
  color: var(--brass);
}

.entry-image {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.entry-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-body {
  flex: 1;
  min-width: 0;
}

.entry-meta {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--paper-dim);
  margin-bottom: 0.4rem;
}

.entry-index {
  color: var(--brass-dim);
}

.entry-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
  color: var(--paper);
  transition: color 0.15s ease;
}

.entry-excerpt {
  margin: 0;
  color: var(--paper-dim);
  font-size: 0.95rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------------------------------------------
   Single post
--------------------------------------------------- */
.post {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.back-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--brass);
  text-decoration: none;
  margin-bottom: 2rem;
}

.back-link--bottom {
  margin-top: 3rem;
  margin-bottom: 0;
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
}

.post-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--paper-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.5rem;
}

.post-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 0 2rem;
}

.post-image {
  margin: 0 0 2rem;
  border: 1px solid var(--rule);
}

.post-content {
  font-size: 1.08rem;
}

.post-content p { margin: 0 0 1.3em; }

.post-content img {
  margin: 1.5rem 0;
  border: 1px solid var(--rule);
}

.post-content a {
  color: var(--brass);
}

.post-content h2,
.post-content h3 {
  font-family: var(--display);
  color: var(--paper);
  margin: 2rem 0 1rem;
}

/* ---------------------------------------------------
   Small screens
--------------------------------------------------- */
@media (max-width: 480px) {
  .site-header { padding: 3rem 1.25rem 1.5rem; }
  .entry-link { gap: 1rem; padding: 1.5rem 0; }
  .entry-image { flex-basis: 72px; width: 72px; height: 72px; }
  .entry-title { font-size: 1.15rem; }
  .post-title { font-size: 1.7rem; }
}
