/*
  andrewculver.net — shared stylesheet for the home page and the blog.

  Spline Sans Mono by Eben Sorkin and Mirko Velimirović, SIL Open Font License 1.1
  (see fonts/OFL.txt). Self-hosted, variable weight 300-700.
*/
@font-face {
  font-family: "Spline Sans Mono";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/spline-sans-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Spline Sans Mono";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/spline-sans-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --card: rgb(253, 253, 253);
  --ink: rgb(7, 31, 47);
  --ink-2: #000;
  --ink-muted: rgb(90, 108, 122);
  --rule: rgba(7, 31, 47, 0.14);
  --accent: rgb(20, 138, 255);
  --content-line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --card: rgb(13, 31, 46);
    --ink: rgb(253, 253, 253);
    --ink-2: rgb(226, 232, 240);
    --ink-muted: rgb(148, 163, 184);
    --rule: rgba(253, 253, 253, 0.16);
    --accent: rgb(56, 152, 255);
  }
}

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

html { background: var(--card); }

body {
  margin: 0;
  min-width: 320px;
  font-family: "Spline Sans Mono", monospace;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--card);
  padding: 20px 15px;
}

.content {
  width: 1170px;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 15px;
}

.inner {
  margin: 0 16px;
  overflow-wrap: break-word;
}

.photo {
  margin: 15px 0 0;
}

.photo img {
  display: block;
  width: 150px;
  height: 150px;
  max-width: 100%;
  border-radius: 75px;
}

h1 {
  margin: 15px 0 0;
  padding: 10px 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.48px;
  color: var(--ink);
}

h2 {
  margin: 0;
  padding: 10px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.24px;
  color: var(--ink-2);
}

a {
  color: var(--ink);
  text-decoration: underline;
}

.links {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  font-size: 18px;
  font-weight: 400;
  line-height: var(--content-line-height);
}

.links li {
  display: flex;
}

.links li + li {
  margin-top: 10px;
}

.links .icon {
  flex: none;
  width: 1.25em;
  height: 1em;
  margin: calc((var(--content-line-height) - 1) / 2 * 1em) 10px 0 0;
  fill: var(--accent);
}

/* Blog ------------------------------------------------------------------ */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 0;
  font-size: 15px;
  line-height: 1.5;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-nav img {
  width: 32px;
  height: 32px;
  border-radius: 16px;
}

.site-nav .sep,
.site-nav [aria-current="page"] {
  color: var(--ink-muted);
}

.site-nav .feed {
  margin-left: auto;
}

.blog h1 {
  line-height: 1.2;
}

.post,
.post-list {
  max-width: 740px;
}

.post-meta {
  margin: 0;
  padding: 0 0 10px;
  font-size: 15px;
  color: var(--ink-muted);
}

.post-cover {
  margin: 10px 0 25px;
}

.post-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.post-body {
  font-size: 17px;
  line-height: 1.6;
}

.post-body p {
  margin: 0 0 1.25em;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-footer {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
}

.post-list {
  padding: 10px 0;
}

.post-list article + article {
  margin-top: 30px;
}

.post-list time {
  display: block;
  font-size: 15px;
  color: var(--ink-muted);
}

.post-list h2 {
  padding: 4px 0 0;
}

.post-list p {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

@media (max-width: 770px) {
  :root { --content-line-height: 1.4; }

  .inner { margin: 0; }

  .photo img { margin: 0 auto; }

  h1 {
    font-size: 17px;
    line-height: 1.4;
    letter-spacing: 0;
  }

  h2 {
    font-size: 13.6px;
    line-height: 1.4;
    letter-spacing: 0;
  }

  .links { font-size: 17px; }

  .blog h1 {
    font-size: 22px;
    line-height: 1.3;
  }

  .site-nav,
  .post-meta,
  .post-footer,
  .post-list time { font-size: 14px; }

  .post-body { font-size: 16px; }

  .post-list h2 { font-size: 17px; }

  .post-list p { font-size: 15px; }
}
