:root {
  --bg: #1f2335;
  --bg-highlight: #24283b;

  --fg: #a9b1d6;

  --purple: #6f42ed;
  --blue: #5ec2db;
  --light-green: #30b57b;
  --light-red: #f7718e;
  --magenta: #ff47a0;
  --yellow: #ceb46d;
}

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

html {
  background-color: var(--bg);
  color: var(--fg);
  width: 100%;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 100%;
}

header,
main,
section,
footer {
  width: 100%;
}

main {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 8px;
  min-height: 100%;
}

a,
a:visited {
  color: var(--magenta);
}

a:hover,
a:active {
  color: var(--purple);
}

/* === HEADER === */

header {
  padding: 8px;
  border-bottom: 2px solid var(--bg-highlight);
}

header h1>a,
header h1>a:visited {
  color: var(--blue);
}

header h1>a:hover,
header h1>a:active {
  color: var(--light-green);
}

nav {
  font-size: 1.2rem;
  font-weight: bold;
}

nav ul {
  padding: 8px;
}

nav ul>li {
  list-style: none;
  display: inline;
}

nav ul>li:first-child::before {
  content: "⌁ ";
}

nav ul>li:not(:last-child)::after {
  content: " ⁘ ";
  font-size: 80%;
}

nav ul>li:last-child::after {
  content: " ⌁";
}

nav a,
nav a:visited {
  color: var(--purple);
}

nav a:hover,
nav a:active {
  color: var(--light-green);
}

/* === CLACKS === */

/* === SECTIONS === */

section,
.tiles,
.tile,
.post-excerpt {
  padding: 8px;
  border-bottom: 2px dotted var(--bg-highlight);
}

section h2,
.tile h3,
.post-excerpt h3 {
  padding: 2px 8px;
  color: var(--bg);
  border: 1px dotted;
}

section p,
.tile p,
.post-excerpt {
  padding: 8px;
}

section.friends,
section.post-list {
  border: none;
}

section.friends h2,
section.post-list h2 {
  background-color: var(--blue);
}

/* === HOMEPAGE === */

section.blurb h2 {
  background-color: var(--blue);
}

section.status h2 {
  background-color: var(--yellow);
}

section.blog h2 {
  background-color: var(--light-red);
}

section.blog a {
  color: var(--magenta);
}

section.blog a:hover {
  color: var(--purple);
}

.post-summary {
  padding: 8px;
}

section.blog .post-summary a {
  text-decoration: none;
  color: var(--fg);
}

.post-summary h3 {
  color: var(--light-red);
  text-decoration: underline;
  display: inline;
}

.post-summary h3:hover {
  color: var(--magenta);
}

.post-summary span {
  margin-left: 8px;
}

.post-summary p {
  margin-top: 4px;
  border-left: 1px dotted var(--light-red);
}

.post-summary p:hover {
  border-color: var(--magenta);
}

section.rings h2 {
  background-color: var(--light-green);
}

section.rings a {
  color: var(--light-green);
}

section.rings a:hover {
  color: var(--purple);
}

.ring {
  padding: 8px;
  width: 100%;
  text-align: center;
}

.ring ul>li {
  list-style: none;
  display: inline;
}

.ring ul>li:first-child::before {
  content: "⌁ ";
}

.ring ul>li:not(:last-child)::after {
  content: " ⁘ ";
  font-size: 80%;
}

.ring ul>li:last-child::after {
  content: " ⌁";
}

/* === FRIENDS === */

section.friends .tile:nth-child(3n-1) h3 {
  background-color: var(--light-red);
}

section.friends .tile:nth-child(3n-2) h3 {
  background-color: var(--yellow);
}

section.friends .tile:nth-child(3n) h3 {
  background-color: var(--light-green);
}

.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 8px;
}

.tile {
  flex-grow: 1;
}

.tile a:before {
  content: "⌁ ";
}

/* === BLOG === */

section.post-list .post-excerpt:nth-child(3n-1) h3 {
  background-color: none;
  color: var(--light-red);
  border-width: 0 0 2px 0;
}

section.post-list .post-excerpt:nth-child(3n-2) h3 {
  background-color: none;
  color: var(--yellow);
  border-width: 0 0 2px 0;
}

section.post-list .post-excerpt:nth-child(3n) h3 {
  background-color: none;
  color: var(--light-green);
  border-width: 0 0 2px 0;
}

.post-list>h3 {
  padding: 8px;
  color: var(--yellow);
}

.posts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 8px;
}

.post-excerpt {
  flex-grow: 1;
  border-bottom: none;
}

/* === LINKS === */

.links .post-excerpt ul {
  margin-left: 8px;
  list-style: none;
}

.links .post-excerpt ul>li {
  margin-top: 4px;
}

.links .post-excerpt ul>li:before {
  content: "⁘ ";
}

/* === PROJECTS === */

/* === PAGE === */

/* === FOOTER === */

footer {
  margin-top: auto;
  border-top: 2px solid var(--bg-highlight);
  padding: 8px;
}

footer p {
  text-align: center;
}

/* === MEDIA QUERIES === */

@media (min-width: 750px) {

  header,
  main,
  section,
  footer {
    max-width: 980px;
  }

  .blurb,
  .status,
  .tile {
    flex-basis: calc(50% - 4px);
  }

}

@media (min-width: 1040px) {
  .tile {
    flex-basis: calc(30% - 4px);
  }
}

@media (min-width: 1400px) {
  .tile {
    flex-basis: calc(24% - 4px);
  }
}
