@font-face {
  font-family: "Libre Baskerville";
  src: url("./font/LibreBaskerville.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Fira Code";
  src: url("./font/FiraCode.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./font/Inter.woff2") format("woff2");
  font-display: swap;
}

body,
html {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  --dark-background: #13141D;
  --background: #161826;
  --container-width: 1350px;
  --container-padding: 120px;
  --color-default: #afc1de;
  --color-accent: #c0d8f9;
  background-color: var(--background);
  color: var(--color-default);
}

header {
  width: 100%;
  font-size: 24px;
  background-color: var(--dark-background);
}

#table-of-contents {
  padding: 32px;
  background-color: var(--dark-background);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;

  & div {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  & div div {
    display: inline-block;
  }

  & .h3 {
    margin-left: 32px;
    font-size: 16px;
  }
}

.blog>div {
  display: flex;
  flex-direction: column;
}

.blog>div>h1 {
  order: -1;
}

.blog>div {
  position: relative;
}

body .blog .toc-title {
  font-size: 28px;
  margin-top: 0;
  font-weight: bold;
}

.inner-header-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 32px var(--container-padding);
}

.right-side {
  display: flex;
  gap: 36px;
}

.blog pre,
.blog code {
  font-family: "Fira Code", 'Courier New', Courier, monospace;
}

.blog h1 {
  font-size: 46px;
  text-align: center;
  margin-bottom: 56px;
  margin-top: 0;
}

.blog h2 {
  font-size: 32px;
}

.blog h3 {
  font-size: 24px;
}

h1,
h2,
h3 {
  color: var(--color-accent);
  display: block;
  margin-top: 32px;
}

ul {
  padding-left: 16px;
  margin-top: 16px;
}

ul li:not(:last-child) {
  margin-bottom: 8px;
}

.blog br {
  display: none;
}

.blog pre:has(code) {
  display: block;
  padding: 8px;
  background-color: var(--dark-background);
  margin: 16px 0;

  & code {
    font-size: 16px;
  }
}

.blog blockquote {
  padding: 16px;
  font-size: 16px;
  background-color: var(--dark-background);
  margin: 16px 0;
  border-radius: 4px;
  border: 2px dashed var(--color-default);
}

pre {
  overflow-x: auto;
  display: inline;
}

.blog * {
  font-size: 18px;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.blog a {
  position: relative;
  text-decoration: underline;
}


.blog p {
  display: inline-block;
  margin-top: 16px;
  line-height: 1.3;
}

.blog img {
  max-width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-top: 16px;
}

* {
  font-family: "Libre Baskerville", 'Times New Roman', Times, serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.hero .links img {
  margin-right: 8px;
}

.hero .links * {
  letter-spacing: .3px;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 700;
}

.heroContainer {
  overflow: hidden;
  position: relative;
  min-height: 100lvh;
}

.hero {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 220px;
  display: flex;
  flex-direction: column;
}

.spacer {
  display: block;
  margin-top: 24px;
}

.title {
  font-size: 48px;
}

.image-container {
  display: flex;
}

.description {
  line-height: 1.5;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  font-size: 24px;
  gap: 12px;
}

b {
  color: var(--color-accent);
}

.links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 48px;
}

.hero .links a {
  color: var(--color-default);
  transition: color .3s;

  &:hover {
    color: var(--color-accent);
  }
}

.section {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 90px var(--container-padding);
  display: flex;
  flex-direction: column;
  gap: 156px;
}

.section-title {
  padding: 48px 120px 0;
  font-size: 56px;
  text-align: center;
}

.hero .link {
  font-size: 22px;
}

.project-title {
  font-size: 36px;
  text-align: center;
}

.project-image {
  object-fit: contain;
  width: 100%;
  vertical-align: top;
  height: auto;
  max-width: 100%;
}

.project-content {
  margin-top: 68px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.project-description,
.project-description * {
  font-size: 20px;
  line-height: 1.5;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.projects>.project:nth-child(3n) .project-content>*:first-child {
  order: 2;
}

.project-link-container {
  margin-top: 32px;
}

.project-link-container .link {
  font-size: 22px;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.link {
  font-size: 24px;
  position: relative;

  &::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 16px;
    height: 2px;
    background-color: var(--color-accent);
    transition: width .2s;
  }

  &:hover::after {
    width: 100%;
  }
}

.dots {
  padding: 40px;
  pointer-events: none;
  user-select: none;
  gap: 30px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.dot {
  transition: opacity .3s;
  position: absolute;
  transform: rotate(45deg);
  width: 4px;
  height: 4px;
  background-color: var(--color-default);
  border-radius: 20px;
  opacity: .05;
}

.dot.enhanced {
  opacity: .3;
}

.breaker {
  position: relative;
  width: 100%;
  max-width: 80%;
  margin: 0 auto;
  height: 2px;

  &::before,
  &::after {
    content: '';
    display: block;
    position: absolute;
    height: 1px;
    background-color: var(--color-default);
    opacity: .7;
    width: 60%;
  }

  &::before {
    top: -5px;
    left: 0;
  }

  &::after {
    top: 5px;
    right: 0;
    left: auto;
  }
}

.blog-link {
  display: flex;
  gap: 24px;
  font-weight: 400;
  padding: 32px;
  position: relative;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 40%;
    border-top: 2px solid var(--color-default);
    border-left: 2px solid var(--color-default);
    opacity: .5;
    transition: all .2s;
  }

  &::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30%;
    height: 40%;
    border-bottom: 2px solid var(--color-default);
    border-right: 2px solid var(--color-default);
    transition: all .2s;
    opacity: .5;
  }

  &:hover {

    &::before,
    &::after {
      border-color: var(--color-accent);
      width: 40%;
      height: 60%;
      opacity: 1;
    }
  }
}

.blog-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-info * {
  font-family: Inter, Arial, Helvetica, sans-serif;
  line-height: 1.2;
}

.blog-title {
  font-size: 20px;
}

.blog-entry-title {
  font-size: 24px;
  margin-top: 0;
}

.blog-description {
  font-size: 20px;
  color: var(--color-default);
}

.blog-date {
  color: var(--color-default);
  font-size: 16px;
  margin-top: auto;
  padding-top: 24px;
}

.copyright {
  opacity: .7;
  text-align: center;
  padding: 16px 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body #contact * {
  font-family: Inter, Arial, Helvetica, sans-serif;
  text-align: center;
  line-height: 1.5;
  font-size: 16px;
}

#contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-direction: column;
  padding: 24px 32px 32px;
  background-color: var(--dark-background);
}

#contact #contact-title {
  margin-top: 0;
  font-size: 22px;
}

#contact .link {
  margin-left: 4px;
  display: inline-block;

  &::after {
    bottom: -0px;
  }
}

#contact .link img {
  position: relative;
  top: 3px;
}

#scroll-up-button {
  position: fixed;
  right: 30px;
  bottom: 50px;
  width: 60px;
  height: 60px;
  padding: 0;
  background-color: transparent;
  border: none;
  color: var(--color-accent);
  cursor: pointer;
  display: block;
  opacity: 0;
  pointer-events: none;

  transition: opacity .2s;
}

#scroll-up-button.hide {
  opacity: 0;
  pointer-events: none;
}

#scroll-up-button.show {
  opacity: .8;
  pointer-events: all;

  &:hover {
    opacity: 1;
  }
}

@media (max-width: 1350px) {

  #scroll-up-button,
  #scroll-up-button.show {
    display: none;
  }

  body {
    --container-padding: 60px;
  }

  .hero {
    padding: 100px;
  }
}

@media (max-width: 1050px) {

  #scroll-up-button,
  #scroll-up-button.show {
    display: none;
  }

  .project-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 32px;
    max-width: 600px;
    margin: 48px auto 0;
  }

  .project-image {
    max-width: 600px;
    margin: 0 auto;
  }

  .projects>.project:nth-child(3n) .project-content>*:first-child {
    order: 0;
  }
}

@media (max-width: 800px) {
  .title {
    font-size: 32px;
  }

  .blog-image {
    max-width: 100%;
    height: auto;
  }

  .blog-entry-title {
    font-size: 20px;
  }

  .blog-description {
    font-size: 16px;
  }

  .blog-date {
    font-size: 14px;
  }

  .description {
    font-size: 20px;
  }

  .hero .link {
    font-size: 18px;
  }

  .links {
    gap: 22px;
  }

  .inner-header-container {
    flex-wrap: wrap;
    gap: 22px;
  }

  .right-side {
    gap: 14px;
  }

  header .link {
    font-size: 18px;
  }

  body {
    --container-padding: 24px;
  }

  .blog h1 {
    font-size: 32px;
  }

  .blog-link {
    flex-direction: column;
  }

  .hero {
    padding: 32px;
  }

  #contact #contact-title {
    font-size: 22px;
  }

  #contact p {
    font-size: 16px;
  }

  #contact .link {
    font-size: 16px;
  }

  #contact br {
    display: none;
  }

  .copyright {
    font-size: 14px;
  }

  .section {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .section-title {
    padding-top: 0;
    font-size: 28px;
  }

  .blog>div>h1 {
    font-size: 28px;
  }

  body .blog .toc-title {
    font-size: 22px;
  }

  .blog a {
    font-size: 16px;
  }

  .blog h2 {
    font-size: 20px;
  }

  .blog h3 {
    font-size: 18px;
  }

  .project-title {
    font-size: 26px;
  }

  .section {
    gap: 48px;
  }
}

@media (min-width: 2000px) and (min-height: 2000px) {
  .hero {
    padding-top: 30vh;
  }

  .hero .title {
    font-size: 64px;
  }

  .hero .description {
    font-size: 28px;
  }

  .hero .links a {
    font-size: 28px;
  }

  .hero .links img {
    min-height: 24px;
    min-width: 24px;
  }
}
