/*
  Initial css reset / global styles take from an article by Josh W Comeau:
  https://www.joshwcomeau.com/css/custom-css-reset/
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  min-height: 100%;
  background-color: var(--body-bg-color);
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
    'Helvetica Neue', sans-serif;
  font-size: 1.1rem;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 80%;
  border-radius: 2%;
  margin: auto;
}

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

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

p {
  width: 100%;
}

#root,
#__next {
  isolation: isolate;
}

:root {
  --body-bg-color: rgb(94, 107, 119);
  --primary-color: darkslateblue;
  --accent-color: slateblue;
  --text-inverted-color: antiquewhite;
  --main-bg-color: lightblue;
  --text-main-color: black;
  --link-hover-color: pink;
}

h1 {
  color: var(--primary-color);
}
h2 {
  color: var(--accent-color);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

p {
  margin: 0.5rem 0;
}

header {
  width: 100%;
  padding: 4px;
  background-color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-inverted-color);

  display: flex;
  justify-content: space-around;
}
header a {
  text-decoration: none;
  color: inherit;
  padding: 2px 16px;
}
header a:hover {
  transform: translateY(2px);
  color: var(--link-hover-color);
  text-decoration: dotted underline;
}
.fill-space {
  flex-grow: 1;
}
footer {
  width: 100%;
  padding: 16px 48px;
  background-color: var(--primary-color);
  color: var(--text-inverted-color);
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: space-between;
}

footer a {
  text-decoration: none;
  color: deepskyblue;
}

main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--main-bg-color);
  padding: 16px;
}

section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 80ch;
  background-color: lch(from var(--main-bg-color) calc(l + 10) c h);
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
}

ol {
  width: 100%;
}
ul {
  list-style: square;
  width: 100%;
}
ul ul {
  list-style: circle;
}

span[data-descr] {
  position: relative;
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: dotted underline;
  cursor: help;
}
span[data-descr]:hover,
span[data-descr]:focus {
  text-decoration: dotted underline;
  background-color: var(--accent-color);
  color: var(--text-inverted-color);
  border-radius: 8px;
  padding: 2px;
  margin: -2px;
}

span[data-descr]:hover::after,
span[data-descr]:focus::after {
  content: attr(data-descr);
  position: absolute;
  left: 0;
  top: 1.8rem;
  width: max-content;
  max-width: 40ch;
  border-radius: 8px;
  background-color: var(--accent-color);
  padding: 12px;
  color: var(--text-inverted-color);
  z-index: 1;
}

#profilePhoto {
  border-radius: 16px;
  height: 320px;
  width: auto;
  align-self: center;
}

.two-col {
  display: flex;
  gap: 16px;
}

details {
  width: 100%;
}

details h2 {
  display: inline-block;
}

em {
  color: #e91e63;
  font-weight: 500;
}
.hljs {
  border-radius: 16px;
}

code {
  background-color: lightgrey;
  border-radius: 4px;
  padding: 0px 4px;
}

@media (max-width: 80ch) {
  .two-col {
    flex-wrap: wrap;
  }
  img {
    height: auto;
  }
}
