:root {
  --fg: #282828;
  --bg: #fbf1c7;
  --gray-low: #d5c4a1;
  --gray-high: #504945;
  --blue: #076678;
  --blue-low: #83a598;
  --purple: #8f3f71;
  --purple-low: #d3869b;
  --orange: #af3a03;
  --orange-low: #fe8019;
}

@media (prefers-color-scheme: light) {
  #schemePrefToggleButton:before {
    content: "🌃";
  }
}

@media (prefers-color-scheme: dark) or (prefers-color-scheme: no-preference) {
  :root {
    --fg: #fbf1c7;
    --bg: #282828;
    --gray-low: #3c3836;
    --gray-high: #ebdbb2;
    --blue: #83a598;
    --blue-low: #076678;
    --purple: #d3869b;
    --purple-low: #8f3f71;
    --orange: #fe8019;
    --orange-low: #af3a03;
  }
  #schemePrefToggleButton:before {
    content: "🌇";
  }
}

:root[data-scheme-pref="dark"] {
  --fg: #fbf1c7;
  --bg: #282828;
  --gray-low: #3c3836;
  --gray-high: #ebdbb2;
  --blue: #83a598;
  --blue-low: #076678;
  --purple: #d3869b;
  --purple-low: #8f3f71;
  --orange: #fe8019;
  --orange-low: #af3a03;
}

:root[data-scheme-pref="light"] {
  --fg: #282828;
  --bg: #fbf1c7;
  --gray-low: #d5c4a1;
  --gray-high: #504945;
  --blue: #076678;
  --blue-low: #83a598;
  --purple: #8f3f71;
  --purple-low: #d3869b;
  --orange: #af3a03;
  --orange-low: #fe8019;
}

.sr-only {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

body {
  font-family: "Open Sans", "sans-serif", "Helvetica", "Arial";
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  background-color: var(--bg);
  color: var(--fg);
}

a {
  color: var(--blue);
}
a:hover {
  color: var(--purple);
  text-decoration: none;
}
a:focus {
  color: var(--blue);
}

.h-card {
  display: flex;
  border: 1px solid var(--gray-high);
  border-radius: 4px;
  padding: 10px;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
  align-items: center;
  margin-bottom: 32px;
}

.imgContainer {
  min-width: 120px;
  flex-basis: 120px;
  display: flex;
  align-content: center;
}
.imgContainer .u-logo {
  align-self: center;
  border-radius: 50%;
}

.txtContainer {
  padding-left: 10px;
}
.txtContainer p {
  margin-top: 0;
}

@media screen and (max-width: 340px) {
  .h-card {
    flex-direction: column;
  }
  .imgContainer {
    width: 90px;
    flex-basis: 90px;
    margin-bottom: 10px;
  }
}

/* NAVIGATION */

#topNav {
  padding-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--fg);
}
#topNav ul {
  padding: 0;
  list-style: none;
  display: flex;
  width: 100%;
  margin: 0;
}
#topNav li {
  flex-grow: 1;
  flex-shrink: 1;
}
#topNav li a {
  display: flex;
  justify-content: center;
  align-content: center;
  padding: 10px;
  border-radius: 4px;
  color: var(--blue);
  border: 2px solid var(--bg);
}
#topNav li a:hover,
#topNav li.active a {
  text-decoration: none;
}
#topNav li.active a,
#topNav li.active a:hover,
#topNav li.active a:focus,
#topNav li.active a:active {
  background-color: var(--blue);
  border: 2px solid var(--blue);
  color: var(--bg);
  cursor: default;
}
#topNav li a:hover {
  border: 2px solid var(--purple);
  color: var(--purple);
}

.h-entry {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-low);
  margin-bottom: 24px;
}
.h-entry header {
  padding: 20px 0;
  width: 100%;
  display: flex;
  align-items: top;
}
.h-entry header div:first-child {
  flex-basis: 50%;
  justify-self: flex-start;
}
.h-entry header div:last-child {
  text-align: right;
  flex-basis: 50%;
}
.h-entry header h2 {
  margin: 0;
}
.h-entry header time {
  display: block;
}

/* SOCIALS */
.socials {
  margin: 0;
  margin-top: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 12px;
  list-style: none;
}
.socials li {
  width: 50%;
}
@media screen and (min-width: 540px) {
  .socials li {
    width: 25%;
  }
}
.socials a.revealButton {
  text-decoration: none;
  display: block;
  width: 100%;
  padding: 16px 0;
  text-align: center;
  border: 2px solid var(--fg);
  border-radius: 8px;
}
.socials a.revealButton:hover {
  background-color: var(--fg);
  color: var(--purple-low);
}
html {
  height: 100%;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 10px 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.container > *:not(footer) {
  flex-grow: 0;
}

footer {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: flex-end;
}

img,
video {
  width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.logo {
  padding-top: 10px;
  max-width: 300px;
}

.logo svg {
  width: 100%;
  fill: var(--fg);
}

.logo:hover svg {
  fill: var(--purple);
}

#logoAndControls {
  display: grid;
  grid-template-columns: 1fr min-content;
  align-items: middle;
}

#controls {
  display: grid;
  align-content: center;
}

#schemePrefToggleButton {
  text-decoration: none;
  font-size: 28px;
  line-height: 1;
  position: relative;
  height: 28px;
  width: 28px;
}

#schemePrefToggleButton:before {
  position: absolute;
  bottom: 0;
  right: 0;
}

:root[data-scheme-pref="dark"] #schemePrefToggleButton:before {
  content: "🌇";
}

:root[data-scheme-pref="light"] #schemePrefToggleButton:before {
  content: "🌃";
}

.tags {
  font-size: 24px;
}
