/* general */

html {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;

  border: 0.25em solid;
}

.main-header,
main,
.main-footer {
  border: 3px double;
  background-color: hsla(0, 0%, 0%, 0.875);
}

.main-content,
.main-aside {
  border: 1px solid;
}

.main-header,
.main-footer {
  text-align: center;

  a:hover {
    text-shadow: none;
  }
}

.main-header-title {
  font-family: 'Tourney', sans-serif;
  font-weight: 100;
  font-size: clamp(3rem, 7vw, 5rem);

  padding: 0 MIN(5rem, 3vw);
  box-sizing: border-box;
  text-shadow: 0 0 0.125em;
  user-select: none;
}

.main-footer {
  padding: 1.5em;
  line-height: 1.25;
  user-select: none;
}

a#heart,
a#heart:hover,
a#heart:active {
  text-shadow: 0 0 0.125em;
  cursor: default;
  opacity: 100%;
  text-decoration: none;
  font-family: system-ui;
}

/* content */

.section-heading {
  color: var(--light-fg-color);
  font-family: var(--heading), var(--sans);
  font-size: 2.125em;
  font-weight: 600;
}

.section-heading-2 {
  color: var(--light-fg-color);
  font-family: var(--heading), var(--sans);
  font-size: 1.875em;
  font-weight: 600;
}

.section-subtitle {
  color: var(--light-fg-color);
  font-size: 1em;
  font-weight: 300;
  text-wrap: balance;
}

.post-link {
  font-family: var(--heading), var(--sans);
  font-size: 1.75em;
  font-weight: 600;

  text-decoration: solid underline 1px;
  text-decoration-skip-ink: all;
  text-underline-offset: 0.1em;
}

.post-preview,
.post-content {
  border-top: 1px solid;
}

.compact-post-preview {
  border-top: 1px solid;
  font-size: 87.5%;
}

/* general layout */

body {
  box-sizing: border-box;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.5;
}

.main-header,
main,
.main-footer {
  width: clamp(80%, calc(80% + 2rem), 90%);
  margin: auto;
  box-sizing: border-box;
}

.main-header {
  margin-top: clamp(2rem, 4%, 4rem);
}

.main-header-nav {
  margin-bottom:  1.5rem;
}

.main-header-nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0.5em;
}

.main-header-nav li {
  display: inline-block;
}

.main-header-nav li:not(:last-child)::after {
  content: " | ";
}

.selected-nav-link {
  font-weight: 500;
  color: var(--lightest-fg-color);
}

.main-header-title {
  display: block;
  margin-top: 1rem;

  a {
    user-select: none;
  }

  a:hover {
    text-shadow: inherit;
  }

  a:active {
    opacity: 1.0;
  }
}

main {
  display: flex;
  margin-top: 1rem;
  padding: 1rem;
}

.main-content {
  flex: 1 0 0;
  min-width: 0;
  width: calc(100% - 20rem - 0.5em);
  padding: 1rem 0 3rem 0;
}

.main-aside {
  margin-top: 0;
  margin-left: 0.5em;
  flex: 0 0 clamp(20rem, 25vw, 25rem);
  padding: 1rem 4rem 3rem 3rem;
  box-sizing: border-box;
}

.main-footer {
  margin-top: 1rem;
  margin-bottom: clamp(2.5rem, 5%, 5rem);
}

/* content layout */

.section-heading {
  text-align: center;
  margin-bottom: 0.5em;
}

.section-heading-2 {
  text-align: center;
  margin-bottom: 1em;
}

.section-subtitle {
  text-align: center;
  margin: auto 2rem 2rem;
}

.main-content-wrapper {
  width: clamp(75%, calc(70% + 1rem), 85%);
  margin: auto;
}

.main-content-wrapper-wide {
  width: 85%;
  margin: auto;
}

.indent {
  margin-left: 1rem;
}

article,
.post-preview {
  width: 90%;
  margin: auto;
  padding: 1.5rem min(3rem, 1.5vw) 2rem;
  box-sizing: border-box;

  p,
  ul,
  ol {
    margin-left: 1rem;
  }
}

.compact-post-preview {
  width: 90%;
  margin: auto;
  padding: 0.75rem min(4rem, 2vw) 1.25rem;
  box-sizing: border-box;

  p,
  ul,
  ol {
    margin-left: 1rem;
  }
}

.post-link,
.post-title {
  display: block;
  margin: 1rem 0 1rem 0;
}

p.post-data {
  margin: -0.5rem 0 1.5rem 0;
}

p.post-preview-data {
  margin: 0rem 0 1rem 0;
}

.compact-post-preview .post-link {
  margin: 1rem 0 0.5rem 0;
}

.compact-post-preview p.post-preview-data {
  margin: 0 0 0.5rem 0;
}

.post-header {
  text-align: center;
}

.post-content {
  padding: min(1rem, 1vw);
  box-sizing: border-box;
  overflow-x: hidden;
}