:root {
  --accent: #00f;
  --bg: #fff;
  --dim: #666;
  --fg: #000;
  --font: "Courier New", Courier, monospace;
  --mark-font: "WildStyle Drip", "Courier New", Courier, monospace;
  --white: #fff;
}

@font-face {
  font-display: block;
  font-family: "WildStyle Drip";
  src: url("fonts/wildstyle-drip.ttf") format("truetype");
}

html {
  box-sizing: border-box;
  font-size: 62.5%;
  height: 100%;
}

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

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 1px dotted var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: var(--white);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.1rem;
  line-height: 108%;
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
}

body.dark {
  --bg: #000;
  --dim: #999;
  --fg: #fff;
}

body.dark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22200%22 height=%22200%22%3E%3Cfilter id=%22grain%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.8%22 numOctaves=%222%22 stitchTiles=%22stitch%22/%3E%3CfeColorMatrix values=%220.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0 0 0 0.13 0%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23grain)%22/%3E%3C/svg%3E");
}

h1,
h2,
p {
  font-weight: 400;
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  background: var(--accent);
  color: var(--white);
}

.dim {
  color: var(--dim);
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.site {
  align-items: center;
  animation: fade 0.6s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 1.6rem;
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site {
    animation: none;
  }
}

.header {
  margin-top: 2.4rem;
  text-align: center;
}

.dark .header {
  margin-top: 5rem;
}

@media (min-height: 960px) {
  .dark .header {
    margin-top: 12vh;
  }
}

.header a:hover,
.header a:focus {
  background: none;
}

.mark {
  align-items: center;
  background: var(--accent);
  color: var(--white);
  display: inline-flex;
  font-family: var(--mark-font);
  font-size: 2.6rem;
  line-height: 1;
  padding: 1.9rem 1.4rem 1.5rem 1.2rem;
  white-space: nowrap;
}

.clock {
  font-size: 1.3rem;
  margin-top: 1.6rem;
}

.weather {
  font-size: 1.3rem;
  margin-top: 0.4rem;
  min-height: 1.4rem;
}

.weather:not(:empty)::before {
  background: currentcolor;
  content: "";
  display: inline-block;
  height: 0.8rem;
  margin-right: 0.8rem;
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'><path d='M6 16a5 5 0 0 1-.6-9.96A7 7 0 0 1 18.9 7.1 4.5 4.5 0 0 1 19 16z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'><path d='M6 16a5 5 0 0 1-.6-9.96A7 7 0 0 1 18.9 7.1 4.5 4.5 0 0 1 19 16z'/></svg>") center / contain no-repeat;
  width: 1.2rem;
}

.main {
  flex: 1 0 auto;
  margin-top: 3.2rem;
  max-width: 70rem;
  width: 100%;
}

.dark .main {
  display: flex;
  justify-content: center;
  margin-top: 8rem;
}

.home-menu {
  width: 16rem;
}

.home-menu li {
  font-size: 1.2rem;
  white-space: nowrap;
}

.home-menu li + li {
  margin-top: 1.6rem;
}

.home-menu a,
.post-title a,
.rows .name a {
  margin-left: -0.2rem;
  padding: 0 0.2rem;
}

.menu-preview {
  display: none;
  font-size: 1.1rem;
  margin-left: 1.6rem;
}

@media (hover: hover) {
  .home-menu a:hover + .menu-preview,
  .home-menu a:focus-visible + .menu-preview {
    display: inline;
  }
}

.text {
  letter-spacing: -0.03rem;
}

.text h1 {
  font-size: 1.3rem;
  font-weight: 700;
}

.text h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 2.4rem;
}

.text p,
.text ul {
  margin-top: 0.8rem;
}

.text li + li {
  margin-top: 0.4rem;
}

.text p a,
.text li a {
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.text .rows .name a {
  text-decoration: none;
}

.text .block,
.text .grid {
  margin-top: 1.6rem;
}

.grid {
  display: grid;
  gap: 1.6rem 0.8rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.text .grid li + li {
  margin-top: 0;
}

.tile {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--fg);
  color: var(--dim);
  overflow: hidden;
  padding: 0.8rem;
}

.text .caption {
  margin-top: 0.4rem;
}

.caption b {
  display: block;
}

.post {
  margin-top: 2.4rem;
}

.text .post-title {
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 120%;
  margin-top: 0.2rem;
}

.post-summary {
  max-width: 44rem;
}

.rows li {
  display: flex;
  gap: 1.6rem;
}

.rows .date {
  flex: 0 0 9rem;
}

.rows .name {
  flex: 0 0 16rem;
}

.icon {
  fill: currentcolor;
  height: 1.1rem;
  margin-right: 0.8rem;
  vertical-align: -0.1rem;
  width: auto;
}

.footer {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 4.8rem 0 3.6rem;
  max-width: 70.6rem;
  width: 100%;
}

.footer a {
  display: block;
  margin: 0 0.2rem;
  padding: 0.2rem;
}

.footer a:first-child {
  margin-right: auto;
}

.footer a[aria-current] {
  font-weight: 700;
}

@media (min-width: 768px) {
  .footer {
    flex-wrap: nowrap;
    height: 4.8rem;
    margin: 0.8rem 0 0;
  }

  .footer a {
    font-size: 1.3rem;
  }
}

.contact {
  color: var(--dim);
  font-style: normal;
  line-height: 140%;
  margin: 0 0 2.4rem;
  text-align: center;
}

.contact p + p {
  margin-top: 0.8rem;
}

@media (min-width: 768px) {
  .contact {
    bottom: 1.2rem;
    margin: 0;
    position: fixed;
    right: 1.6rem;
    text-align: right;
  }
}
