/* Styling modelled on the AnaLog WordPress theme as customised on the old site. */

@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: italic; font-weight: 700; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-700-italic.woff2") format("woff2"); }

:root {
  --brand: #00525b;
  --bg: #c9dddd;
  --card: #fff;
  --text: #333;
  --muted: #666;
  --link: #0084a5;
  --rule: #d6d6d6;
  --measure: 46rem;
}

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

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

body {
  margin: 0;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  /* the theme's fine dotted texture */
  background-image:
    linear-gradient(45deg, rgba(0, 0, 0, .05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, .05) 25%, transparent 25%);
  background-size: 2px 2px;
}

a { color: var(--link); }
a:hover { color: #000; }

img, video, iframe, object { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { line-height: 1.3; color: #111; }

blockquote {
  margin: 1.5em 0;
  padding: .5em 1em;
  border-left: 4px solid var(--brand);
  background: #f4f5f6;
}
blockquote p:first-child { margin-top: 0; }
blockquote p:last-child { margin-bottom: 0; }

hr, .wp-block-separator { border: 0; border-top: 2px dashed var(--rule); margin: 2em auto; }

pre, code { font-family: inherit; background: #fff9ad; }
pre { padding: 1em; overflow-x: auto; }

table { border-collapse: collapse; width: 100%; }
td, th { border: 1px solid var(--rule); padding: .4em .6em; vertical-align: top; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: .5em 1em; z-index: 10; }

/* Header */
.site-header { max-width: var(--measure); margin: 0 auto; padding: 2rem 1rem 0; }
.site-branding { background: var(--brand); color: #fff; padding: 1.5rem 1.5rem 1.25rem; }
.site-title { margin: 0; font-size: 1.75rem; font-weight: 700; }
.site-title a { color: #fff; text-decoration: none; }
.site-description { margin: .25rem 0 0; color: #e2e2e2; }

.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; background: var(--card); border-bottom: 1px solid var(--rule); }
.main-navigation a { display: block; padding: .75rem 1.25rem; color: var(--text); text-decoration: none; }
.main-navigation a:hover, .main-navigation a[aria-current] { background: #f1f1f1; color: #000; }
.main-navigation a[aria-current] { font-weight: 700; }

/* Content */
.site-content { max-width: var(--measure); margin: 1.5rem auto; padding: 0 1rem; }
.entry, .archive-header, .comments, .post-navigation { background: var(--card); padding: 1.5rem 2rem; margin-bottom: 1.5rem; }
.archive-header { padding-bottom: .5rem; }
.archive-header .entry-title { margin: 0 0 1rem; }
.entry-title { margin-top: 0; font-size: 1.6rem; }
.entry-title a { color: inherit; text-decoration: none; }
.entry.summary .entry-title { font-size: 1.3rem; }
.entry-meta { color: var(--muted); font-size: .875rem; margin-top: -.5rem; }
.entry-footer { border-top: 1px dashed var(--rule); margin-top: 2rem; padding-top: 1rem; font-size: .875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.more-link { font-size: .875rem; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed var(--rule); }
.post-list time { color: var(--muted); font-size: .875rem; white-space: nowrap; }

.post-navigation { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.post-navigation .nav-next { text-align: right; margin-left: auto; }
.meta-nav { color: var(--muted); font-size: .8rem; text-transform: uppercase; }

.pagination { display: flex; justify-content: space-between; flex-direction: row-reverse; margin-bottom: 1.5rem; }
.pagination a { background: var(--card); padding: .5rem 1rem; text-decoration: none; }

/* Archived comments */
.comments h2 { margin-top: 0; font-size: 1.2rem; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment { border-top: 1px dashed var(--rule); padding: .75rem 0; }
.comment.depth-2 { margin-left: 1.5rem; }
.comment.depth-3, .comment.depth-4 { margin-left: 3rem; }
.comment-meta { margin: 0; font-size: .875rem; color: var(--muted); }
.comment-meta b { color: var(--text); }
.comment-content p { margin: .4em 0; }
.no-comments { color: var(--muted); font-size: .875rem; }

/* Archive gaps */
.missing-image { display: block; padding: 1rem; background: #f1f1f1; color: var(--muted); font-style: italic; text-align: center; }
.missing-file { color: var(--muted); text-decoration: line-through dotted; cursor: help; }

.site-footer { text-align: center; padding: 1rem; }
.site-footer p { display: inline-block; margin: 0; background: var(--brand); color: #fff; padding: .4rem 1rem; font-size: .875rem; }
.site-footer a { color: #fff; }

/* WordPress block and classic-editor content */
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
.wp-caption, figure { margin: 1.5em 0; max-width: 100%; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.has-text-align-center { text-align: center; }
.has-large-font-size { font-size: 1.25rem; font-weight: 700; margin-bottom: 0; }
.has-large-font-size + p { margin-top: 0; color: var(--muted); }

.wp-block-columns { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.wp-block-column { flex: 1 1 12rem; min-width: 0; }

.wp-block-media-text { display: grid; grid-template-columns: 25% auto; gap: 0 1.5rem; align-items: start; margin: 1.5rem 0; }
.wp-block-media-text.is-vertically-aligned-center { align-items: center; }
.wp-block-media-text.no-media { display: block; }
.wp-block-media-text__media { margin: 0; }
.wp-block-media-text__media img { width: 100%; }
.wp-block-media-text__content > :first-child { margin-top: 0; }

.wp-block-pullquote { border-top: 4px solid var(--brand); border-bottom: 4px solid var(--brand); margin: 2em 0; padding: 1em 0; text-align: center; }
.wp-block-pullquote blockquote { border: 0; background: none; font-size: 1.15rem; }

.wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 1.5em 0; }
.wp-block-file__embed { width: 100%; height: 600px; border: 1px solid var(--rule); }
.wp-block-file__button, .wp-block-button__link { display: inline-block; background: var(--brand); color: #fff; padding: .4em 1em; text-decoration: none; }

.wp-block-embed iframe, iframe { border: 0; }
.wp-block-embed__wrapper { position: relative; }

@media (max-width: 600px) {
  .site-header { padding-top: 0; padding-left: 0; padding-right: 0; }
  .site-content { padding: 0; }
  .entry, .archive-header, .comments, .post-navigation { padding: 1.25rem 1rem; }
  .main-navigation a { padding: .75rem .8rem; }
  .wp-block-media-text { display: block; }
  .wp-block-media-text__media { max-width: 12rem; margin-bottom: 1rem; }
  .alignleft, .alignright { float: none; margin: 1em auto; display: block; }
  .post-list li { flex-direction: column; gap: 0; }
}
