*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  color: #333;
  background-color: #fff;
  line-height: 1.5;
  font-size: 18px;
  margin: 0;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

ul {
  list-style: square inside;
  padding-left: 15px;
  margin-left: 10px;
}

a,
a:hover {
  color: #d00;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::selection {
  color: #fff;
  background: #d00;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.2;
  color: #330;
  font-weight: 400;
  margin-bottom: 15px;
  margin-top: 20px;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.6rem; }
h4 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0;
}
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

.wrapper {
  max-width: 750px;
  margin: 0 auto;
}

.container {
  margin-top: 50px;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.header {
  text-align: left;
  margin-bottom: 20px;
}

.header h1.site-title {
  margin: 0;
  padding: 0;
  font-size: 2.5rem;
  line-height: 1.3em;
}

.header h1.site-title strong {
  font-weight: 700;
}

.site-affilation {
  margin-top: 1.5em;
}

.site-affilation .position {
  display: block;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 20px;
}

.site-affilation .email {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 0.4em;
  font-family: 'Source Code Pro', monospace;
  font-weight: 700;
  font-size: 20px;
}

.at-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.prevent-select {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.links ul {
  list-style: none;
  padding-left: 0;
  margin: 1.5em 0 .5em;
}

.links ul li {
  display: inline-block;
}

.icon-url:hover {
  text-decoration: none;
}

.icon {
  width: 37px;
  height: 37px;
  margin-right: 1em;
  display: inline-block;
  fill: currentColor;
  color: #333;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.links ul li:last-child .icon {
  margin-right: 0;
}

.icon-url:hover .icon {
  opacity: 1;
}

/* ---------- Body sections ---------- */

.introduction {
  margin-top: 30px;
}

.introduction span {
  display: block;
  margin-bottom: 1em;
}

.introduction a,
.introduction a:visited {
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #d00;
}

.introduction a:hover {
  color: #d00;
  border-bottom-style: dashed;
}

.introduction li {
  list-style-position: inside;
  text-indent: -1em;
  padding-left: 1em;
  margin-bottom: 10px;
}

.introduction li p {
  display: inline;
}

.introduction .project {
  margin: .5em 0 0;
}

/* ---------- Footer ---------- */

.footer {
  text-align: right;
  font-size: 0.75em;
  color: #999;
  border-top: 1px solid #f4f4f4;
  padding: 20px 0;
  margin-top: 70px;
}

/* ---------- Responsive ---------- */

@media (max-width: 769px) {
  body { font-size: 16px; padding: 20px; }

  .container { margin-top: 10px; padding: 0; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }
  h4 { font-size: 1.3rem; }
}

/* ---------- Dark mode ---------- */

@media (prefers-color-scheme: dark) {
  body {
    background-color: #303030;
    color: #ddd;
  }

  a,
  a:hover {
    color: #66d9ef;
    text-decoration: none;
  }

  h1, h2, h3, h4, h5, h6 {
    color: #eee;
  }

  .icon {
    color: #ddd;
  }

  .introduction a,
  .introduction a:visited {
    color: #ddd;
    border-bottom-color: #66d9ef;
  }

  .introduction a:hover {
    color: #66d9ef;
  }

  .footer {
    color: #999;
    border-top-color: #444;
  }

  ::selection {
    color: #000;
    background: #6de8ff;
  }
}
