* {
  box-sizing: border-box;
}

html, body {
  padding: 0;
  margin: 0;
}

body {
  min-width: 440px;
  background-color: #f4e7fb;
  font-family: "New Frank", "Noto Sans TC", sans-serif;
  font-weight: 300;
  min-height: 100vh;
}

.container {
  max-width: 1280px;
  padding: 2rem;
  margin: auto;
}

header {
  width: 100%;
  background-color: #8e44ad;
  color: white;
}

header .container {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 1rem;
}

header h1 {
  margin: 0;
  font-weight: 500;
}

header a {
  text-decoration: none;
  color: inherit;
}

header a:hover {
  text-decoration: underline;
}

header h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 300;
  padding-left: 1rem;
  border-left: 1px solid white;
}

@media (max-width: 560px) {
  header .container {
    flex-direction: column;
    align-items: start;
    gap: 0;
  }

  header h1 {
    font-size: 1.2rem;
  }

  header h2 {
    font-size: 1.75rem;
    padding: 0;
    border: none;
  }
}

.card-flow {
  column-count: 3;
  column-gap: 1rem;
}

@media (max-width: 960px) {
  .card-flow {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .card-flow {
    column-count: 1;
  }
}

@media (max-width: 840px) {
  .card-flow.theory {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .card-flow.theory {
    column-count: 1;
  }
}

.project-card {
  display: inline-block;
  width: 100%;
  padding: 1.25rem;
  border-radius: 0.5rem;
  background-color: white;
  box-shadow: 0px 5px 7.5px -3px rgba(0,0,0,0.2);
  user-select: none;
  -webkit-user-select: none;
  break-inside: avoid;
  margin-bottom: 1rem;
}

.project-card h1, .project-card p {
  margin: 0;
}

.project-card img:first-child {
  margin: -1.25rem;
  max-width: calc(100% + 2.5rem);
  margin-bottom: 1rem;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.project-card h1 {
  margin: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 1.5rem;
}

.project-card p {
  font-size: 1.1rem;
  line-height: 140%;
}

.project-card h1 a, .project-card p a {
  color: #8e44ad;
  text-decoration: none;
}

.project-card h1 a:hover, .project-card p a:hover {
  text-decoration: underline;
}

main > h1 {
  font-weight: 500;
  font-size: 1.75rem;
  color: #8e44ad;
}

tt, pre, code, kbd, .mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

main > * {
  font-size: 1.2rem;
  line-height: 140%;
}