/* 0x0j.net
   black and white film — matte, minimal, written
   ------------------------------------------------ */

/* variables */

:root {
  --bg:         #0d0d0d;
  --surface:    #111111;
  --border:     #1e1e1e;
  --muted:      #3a3a3a;
  --secondary:  #666666;
  --body:       #c8c8c8;
  --bright:     #e8e8e8;
  --white:      #f0f0f0;
  --link:       #888888;
  --link-hover: #c8c8c8;

  --serif:      Georgia, 'Times New Roman', serif;
  --mono:       'Inconsolata', 'Fira Mono', 'Courier New', monospace;

  --measure:    680px;
  --gap:        2rem;
}

/* reset */

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

/* base */

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--serif);
  line-height: 1.75;
  padding: 2rem 1.25rem 4rem;
}

/* layout */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
}

/* header */

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 3rem;
}

header a.home {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--bright);
  text-decoration: none;
  letter-spacing: 0.04em;
}

header a.home:hover {
  color: var(--white);
}

nav {
  font-family: var(--mono);
  font-size: 0.75rem;
}

nav a {
  color: var(--secondary);
  text-decoration: none;
  margin-left: 1.5rem;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--body);
}

/* post list (index) */

.post-list {
  list-style: none;
}

.post-list li {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:first-child {
  border-top: 1px solid var(--border);
}

.post-list .date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  min-width: 6rem;
  flex-shrink: 0;
}

.post-list a {
  font-size: 0.95rem;
  color: var(--body);
  text-decoration: none;
}

.post-list a:hover {
  color: var(--bright);
}

/* post */

.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--bright);
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.post-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.post-meta .tag {
  color: var(--secondary);
}

/* prose */

.prose p {
  margin-bottom: 1.25rem;
}

.prose h2 {
  font-size: 1.15rem;
  font-weight: normal;
  color: var(--bright);
  margin: 2rem 0 0.75rem;
}

.prose h3 {
  font-size: 1rem;
  font-weight: normal;
  color: var(--bright);
  margin: 1.5rem 0 0.5rem;
}

.prose a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--secondary);
}

.prose blockquote {
  border-left: 2px solid var(--muted);
  padding-left: 1.25rem;
  color: var(--secondary);
  font-style: italic;
  margin: 1.5rem 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* code */

code {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--body);
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

pre {
  background: var(--surface);
  border-left: 2px solid var(--muted);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.82rem;
  color: #aaaaaa;
  line-height: 1.6;
}

/* post navigation */

.post-nav {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-nav a {
  color: var(--secondary);
  text-decoration: none;
}

.post-nav a:hover {
  color: var(--body);
}

/* now page */

.now-updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2.5rem;
}

/* footer */

footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-top: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

/* responsive */

@media (max-width: 480px) {
  html { font-size: 16px; }

  header {
    flex-direction: column;
    gap: 0.75rem;
  }

  nav a:first-child { margin-left: 0; }

  .post-list li {
    flex-direction: column;
    gap: 0.2rem;
  }

  .post-list .date {
    min-width: unset;
  }
}