:root {
  --accent-color: #dc0c0c;
  --lightestGrey: rgba(0, 0, 0, 0.05);
  --mediumGrey: rgb(200, 200, 200);
}

/* Font Faces */
@font-face {
  font-family: 'Custom';
  src: url('../fonts/PPAir-Medium.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Custom';
  src: url('../fonts/PPAir-SemiBold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
  margin: 0;
  padding: 0;
}

body {
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: black;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Custom', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1 {
  font-size: 3.4rem;
}

/* Link Styles */
a {
  color: var(--accent-color);
  transition: color 0.15s ease-in;
}

a:hover {
  color: black;
}

/* Main Content Styles */
main {
  margin-bottom: 6rem;
}

h2 {
  color: var(--mediumGrey);
  text-transform: uppercase;
  font-size: 1rem;
}

/* Project Styles */
#projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project {
  font-size: 1rem;
  padding: 1em;
  background: var(--lightestGrey);
}

.project h3 {
  line-height: 0.9;
}

.project .title-area span {
  font-size: 0.75rem;
}

.project-image {
  max-width: 7rem;
  width: auto;
  border-radius: calc(7rem * 0.13);
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
}

/* Blog Styles */
#blog {
  position: relative;
}

#blog .post {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  word-break: break-all;
}

#blog .post h3 {
  font-size: 2rem;
  line-height: 0.95;
}

#blog .post a {
  text-decoration: none;
}

.featured-image {
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  max-width: 12rem;
  padding: 0.25rem;
  background: var(--lightestGrey);
  border: 1px solid var(--mediumGrey);
}

/* Utility Classes */
.display-font {
  font-family: 'Custom', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.logo {
  height: 3rem;
  width: auto;
}

.headline {
  line-height: 0.95;
  letter-spacing: -0.04rem !important;
}

.temp {
  text-decoration: none;
  color: unset;
}

.temp-text {
  font-size: 0.9rem;
}

.unstyled-link,
.unstyled-link * {
  color: inherit;
  text-decoration: none;
}

.more {
  display: inline-block;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 900;
  padding-block: 0.35rem;
  padding-inline: 0.55rem;
  background: var(--accent-color);
  color: white;
}

/* Footer Styles */
footer {
  background: black;
  color: white;
  width: 100%;
  position: fixed;
  bottom: 0;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: white;
}

.block-links a {
  text-decoration: none;
  color: white;
  background: var(--accent-color);
  border: 1px solid white;
  transition: background 0.15s ease-in;
}

.block-links a:hover {
  background: black;
}

/* Mastodon Styles */
.masto-profile-preview {
  color: white;
  position: relative;
}

.masto-profile-preview::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(to bottom right, var(--accent-color), color-mix(in srgb, var(--accent-color), black 10%));
  z-index: -2;
}

.masto-profile-preview .profile-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
  filter: brightness(0.5);
}

.masto-profile-preview h3, .masto-profile-preview p {
  font-weight: 200;
  font-size: 1rem;
}

.masto-profile-preview a:hover {
  color: white;
}

.masto-profile-preview .avatar {
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  max-width: 5rem;
  border-radius: 50%;
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.2);
}

.masto-post {
  background: var(--lightestGrey);
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15);
}

.masto-post time, .time-since {
  font-size: 0.75rem;
}

.masto-post .the-time-zone {
  background-color: var(--mediumGrey);
  border-top: 1px solid white;
}

.masto-post .post-image {
  min-width: 5rem;
  max-height: 5rem;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: var(--mediumGrey);
}

.masto-post .post-body {
  word-break: break-word;
}

.masto-post .post-body .invisible {
  display: none;
}

.masto-post .post-body p:not(:last-of-type) {
  margin-bottom: 1rem;
}

#top, #bottom, footer, header {
  opacity: 0;
}

#top.visible, #bottom.visible, footer.visible, header.visible {
  opacity: 1;
}

.project h3, #bottom h2 {
  font-weight: bold;
}

@media only screen and (max-width: 768px) {
  #blog {
    max-width: 100%;
  }

  .featured-image {
    max-width: 100%;
    object-fit: contain;
    aspect-ratio: unset;
  }

  footer {
    font-size: 1.5rem;
  }
}