body {
  font-family:
    Helvetica Neue,
    Helvetica,
    Arial,
    sans-serif;
  margin: 0;
  padding: 0;
  padding-bottom: 2em;
  background-color: var(--bg-color);
  color: var(--main-text-color);
}

a {
  color: var(--link-text-color);
}

a:hover {
  color: var(--link-hover-color);
}

a:visited {
  color: var(--link-visited-color);
}

nav {
  box-shadow: var(--outline-shadow);
  margin-bottom: 2em;
  max-height: 3em;
  background-color: var(--nav-bg-color);
  backdrop-filter: blur(4px);
}

.sticky {
    position: sticky;
    z-index: 1000;
    top: 0;
}
nav img {
  max-height: 3em;
}

.right-navbar-items {
  float: right;
  list-style-type: none;
  display: inline-block;
  margin-top: 0;
  padding-top: 0.2em;
  margin-right: 0.5em;
}

.right-navbar-items li {
  display: inline;
}

.right-navbar-items li img {
  max-height: 2.5em;
  border-radius: 0.3em;
  padding: 0.1em;
}

.right-navbar-items li img:hover {
  background-color: var(--nav-icon-hover-color);
  box-shadow: var(--main-shadow);
}

.item-card {
  box-shadow: var(--main-shadow);
  border: var(--card-border);
  border-radius: 15px;
  background-color: var(--card-color);
  margin: 0 auto;
  width: 90%;
  max-width: 50rem;
  padding: 15px;
  overflow: hidden;
  margin-bottom: 1em;
  object-fit: contain;
}

.item-heading {
  text-align: center;
}

.user-info img {
  max-height: 2.5em;
  border-radius: 0.2em;
  box-shadow: var(--outline-shadow);
}

.username {
  text-align: center;
  position: relative;
  bottom: 1em;
  color: var(--main-text-color);
  text-decoration: none;
}

.user-info .username {
  padding-bottom: 0.1em;
}

.username:hover {
  text-decoration: underline;
  color: var(--alt-text-color);
}

.post-image img,
.post-image video,
.post-image .carousel img {
  max-height: 30em;
  max-width: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.comments img {
  max-width: 100%;
  height: auto;
}
.post-image {
  margin-right: 2rem;
  float: left;
  white-space: nowrap;
  max-width: 50%;
  max-height: 35em;
}

.post-body {
  margin-left: 2rem;
  display: inline;
  width: 30%;
}

.comment-text,
.post-caption-text,
.user-bio-text {
  white-space: pre-line;
}
.post-info {
  max-height: 35em;
  min-width: 40%;
  overflow-y: auto;
}

.carousel {
  overflow: auto;
  max-width: 25em;
}

.comments {
  padding: 4%;
  box-shadow: var(--outline-shadow);
}

.post-time {
  color: var(--alt-text-color);
  size: 0.5em;
}

.post-likes {
  color: var(--alt-text-color);
  size: 0.5em;
}
.user-info {
  display: block;
  margin-bottom: 0.5em;
}

button,
.next-button {
  border-radius: var(--button-border-radius);
  padding: 0.5em;
  margin: 0 auto;
  background-color: var(--button-bg-color);
  border: var(--button-border);
  color: var(--button-text-color);
}

button:hover,
.next-button:hover {
  background-color: var(--button-bg-color-on-hover);
  color: var(--button-text-color-on-hover);
}

input[type="text"] {
  border: var(--searchbar-border);
  padding: 0.5em;
  border-radius: 15px;
}

.next-button {
  width: 5em;
  text-decoration: none;
  display: block;
  text-align: center;
}

.search-form {
  width: 20em;
}

.search-form form {
  width: fit-content;
  margin: 0 auto;
}
.settings-form, .reset-form  {
  display: inline;
}

.settings-form span {
  display: block;
  margin-bottom: 10px;
}

.settings-form span input, .settings-form span select {
  float: right;
}
pre {
  white-space: pre-line;
  background-color: #c9c9c9;
  border-radius: 10px;
  padding: 0.5em;
  overflow-x: scroll;
}

.grid {
  columns: 220px;
  column-gap: 1rem;
  margin: 0 auto;
  width: 70em;
  max-width: 90%;
}

.grid-item {
  background-color: var(--card-color);
  break-inside: avoid;
  margin-bottom: 1rem;
}

.grid-item .user-info {
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.grid-item .username {
  position: static;
}
.grid-item-media video {
  width: 100%;
  height: auto;
  display: block;
}

@media only screen and (max-width: 850px) {
  .post-image {
    float: none;
    margin-bottom: 2em;
  }

  .post-image img,
  .post-image video {
    max-height: 30em;
  }
  .post-image {
    max-width: 100%;
  }
}

@media only screen and (max-width: 450px) {
  .right-navbar-items {
    padding-left: 0;
  }
}
