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

::selection {
  background: #FFE080;
}

::-moz-selection {
  background: #FFE080;
}

html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  text-decoration: none;
}

html {
  font-size: 18px;
}

body {
  line-height: 1.6;
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  font-smooth: always;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  font-style: normal;
  font-weight: normal;
  color: #2E3542;
  background: #FDFDFD;
}

h2 {
  margin: 0.3em 0;
}

h3 {
  margin: 0.2em 0;
}

h4 {
  margin: 0.1em 0;
}

.navbar {  
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: clamp(320px, 90%, 1164px);
  margin: 0 auto;
  min-height: 46px;
  padding: 4px;
  flex-wrap: wrap;
}

.navbar-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2E3542;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: 'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive;
}

nav a {
  display: inline-block;
  margin: 6px;
  color: #999;
  font-size: 1rem;
  font-weight: bold;
}

.navbar nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0 18px 0 0;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background-color: transparent;
  color: #999;
  font-weight: bold;
  font-size: 1rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232E3542' d='M10.59.59 6 5.17 1.41.59 0 2l6 6 6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 11px 7px;
}

.lang-select:hover {
  color: #666;
  border-bottom-color: #d6d0bf;
}

.lang-select:focus {
  outline: none;
  border-bottom-color: #b8ac8a;
  color: #666;
}

nav .active {
  color: #666 !important;
}

main {
  position: relative;
  width: clamp(320px, 90%, 900px);
  margin: 0 auto;
  padding-bottom: 20px;
  padding-top: 1em;
  text-align: justify;
  flex: 1;
}

main a {
  color: #2E3542;
  background-position: 0 0;
  background-image: linear-gradient(to top, #FFE080, #FFE080 0.15em, rgba(0, 0, 0, 0) 0.15em, rgba(0, 0, 0, 0));
}

main a:hover {
  background-color: #FFE080;
}

/* Links page */
.links-category {
  margin-top: 1.2rem;
}

.links-list {
  list-style: none;
  padding-left: 0;
  margin: 0.2rem 0 0 0;
}

.links-list li {
  margin: .2rem 0;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  margin-top: auto;
  background: #FDFDFD;
  border-top: 1px solid #f0f0f0;
}

footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #999;
  border-radius: 50%;
  opacity: .6;
  transition: opacity .3s linear;
  margin: 0 6px;
}

footer a:hover {
  opacity: 1;
}

footer a .github {
  height: 26px;
}

footer a .cv {
  height: 22px;
}

footer a .linkedin {
  height: 18px;
}

input, textarea {
  width: 100%;
  padding: 8px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: transparent;
}

form input[type="submit"] {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f3e6;
  cursor: pointer;
}