@font-face {
  font-family: InterMain;
  src: url(../fonts/Inter/Inter-Thin.ttf) format('truetype');
}

@font-face {
  font-family: InterSecond;
  src: url(../fonts/Inter/Inter-ExtraLight.ttf) format('truetype');
}

@font-face {
  font-family: FiraCode;
  src: url(../fonts/FiraCode/FiraCode-Light.ttf) format('truetype');
}

:root {
  --primary-color: rgba(255, 255, 125, 1);
  --secondary-color: var(--primary-color);
  --thirdary-color: rgb(255, 255, 240);
  /* Page Background */
  --page-background-color: rgb(0, 0, 0);
  --page-background-image: url("../backgrounds/bg.jpg");
  /* Container Background */
  --container-background-color: rgba(0, 0, 0, 0.3);
  --text-color: #ffffff;
  --link-color: var(--primary-color);
  --link-hover-color: rgba(255, 255, 200, 1);
  --link-visited-color: rgb(185, 185, 100);
  --border-color: #333;
  --border-hover-color: #555;
  --border-thicc: 1px;
}

* {
  box-sizing: border-box;
}

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

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Thanks V3SS33L: https://v3ss33l.crd.co */
  background-color: var(--page-background-color);
  background-image: var(--page-background-image);
  color: var(--text-color);
  /* OLD: font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
}

.main {
  border: var(--border-thicc) solid var(--border-color);
  min-width: 600px;
  max-width: 900px;
  background: var(--container-background-color);
  backdrop-filter: blur(5px);
  transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
  z-index: 0;
  display: flex;
  justify-content: space-around;
  margin-block: 5%;
  overflow: hidden;
}


.wrapper {
  flex-grow: 1;
  padding-block: 1rem;
  padding-inline: 2rem;
  overflow-y: auto;
}

.wrapper::-webkit-scrollbar {
  width: 5px;
}

.wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.wrapper::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover-color);
}

.wrapper-home {
  flex-grow: 1;
  padding: 2rem;
}

.article-grid {
  display: grid;
  grid-template-columns: auto auto;
  gap: 10px;
}

.article-item-1 {
  background-color: var(--thirdary-color);
  margin: 0;
  padding: 0;
  width: fit-content;
  height: fit-content;
}

.aboutInfo {
  padding-left: 2rem;
  margin: 0 auto;
  flex-wrap: nowrap;
}

.indent {
  text-indent: 2rem;
}

.read-more-button-div,
.read-more-button-text {
  padding-left: 0rem;
}

.more_margin {
  margin-left: 1rem;
}

.inset {
  padding-left: 1rem;
  margin-bottom: 0;
}

.largeinset {
  padding-left: 1rem;
  margin-bottom: 0;
}

.inset-extra {
  padding-left: 32px;
}

.header-title {
  padding-inline: 10px;
  letter-spacing: 1.5px;
}

h1,
h2 {
  color: var(--primary-color);
  font-family: 'InterMain', sans-serif;
  margin: 0;
  letter-spacing: -1px;
  position: relative;
  left: -3px;
  padding-block: 5px;
}

.no_padding {
  padding-block: 0;

}

h1 {
  font-size: 29pt;
}

h2 {
  font-size: 20pt;
  font-family: 'InterSecond', sans-serif;
}

h3 {
  font-family: 'InterMain', sans-serif;
  color: var(--secondary-color);
  margin-bottom: 0;
  position: relative;
  font-size: 18px;
}

/* Fix weird spacing added on emojis */
.emojispace {
  left: -0.5rem;
}

p,
li {
  font-family: 'InterSecond', sans-serif;
  line-height: 1.6;
  letter-spacing: 0.4px;
  margin-block-start: 0.5em;
  font-size: 18px;
  margin: 0.5rem auto;
}

p {
  margin: 1rem auto;
}

.animated-article {
  border: 2px solid transparent;
  transition: box-shadow 0.2s ease-out, transform 0.3s ease-in-out;
  box-shadow: 0 0 0px 0px transparent;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 40px;
  transform: scale(1);
}

.animated-article:hover {
  transform: scale(1.005);
  box-shadow: 0 0 0px 5px rgba(255, 255, 255, 0.2);
}

.feature {
  position: relative;
  left: 4px;
}

.footer {
  flex-shrink: 0;
  padding-block: 10px;
  display: flex;
  border-top: 1px solid var(--border-color);
  justify-content: space-around;
}

.link {
  color: var(--link-color);
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease;
  cursor: pointer;
  font-family: 'InterSecond', sans-serif;
  letter-spacing: 0.5px;
}

.title-link {
  color: var(--link-color);
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease;
  cursor: pointer;
  font-family: 'InterSecond', sans-serif;
}

.barren-link {
  color: var(--link-color);
  transition: color 0.3s ease;
  cursor: pointer;
  font-family: 'InterSecond', sans-serif;
}

.barren-link:visited {
  color: var(--link-visited-color);
}

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

.link::after,
.title-link::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  transition: width 0.3s;
}

.link::after {
  color: var(--link-hover-color);
  background: var(--link-hover-color);
}

.title-link::after {
  color: var(--primary-color);
  background: var(--primary-color);
}

.link:hover::after,
.title-link:hover::after {
  width: 100%;
}

.link:active {
  transform: scale(1.1);
}

.title-link:active {
  transform: scale(1.01);
}

.footer-link-padding {
  padding-inline: 10px;
}

.portraitFrame {
  width: 200px;
  height: 250px;
  overflow: hidden;
  border-radius: 10%;
}

.portraitFrame img {
  width: 100%;
  transform: scale(2.5) translateY(25%) translateX(15%);
}

.content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
}

.header {
  border-bottom: 1px solid var(--border-color);
  padding-block: 10px;
  padding-inline: 10px;
  width: 100%;
}

.inner-grid {
  display: flex;
  justify-content: space-between;
}

.inner-grid-left {
  display: flex;
  justify-content: left;
}

.grid-item {
  display: flex;
  box-sizing: border-box;
}

.grid-item-center {
  display: grid;
  justify-content: center;
  align-items: center;
}

.grid-item-top {
  display: grid;
  justify-content: center;
  margin-top: 1.5rem;
}

.grid-item-mobile {
  display: flex;
  justify-content: center;
  align-items: center;
}

.social-links {
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  overflow: hidden;
  transition: transform 300ms ease-in-out, 100ms border ease-in-out;
  background-color: rgb(0, 0, 0);
  border: 2px solid rgba(255, 255, 255, 0.4);
  margin-inline: 10px;
}

/* Animation */
.social-link:hover {
  transform: scale(1.1);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.social-background {
  position: absolute;
  z-index: 5;
  background-color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

.social-link .social-image {
  z-index: 10;
  width: 30px;
  height: 30px;
}

@media (max-width: 768px) {
  .main {
    min-width: 0px;
  }

  .large-grid {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .aboutInfo {
    padding-left: 0rem;
    margin: 0 auto;
    flex-wrap: nowrap;
    padding-top: 2rem;
  }
}

@media (max-width: 500px) {
  .desktop-menu {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  body {
    display: block;
  }

  .inset-extra {
    padding-left: 0px;
  }

  .article-grid {
    display: grid;
    justify-content: center;
    align-items: center;
    grid-template-columns: auto;
    gap: 10px;
  }
}

@media (min-width: 501px) {
  .mobile-menu {
    display: none;
  }
}

@media (min-height: 900px) {
  body {
    justify-content: center;
  }
}

.FadeInElement {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.visible {
  opacity: 1;
}

.post-date {
  opacity: 0.5;
  margin: 0;
  padding-block: 5px;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.post-header {
  display: grid;
  justify-content: left;
  align-items: left;
  padding-left: 1rem;
}

ul {
  list-style-type: disc;
}

ul li {
  list-style-type: none;
  text-indent: -10px;
}

ul li::before {
  content: "-";
  display: inline-block;
  width: 10px;
}

code {
  font-family: 'FiraCode', monospace;
  font-size: 14px;
  color: dcdcdc;
  background-color: #303030;
  white-space: pre;
  border-radius: 2px;
  padding-inline: 4px;
  padding-block: 2px;
  cursor: pointer;
}

.cs-parent {
  position: relative;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  margin: 0 auto;
}

.expandhover:hover {
  padding-inline: 10px;
}

.copyselector {
  font-family: 'FiraCode', monospace;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.gallery {
  padding-top: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  grid-auto-flow: dense;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tall-img {
  grid-row: span 2;
}

.wide-img {
  grid-column: span 2;
  max-height: 75%;
}


/* Why css+js need to be pain? */
img.expanded {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
  z-index: 999;
  object-fit: contain;
  background-color: black;
  opacity: 1;
}


img.hideimage {
  display: none;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
}



/* useless, but it stays!
.backgroundHide {
  position: fixed;
  display: block;
  width: 100%;
  height: 100%;
  background-color: transparent;
  opacity: 0;
  z-index: -999;
}

.backgroundHide.active {
  animation: showhideimagebackdrop 0.5s ease-in-out 1;
  animation-fill-mode: forwards;
}

@keyframes showhideimagebackdrop {
  0% {
    z-index: -999;
  }

  1% {
    z-index: 800;
  }

  100% {
    z-index: 800;
    opacity: 1;
  }
}
*/

#image-container {
  position: fixed;
  display: block;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 999;
  /* Ensure overlay visibility */
}

#image-container.active {
  animation: showhideimagebackdrop 0.5s ease-in-out forwards;
  animation-fill-mode: forwards;
}

@keyframes showhideimagebackdrop {
  0% {
    z-index: -999;
  }

  1% {
    z-index: 800;
  }

  100% {
    z-index: 800;
    opacity: 1;
  }
}
