/* Global */

@import "global.css";
@import "content.css";
@import "custom.css";

:root {
  --color-base: #464646;
  --color-secondary: #555;
  --color-border: #e1e1e1;
  --color-darkmode: #fff;
  --color-darkmode-bg: #121212;
  --color-darkmode-bg-highlight: #2a2a2a;
  --color-success: #80b912;
  --color-error: #f05230;

  --font-sans-serif: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --regular: 400;
  --semi-bold: 600;
  --bold: 700;
  --font-tiny: 1.25rem;
  --font-base: 1.8rem;
  --font-subheading: 2.5rem;
  --font-secondary-heading: 2.75rem;
  --font-main-heading: 3rem;

  --gap: 4rem;
  --radius: 1rem;
  --shadow: rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;
  --width: 720px;
}

@media (max-width: 767px) {
  :root {
    --font-tiny: 1.25rem;
    --font-base: 1.6rem;
    --font-subheading: 2rem;
    --font-secondary-heading: 2.25rem;
    --font-main-heading: 2.5rem;
  }
}

/* Layout */

.viewport {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex-grow: 1;
}

.outer {
  position: relative;
  padding: 0 max(4vmin, 20px);
}

.inner {
  margin: 0 auto;
  max-width: var(--width);
  width: 100%;
  position: relative;
}

.hidden {
  display: none;
}

.no-radius img {
  border-radius: 0 !important;
}

.site-divider {
  height: 4px;
  width: 40px;
  border: 0;
  border-top: 4px solid var(--color-border);
  opacity: 1;
  margin: var(--gap) auto 0;
}

.feed {
  margin: 8rem auto;
  max-width: var(--width);
}

/* Contrast */

  .search.has-light-text,
  .has-light-text .menu a,
  .has-light-text .brand-title {
    color: #ffffff !important;
  }

  .has-light-text .nav-dropdown a,
  .has-dark-text .nav-dropdown a {
    color: var(--color-base) !important;
  }

  .has-light-text .utils svg {
    fill: #ffffff !important;
  }

  .more-button.has-light-text {
    color: #ffffff !important;
  }

  .has-light-text .burger .bar {
    background-color: #ffffff;
  }

  .has-light-text .hero-post {
    color: #ffffff !important;
  }

  .has-light-text .default-logo {
    display: none;
  }

  .has-dark-text .light-logo {
    display: none;
  }

/* Header */

.site-header {
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--background-color);
  gap: 2rem;
}

.site-header-flex {
  display: flex;
  justify-content: space-between;
  position: relative;
  gap: var(--gap);
  margin: 0 auto;
  width: 100%;
  max-width: var(--width);
}

.brand-logo {
  max-height: 20px;
  max-width: 300px;
}

.brand-logo img {
  height: 100%;
}

.brand-title {
  font-weight: var(--bold);
  font-size: 2rem;
  white-space: nowrap;
  line-height: 1;
  font-family: var(--gh-font-heading, var(--font-sans-serif)) !important;
}

/* Header buttons */

.utils {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.utils svg {
  width: 22px !important;
  height: 22px !important;
  transition: all 0.3s;
  fill: var(--color-base) !important;
}

.account-btn {
  width: 22px;
  height: 22px;
}

.search {
  background-color: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 22px;
  height: 22px;
}

/* Navigation */

.navbar {
  margin: 0 auto;
  width: 100%;
  max-width: var(--width);
  display: flex;
  justify-content: space-between;
  position: relative;
}

.menu ul {
  display: inline-flex;
  gap: 2.5rem;
  align-items: center;
  line-height: 1;
}

.navbar li a,
.mobile-menu li a {
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.navbar li a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-color: var(--ghost-accent-color);
  transition: transform 0.3s ease;
  transform: scaleX(0);
  transform-origin: left;
  width: 100%;
}

.navbar li a:hover::after {
  transform: scaleX(1);
}

.nav {
  transition: opacity 0.3s ease-in;
  opacity: 1;
}

.more-button {
  cursor: pointer;
  background-color: transparent;
  border: none;
  color: var(--color-base);
  padding-block-start: 0;
  padding-inline-start: 0;
  padding-block-end: 0;
  padding-inline-end: 0;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  padding: 8px 0;
  z-index: 1000;
  margin-top: 1rem;
  text-align: left;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.navbar.is-dropdown-open .nav-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown li {
  list-style: none;
  padding: 8px 16px;
  white-space: nowrap;
}

.mobile-menu {
  display: none;
}

.burger {
  display: none;
}

@media (min-width: 768px) {
  .nav-hidden {
    visibility: hidden;
    opacity: 0;
  }

  .nav-current a {
    font-weight: var(--semi-bold);
    position: relative;
  }

  .nav-current a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background-color: var(--ghost-accent-color);
    transform: scaleX(1) !important;
    transform-origin: left;
    min-width: 100%;
  }
}

/* Mobile menu */

@media (max-width: 767px) {
  .navbar .menu,
  .more-button,
  .nav-dropdown {
    display: none;
  }

  .site-header {
    gap: 0;
  }

  .mobile-menu {
    display: block;
    position: fixed;
    background-color: #fff;
    top: 100px;
    right: 0;
    height: calc(100vh - 100px);
    width: 100%;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1;
    padding: var(--gap) var(--gap) 8rem;
    overflow-y: auto;
  }

  .mobile-menu.active {
    display: block;
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
  }

  .mobile-menu ul {
    flex-direction: column;
    font-size: 2rem;
    font-weight: var(--semi-bold);
    text-align: center;
  }

  .mobile-menu li {
    padding: 2rem 0;
  }

  .mobile-menu .utils {
    flex-direction: row;
  }

  .burger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
  }

  .burger .bar {
    width: 20px;
    height: 2px;
    background-color: var(--color-base);
    border-radius: 10px;
    transition: 0.3s;
  }

  .burger > :nth-child(2) {
    margin-left: 0.25rem;
  }

  .burger.active .bar:nth-child(1) {
    transform: rotate(45deg) translateY(7.1px);
  }

  .burger.active .bar:nth-child(2) {
    display: none;
  }

  .burger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-7.1px);
  }

  body.menu-active {
    overflow: hidden;
  }
}

/* Hero */

.hero-wrapper {
  background-color: var(--background-color);
  transition: background-color 0.3s ease;
}

.hero {
  max-width: var(--width);
  margin: 0 auto;
  display: flex;
  gap: var(--gap);
  padding: 8rem 0;
  min-height: 25vh;
}

.hero-top {
  flex-direction: column-reverse;
  text-align: center;
  align-items: center;
}

.hero-left {
  flex-direction: row-reverse;
}

.hero-post {
  flex: 3;
  font-weight: 400;
  font-size: var(--font-base);
}

.hero-post h1 {
  margin-bottom: 0.5rem;
}

.hero-image {
  flex: 1;
  border-radius: var(--radius);
  width: 100%;
}

.hero-image figure {
  margin: 0 auto;
}

.rounded img {
  border-radius: var(--radius);
}

.circle {
  max-width: 150px;
  max-height: 150px;
}

.circle img {
  aspect-ratio: 1/1;
  border-radius: 100%;
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 767px) {
  .hero {
    flex-direction: column-reverse;
  }
}

/* Home */

.section-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
  padding-bottom: 1rem;
}

.section-header p {
  font-size: var(--font-tiny);
  text-transform: uppercase;
  padding-top: 1.5rem;
  font-weight: var(--semi-bold);
  font-family: var(--gh-font-heading, var(--font-sans-serif)) !important;
  letter-spacing: 0.05em;
}

.section-more {
  text-decoration: none;
  position: relative;
  border-bottom: none !important;
  text-transform: uppercase;
  font-weight: var(--semi-bold);
  font-size: var(--font-tiny);
  padding-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease;
  gap: 0.25rem;
  transform: translateX(1.25rem);
  letter-spacing: 0.05em;
}

.section-more::after {
  content: "→";
  font-size: var(--font-tiny);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0);
}

.section-more:hover {
  transform: translateX(0);
}

.section-more:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* Explore - the section where tags are displayed on the homepage */

.explore {
  max-width: var(--width);
  margin: 0 auto 8rem;
}

.explore-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.explore-tag {
  text-decoration: none;
  border-radius: 5px;
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  transition: all 0.3s;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.explore-tag-image {
  flex: 1;
}

.explore-tag-image img {
  object-fit: cover;
  border-radius: 100%;
  aspect-ratio: 1/1;
}

.explore-tag-content {
  flex: 4;
}

.explore-tag h3 {
  font-size: var(--font-base);
  line-height: 1.6;
}

.explore-tag p {
  display: -webkit-box;
  overflow-y: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .explore-tag:hover {
    transition: all 0.3s;
    border-color: var(--color-secondary);
  }
}

@media (max-width: 767px) {
  .explore-list {
    grid-template-columns: 1fr;
  }
}

/* Recommendations - the section where recommendations are displayed on the homepage */

.recommendations-wrapper {
  margin: 0 auto 8rem;
  max-width: var(--width);
}

.recommendations {
  list-style: none;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 2rem;
}

.recommendation a {
  display: flex;
  gap: 2rem;
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  border-radius: 5px;
  transition: all 0.3s;
  height: 100%;
}

.recommendation-favicon {
  flex: 1;
  max-width: 60px;
  height: auto;
}

.recommendation-meta {
  flex: 4;
}

.recommendation-title {
  font-size: var(--font-base);
  line-height: 1.6;
  display: -webkit-box;
  overflow-y: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.recommendation-description {
  display: -webkit-box;
  overflow-y: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .recommendation a:hover {
    transition: all 0.3s;
    border-color: var(--color-secondary);
  }
}

@media (max-width: 767px) {
  .recommendations {
    grid-template-columns: 1fr;
  }
}

/* Post cards - used across the theme, wherever there's a feed */

.card {
  display: flex;
  gap: var(--gap);
  padding: 3rem 0;
  align-items: flex-start;
}

.card-content {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-content a {
  text-decoration: none;
  transition: all 0.3s;
}

.featured-tag {
  height: var(--font-base);
  width: var(--font-base);
}

.featured-tag svg {
  height: 100%;
  width: 100%;
  fill: var(--ghost-accent-color);
}

.featured-feed .featured-tag {
  display: none;
}

.card-title {
  font-size: var(--font-subheading);
  transition: opacity 0.3s;
  opacity: 1;
}

.card-content p {
  display: -webkit-box;
  overflow-y: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: var(--semi-bold);
  font-size: var(--font-tiny);
}

.card-tag {
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.card-date {
  color: var(--color-secondary);
}

.card-image {
  flex: 1;
  position: relative;
  transition: transform 0.3s ease;
}

.card-image img {
  aspect-ratio: 3 / 2;
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.card-image.no-access .access-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: var(--radius);
}

.no-radius .access-bg {
  border-radius: 0 !important;
}

.access-tag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.access-tag svg {
  fill: #fff;
  height: var(--font-base);
}

@media (min-width: 768px) {
  .card-tag:hover {
    transition: all 0.3s;
    border-color: var(--color-secondary);
  }

  .card-title:hover {
    opacity: 0.9;
  }

  .card:hover .card-image {
    transform: rotate(3deg);
    transition: transform 0.3s ease;
  }
}

@media (max-width: 767px) {
  .card {
    flex-direction: column-reverse;
    gap: 2rem;
    align-items: stretch;
  }
}

/* Default post  */

.post-header {
  grid-column: main-start / main-end;
  margin: 8rem 0 0;
  padding-bottom: var(--gap);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-tiny);
  font-weight: var(--semi-bold);
}

.post-tag {
  border: 1px solid var(--color-border);
  color: var(--color-base);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: var(--font-tiny);
  font-weight: var(--semi-bold);
}

.meta-content {
  display: flex;
  gap: 1rem;
}

.reading-time,
.post-date,
.author-name {
  color: var(--color-secondary);
  font-weight: var(--semi-bold);
}

.reading-time:after,
.post-date:not(:last-child)::after {
    content: '/';
    margin-left: 1rem;
    color: var(--color-secondary);
    font-weight: var(--semi-bold);
}

.author-name {
  font-weight: var(--semi-bold);
  color: var(--ghost-accent-color) !important;
}

.post-excerpt {
  color: var(--color-secondary);
  font-size: 2rem;
}

.post-image,
.post-image img {
  width: 100%;
}

.post-image img {
  border-radius: var(--radius);
}

.post-content {
  grid-column: main-start / main-end;
  margin-bottom: 8rem;
  position: relative;
}

.post-content img:hover {
  cursor: zoom-in;
}

.comments {
  margin-top: 12rem;
  grid-column: main-start / main-end;
}

/* Custom post templates */

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

.center-header .post-tag {
  margin: 0 auto;
}

.center-header .post-meta {
  justify-content: center;
}

.side-by-side .post-meta {
  justify-content: unset;
  gap: 2rem;
}

.side-by-side {
  display: flex;
  gap: var(--gap);
  margin: var(--gap) 0;
  align-items: center;
  grid-column: wide-start / wide-end;
}

.side-by-side.no-feature-image {
  grid-column: main-start / main-end;
  margin: var(--gap) 0 0;
}

.side-by-side .post-header {
  margin: 0;
  flex: 2;
}

.side-by-side h1 {
  font-size: 4rem;
}

.side-by-side .post-image {
  flex: 1;
}

.side-by-side .post-image img {
  aspect-ratio: 3/4;
  object-fit: cover;
}

.custom-wide {
  grid-column: wide-start / wide-end;
}

.custom-wide img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}

@media (min-width: 768px) {
  .post-tag:hover {
    transition: all 0.3s;
    border-color: var(--color-secondary);
  }

  .author-name:hover {
    opacity: 0.8;
    transition: all 0.3s;
  }
}

@media (max-width: 767px) {
  .post-header {
    margin-top: 4rem;
    gap: 3rem;
  }

  .side-by-side {
    flex-direction: column;
  }

  .side-by-side h1 {
    font-size: 2.5rem;
  }
}

/* Access CTA */

.gh-post-upgrade-cta-content {
  border: 1px solid var(--ghost-accent-color);
}

.gh-post-upgrade-cta-content h2,
.gh-post-upgrade-cta-content p {
  color: var(--color-base) !important;
}

.gh-post-upgrade-cta-content a {
  color: var(--ghost-accent-color) !important;
  text-decoration: none !important;
}

.gh-post-upgrade-cta-content .gh-btn {
  background-color: var(--ghost-accent-color) !important;
  color: #fff !important;
}

/* Related posts */

.related {
  max-width: var(--width);
  margin: 0 auto 8rem;
}

.related h4 {
  margin-bottom: 1rem;
}

.related hr {
  border-bottom: 1px solid var(--color-border);
}

/* Explore page */

.tags-feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem var(--gap);
  margin-top: var(--gap);
}

.index-tag h2 {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.index-tag-post {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.index-tag a {
  text-decoration: none;
}

.index-tag-post p {
  transition: all 0.3s;
}

.section-more-tags {
  text-decoration: none;
  position: relative;
  border-bottom: none !important;
  text-transform: uppercase;
  font-weight: var(--semi-bold);
  font-size: var(--font-tiny);
  padding-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease;
  gap: 0.25rem;
  letter-spacing: 0.05em;
}

.section-more-tags::after {
  content: "→";
  font-size: var(--font-tiny);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0);
}

.section-more-tags:hover {
  transform: translateX(0);
}

.section-more-tags:hover::after {
  opacity: 1;
  transform: scale(1);
}

@media (min-width: 768px) {
  .index-tag-post p:hover {
    transform: translateX(1rem);
    transition: all 0.3s;
  }
}

@media (max-width: 767px) {
  .tags-feed {
    grid-template-columns: 1fr;
  }
}

/* Tag and author templates */

.tag-meta,
.author-meta {
  margin: 3rem 0;
  display: flex;
  justify-content: space-between;
  gap: var(--gap);
}

.tag-meta-content,
.author-meta-content {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tag-image,
.author-image {
  flex: 1;
}

.tag-image img,
.author-image img {
  border-radius: var(--radius);
}

.author-meta-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author-follow {
  font-size: var(--font-tiny);
  text-transform: uppercase;
  font-weight: var(--semi-bold);
  font-family: var(--gh-font-heading, var(--font-sans-serif)) !important;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.author-links {
  display: flex;
  gap: 2rem;
  line-height: 1;
}

.author-links a {
  text-decoration: none;
  line-height: 1;
}

.author-links svg {
  height: 20px;
  width: 20px;
}

.author-location {
  display: flex;
  gap: 3px;
  align-items: center;
  border: 1px solid var(--color-border);
  font-size: var(--font-tiny);
  font-weight: var(--semi-bold);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.author-location svg {
  height: var(--font-tiny);
  width: var(--font-tiny);
  fill: var(--color-base);
}

@media (max-width: 768px) {
  .tag-meta,
  .author-meta {
    flex-direction: column-reverse;
  }

  .author-image img {
    max-width: 150px;
  }
}

@media (min-width: 768px) {
  .author-links a:hover {
    opacity: 0.8;
    transition: all 0.3s;
  }
}

/* Footer */

.footer-wrapper {
  height: 25vh;
}

.site-footer {
  display: flex;
  gap: var(--gap);
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: var(--width);
  margin: 0 auto;
}

.footer-meta,
.footer-item {
  font-size: var(--font-tiny);
}

.footer-item:hover {
  color: var(--ghost-accent-color);
  transition: all 0.3s;
}

.footer-meta a {
  color: var(--ghost-accent-color);
  transition: all 0.3s;
}

.footer-social-links {
  display: flex;
  gap: 2rem;
}

.footer-social-links .social-icon svg {
  fill: var(--color-base);
  width: 20px;
  height: 20px;
}

.footer-item::after {
  content: " · ";
}

.footer-item:last-child::after {
  content: "";
}

@media (min-width: 768px) {
  .footer-meta a:hover,
  .social-icon svg:hover {
    opacity: 0.8;
    transition: all 0.3s;
  }
}

@media (max-width: 767px) {
  .site-footer {
    flex-direction: column-reverse;
    justify-content: space-around;
  }

  .footer-meta {
    text-align: center;
  }
}

/* Form */

.form-wrapper {
  background-color: #efefef;
}

.form-inner {
  max-width: var(--width);
  padding: 8rem 0;
  margin: 0 auto;
}

.form-inner h2 {
  margin-bottom: 1rem;
}

.site-form {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  width: 75%;
  position: relative;
}

.site-form input {
  border: 1px solid var(--ghost-accent-color);
  border-radius: 5px;
  padding: 1rem;
  width: 100%;
}

.site-form input:focus {
  box-shadow: 0 0 0 5px #3341551f,0 0 0 1px #3341551a;
  transition: all 0.3s;
  outline: none;
}

.site-form button {
  border: 1px solid var(--ghost-accent-color);
  background-color: var(--ghost-accent-color);
  color: white;
  border-radius: 5px;
  padding: 1rem 2.5rem;
  font-weight: var(--semi-bold);
  cursor: pointer;
  width: 150px;
  transition: all 0.3s;
}

.site-form button svg {
  fill: #fff;
  height: 20px;
  width: 20px;
}

.form-spinner svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.form-success,
.form-spinner,
.form-error,
.loading .form-subscribe,
.loading .form-success,
.loading .form-error,
.success .form-subscribe,
.success .form-spinner,
.success .form-error,
.error .form-subscribe {
  display: none;
}

.error-message,
.success-message {
  position: absolute;
  bottom: -35px;
  display: none;
}

.success .success-message,
.error .error-message {
  display: block;
}

.success .form-success,
.loading .form-spinner,
.error .form-error {
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-message {
  color: var(--color-error);
}

.success-message {
  color: var(--color-success);
}

@media (min-width: 768px) {
  .site-form button:hover {
    opacity: 0.8;
    transition: all 0.3s;
  }
}

@media (max-width: 767px) {
  .site-form {
    flex-direction: column;
    width: 100%;
  }

  .site-form input,
  .site-form button {
    width: 100%;
    height: 48px;
  }

  .error-message,
  .success-message {
    position: absolute;
    bottom: -60px;
    display: none;
  }
}

/* Table of contents */

.toc {
  overflow-y: auto;
}

.toc > .toc-list {
  overflow: hidden;
  position: relative;
}

.toc > .toc-list li {
  list-style: none;
}

.toc-list {
  margin: 0;
  padding-left: 0 !important;
}

a.toc-link {
  color: currentColor;
  height: 100%;
}

.is-collapsible {
  max-height: 1000px;
  overflow: hidden;
  transition: all 300ms ease-in-out;
}

.is-collapsed {
  max-height: 0;
}

.is-position-fixed {
  position: fixed !important;
  top: 0;
}

.is-active-link {
  color: var(--ghost-accent-color) !important;
  font-weight: var(--semi-bold);
}

.post-sidebar {
  margin-top: 3rem;
  margin-bottom: 2rem;
  z-index: -1;
}

.post-sidebar p {
  font-weight: var(--semi-bold);
  color: var(--color-secondary);
  line-height: 1.6;
}

.post-sidebar hr {
  height: 4px;
  width: 40px;
  border: 0;
  border-top: 4px solid var(--color-border);
  margin: 3rem 0 -3rem !important;
  opacity: 1;
}

.post-toc {
  padding-right: 1.5rem;
}

.post-toc > .toc-list {
  position: relative;
}

.post-toc .is-active-link::before {
  background-color: transparent;
}

.toc-list {
  overflow: hidden;
  list-style: none;
  margin-top: 0 !important;
  padding-top: 2rem !important;
}

ol.is-collapsible.is-collapsed {
  padding-top: 0 !important;
}

.toc-list:not(:first-child) {
  padding-left: 1rem !important;
}

.toc-list-item {
  margin-top: 0 !important;
  font-size: 1.5rem;
  color: var(--color-secondary);
}

.toc-list-item:not(:last-child) {
  padding-bottom: 2rem !important;
}

.post-toc-wrapper p {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

.post-toc-wrapper p svg {
  fill: var(--color-secondary);
  height: 20px;
  width: 20px;
}

@media (max-width: 1150px) {
  .post-sidebar {
    display: none;
  }

  .post-toc-wrapper {
    border: 1px solid var(--color-border);
    padding: 2rem;
    border-radius: 5px;
    position: relative;
  }

  .chevron {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .post-toc-wrapper hr,
  .post-toc {
    display: none;
  }

  .display-toc {
    display: block;
  }
}

@media (min-width: 1150px) {
  .post-sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    margin-right: 2rem;
    grid-column: wide-start / main-start;
  }

  .post-toc-wrapper {
    position: sticky;
    top: 4vmin;
  }

  .chevron {
    display: none;
  }
}

.post-toc .is-active-link::before {
  background-color: var(--ghost-accent-color);
}

/* Error */

.error-wrapper {
  max-width: var(--width);
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.error-content {
  text-align: center;
  margin: 0 auto;
}

.error-code {
  font-size: 10rem;
  line-height: 1;
}

.error-description {
  font-size: 3rem;
  line-height: 1;
}

.error-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.error-buttons p {
  margin: 2rem 0 0;
}

.error-buttons a {
  font-weight: var(--semi-bold);
  text-decoration: none;
  padding: 1rem 2rem;
  background-color: #fff;
  border-radius: 5px;
  color: var(--color-base);
  transition: all 0.3s;
  border: 2px solid var(--color-base);
}

.error-buttons a:hover {
  opacity: 0.7;
  transition: all 0.3s;
}

.error-wrapper .footer-meta {
  text-align: center;
  justify-self: flex-end;
}

@media (max-width: 767px) {
  .error-code {
    font-size: 6rem;
  }

  .error-description {
    font-size: 2rem;
  }
}
