@font-face {
  font-family: "Roboto";
  src: url("/font/Roboto-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  src: url("/font/Roboto-Italic.woff2") format("woff2");
  font-style: italic;
}
@font-face {
  font-family: "Roboto";
  src: url("/font/Roboto-Bold.woff2") format("woff2");
  font-weight: bold;
}
@font-face {
  font-family: "Roboto";
  src: url("/font/Roboto-BoldItalic.woff2") format("woff2");
  font-weight: bold;
  font-style: italic;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("/font/RobotoMono-Regular.woff2") format("woff2");
}

html {
  display: flex;
  flex-direction: row;
  justify-content: center;
  background-color: #111;
}

body {
  color: #ddd;
  line-height: 1.4;
  font-family: "Roboto", sans-serif;
  font-size: 1.1em;
  max-width: 1200px;
  overflow-x: scroll;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

p {
  text-align: justify;
}
h1 {
  margin-top: 1em;
  margin-bottom: 0;
}
h1, h2, h3, h4, h5 {
  color: #f0f0f0;
  text-decoration: none;
}
b, strong {
  color: #fff;
}
a:any-link {
  color: #4cd;
}
:is(h1, h2, h3, h4, h5) > a:any-link {
  color: inherit;
  text-decoration: inherit;
}
hr {
  width: 100%;
  margin-top: 1em;
  margin-bottom: 1em;
}
figure {
  text-align: center;
  font-style: italic;
}
img {
  max-width: 100%;
}
p:has(> img) {
  display: flex;
  justify-content: center;
  margin: 1.5em 0;
}
pre {
  background: #242424;
  padding: 10px 15px;
  font-size: 1.1em;
  overflow-x: scroll;
}
code {
  line-height: 1.0;
  font-family: "Roboto Mono", monospace;
  font-size: 1rem;
}

header.site-header {
  display: flex;
  justify-content: center;
  margin-bottom: 1em;
}
header.site-header > a {
  padding: 0.5em;
  display: flex;
  flex-direction: row;
  gap: 1.5em;
  text-decoration: none;
  justify-content: center;
  align-items: center;
}
header.site-header > a > h1 {
  font-size: 1.2em;
  margin: 0;
  color: #4cd;
}
/* who needs assets when you have linear-gradient */
header.site-header > a > div.icon {
  width: 3.0em;
  height: 3.0em;
  background: linear-gradient(45deg, rgba(204,34,255,1) 15%, rgba(255,221,102,1) 85%);
  border-radius: 100%;
}

footer.site-footer {
  font-size: 0.8em;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  width: 100%;
}

header.post-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
header.post-header > h3.date {
  margin: 0;
  color: #ccc;
  align-self: flex-end;
  flex-shrink: 0;
}

.posts {
  display: flex;
  flex-direction: row-reverse;
  margin-top: 1.4em;
  gap: 1em;
}
.posts > .rss {
  margin-right: 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
}
.posts > .rss > img {
  height: 2em;
}
.posts > ul {
  margin: 0;
  flex-grow: 1;
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 1.6em;
}
.posts > ul > li {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.posts > ul > li > a.title {
  font-size: 1.4em;
  text-decoration: none;
}
.posts > ul > li > .date {
  font-size: 0.9em;
}

.prev-next {
  display: flex;
  flex-direction: row;
  margin-top: 40px;
  gap: 1em;
}
.prev-next > :is(.prev, .next) {
  flex-basis: 0;
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}
.prev-next > .prev {
  justify-content: flex-start;
}
.prev-next > .next {
  justify-content: flex-end;
}
.prev-next > :is(.prev, .next) > svg {
  height: 1em;
}

.block {
  margin: 0 12px;
  background: #3a3a2a;
  border: 3px dashed #a84;
  color: #fff;
  padding: 0.5em 1.0em;
}
.block > p {
  padding: 0;
  margin: 0.5em 0;
}

code.zig {
  color: #fff;
}
code.zig .comment {
  color: #bbb;
}
code.zig .string {
  color: #e5c07b;
}
code.zig .keyword,
code.zig .keyword_modifier,
code.zig .keyword_exception,
code.zig .keyword_conditional,
code.zig .keyword_type,
code.zig .keyword_function,
code.zig .keyword_import,
code.zig .keyword_return,
code.zig .function_builtin,
code.zig .constant_builtin,
code.zig .type_builtin {
  color: #71cfff;
}
code.zig .constant,
code.zig .type,
code.zig .variable {
  color: #ff7c85;
}

/* a handful of tweaks for small screens... */
@media (width < 700px) {
  body {
    /* the 1.1em default is a bit too big on mobile */
    font-size: 1.0rem;
  }
  .post-header {
    /* put the date at the bottom so it doesn't force the title to wrap */
    flex-direction: column;
  }
  .prev-next {
    /* there isn't horizontal space for these controls, align them vertically instead */
    flex-direction: column;
    align-items: center;
  }
  .posts {
    /* put the rss link at the top so it doesn't force the post names to wrap */
    flex-direction: column;
  }
  .posts > .rss {
    /* because of the above, we can use all the horizontal space, so this looks better */
    flex-direction: row;
    justify-content: center;
  }
}
