:root {
  --off-black: hsl(0, 0%, 10%);
  --dark-grey: hsl(0, 0%, 30%);
  --mid-grey: hsl(0, 0%, 50%);
  --light-grey: hsl(0, 0%, 80%);
  --primary: black;

  --sans-serif: "DejaVu Sans", "Verdana", sans-serif;
  --serif: ETBook, "Georgia", "DejaVu Serif", serif;
  --mono: mono;

  --thin: 2px;
}

* {
  margin: 0;
  padding: 0;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 5rem;
  margin: 0 -1.5rem;
  padding: 0.75rem 1rem;
  font-size: 18px;
  border-bottom: var(--thin) solid var(--light-grey);
  white-space: nowrap;
}

body {
  font-size: 16px;
  font-family: var(--sans-serif);
  color: var(--off-black);
  text-justify: inter-word;
  counter-reset: i-img i-snippet i-table i-video i-footnote;
  background-color: white;
  padding: 1rem 2.5rem;
}

.site-title {
  font-weight: bold;
  font-size: 2.25em;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0;
}

.title-quote {
  margin: 0;
  color: hsl(0, 0%, 40%);
}

hr {
  border: none;
  border-bottom: var(--thin) solid var(--light-grey);
}

.menu {
  border: var(--thin) solid var(--light-grey);
  background-color: white;
  position: relative;
  text-align: left;
  display: flex;
  gap: 0.75em;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5em;
}

.macek {
  overflow: clip;
  width: 95.12%;
  position: relative;
  will-change: width;
  animation: scaleAnimation 15s ease-in-out;
  animation-fill-mode: forwards;
  /*animation-delay: 1s*/
}

.macek-container {
  margin: 0.25rem 0.3rem 0.25rem 2rem;
  flex-grow: 1;
  display: flex;
  height: 28px;
  max-width: 330px;
  min-width: 80px;
  flex-direction: row-reverse;
  transform-origin: right;
}

@keyframes scaleAnimation {
  0.0% { width: 95.12%; }
  2.0% { width: 85.904%; }
  4.0% { width: 93.277%; }
  6.0% { width: 87.379%; }
  8.0% { width: 92.097%; }
  10.0% { width: 88.322%; }
  12.0% { width: 91.342%; }
  14.0% { width: 88.926%; }
  16.0% { width: 90.859%; }
  18.0% { width: 89.313%; }
  20.0% { width: 90.55%; }
  22.0% { width: 89.56%; }
  24.0% { width: 90.352%; }
  26.0% { width: 89.719%; }
  28.0% { width: 90.225%; }
  30.0% { width: 89.82%; }
  32.0% { width: 90.144%; }
  34.0% { width: 89.885%; }
  36.0% { width: 90.092%; }
  38.0% { width: 89.926%; }
  40.0% { width: 90.059%; }
  42.0% { width: 89.953%; }
  44.0% { width: 90.038%; }
  46.0% { width: 89.97%; }
  48.0% { width: 90.024%; }
  50.0% { width: 89.981%; }
  52.0% { width: 90.015%; }
  54.0% { width: 89.988%; }
  56.0% { width: 90.01%; }
  58.0% { width: 89.992%; }
  60.0% { width: 90.006%; }
  62.0% { width: 89.995%; }
  64.0% { width: 90.004%; }
  66.0% { width: 89.997%; }
  68.0% { width: 90.003%; }
  70.0% { width: 89.998%; }
  72.0% { width: 90.002%; }
  74.0% { width: 89.999%; }
  76.0% { width: 90.001%; }
  78.0% { width: 89.999%; }
  80.0% { width: 90.001%; }
  82.0% { width: 89.999%; }
  84.0% { width: 90%; }
  86.0% { width: 90%; }
  88.0% { width: 90%; }
  90.0% { width: 90%; }
  92.0% { width: 90%; }
  94.0% { width: 90%; }
  96.0% { width: 90%; }
  98.0% { width: 90%; }
  100.0% { width: 90%; }
}

.macek img {
  margin: 0;
  height: 28px;
}

.menu a {
  margin: 0.75em 0.5em;
  padding: 0.25em 0;
}

.content {
  max-width: 45rem;
  /* flex-flow: row nowrap; */
  margin: 0 auto;
  padding: 4rem 0;
}

p {
  margin: 1em 0;
  line-height: 1.5em;
  font-family: var(--serif);
}

h1,
h2,
h3 {
  margin: 1em 0;
  color: var(--primary);
}

h1 {
  font-size: 2.25em;
  font-weight: bold;
}

h1.subtitle {
  margin-top: -2rem;
  margin-bottom: 2.5rem;
  font-size: 1.125em;
  font-weight: regular;
  color: var(--mid-grey);
}

h2 {
  font-size: 1.25em;
}

.content h2:before {
  content: "§";
  color: var(--light-grey);
  font-family: var(--serif);
  position: absolute;
  transform: translate(-1.25rem, 0rem);
}

.content h2:hover:before {
  color: var(--primary);
}

.en_US::after {
  content: "(english)";
  left: 0.5em;
  position: relative;
  color: var(--mid-grey);
  font-size: 0.875em;
  line-height: 1.25em;
  font-weight: bold;
}

ul {
  list-style-type: "- ";
  margin: 0;
  padding-left: 1.25em;
}

ol {
  padding-left: 1.25em;
}

.article-list {
  margin: 2em 0;
}

.article-list ul {
  padding-left: 0;
}

.article-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5em 0;
  line-height: 1.25em;
  position: relative;
  padding-right: 6em;
}

.article-annotation {
  background-color: var(--off-black);
  font-size: 10px;
  padding: 0.175em 0.4em;
  padding-left: 2em;
  text-align: right;
  color: white;
  font-weight: bold;
  clip-path: polygon(1em 0%, 100% 0%, 100% 100%, 1em 100%, 0% 50%);
  position: absolute;
  right: 0;
  /* top: -0.2em; */
}

.article-annotation:hover .short {
  display: none;
}

.article-annotation:hover .long {
  display: inline;
}

.article-annotation .long {
  display: none;
}

/*background-color: #E09740;*/
/*background-color: #577A8B;*/
/*background-color: #61584D;*/
/*background-color: #2E3436;*/

.article-annotation.maf2 {
  background-color: #017f57;
}

.article-annotation.fot1 {
  background-color: #b14f47;
}

.article-annotation.mod1 {
  background-color: #e09720;
}

.article-annotation.nrg {
  background-color: #075ca4;
}

blockquote {
  margin: 3.5rem;
}

blockquote p {
  font-style: italic;
}

blockquote p:last-of-type {
  text-align: right;
  font-style: normal;
}

blockquote::before {
  content: "”";
  font-size: 5rem;
  color: var(--light-grey);
  position: absolute;
  transform: translate(-3rem, -1.5rem);
}

.content img {
  max-width: 100%;
  object-fit: contain;
}

figure {
  margin: 3em 0;
  text-align: left;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
}

figure:has(table) {
  /* justify-content: start; */
}

.snippet pre {
  color: black;
  padding: 0.5em 1em;
  font-size: 0.75rem;
  width: fit-content;
  counter-reset: i-snippet-line;
  background-color: var(--light-grey);
}

.snippet code {
  counter-increment: i-snippet-line;
  position: relative;
}

.snippet code::before {
  content: counter(i-snippet-line);
  color: var(--mid-grey);
  position: absolute;
  left: 0;
  width: 3em;
  text-align: right;
  transform: translateX(-150%);
}

table {
  padding: 0.4rem 0.75rem;
  border: var(--thin) solid var(--light-grey);
}

td, th {
  padding: 0 1em;
}

td:first-child, th:first-child {
  padding-left: 0;
}

td:last-child, th:last-child {
  padding-right: 0;
}

figcaption {
  font-size: 0.875rem;
  line-height: 1.3em;
  margin: 1em 0;
  color: var(--dark-grey);
  width: 100%;
  /*border: 1px solid red;*/
}

figcaption::before {
  counter-increment: i-img;
  content: "Slika " counter(i-img) ": ";
  font-style: italic;
}

pre ~ figcaption::before {
  counter-increment: i-snippet;
  content: "Izrezek " counter(i-snippet) ": ";
  font-style: italic;
}

table ~ figcaption::before {
  counter-increment: i-table;
  content: "Tabela " counter(i-table) ": ";
  font-style: italic;
}

video ~ figcaption::before {
  counter-increment: i-video;
  content: "Video " counter(i-video) ": ";
  font-style: italic;
}

video {
  margin: 0 auto;
  display: block;
  max-width: 100%;
}

.csl-entry {
  display: flex;
  gap: 1.5em;
  margin: 0.875em 0;
}

.footnotes {
  margin: 4em 0;
  color: var(--dark-grey);
  font-size: 0.875rem;
}

.footnotes li {
  list-style: none;
  position: relative;
  counter-increment: i-footnote;
  margin: 0 1.5em;
}
.footnotes li::before {
  content: counter(i-footnote);
  font-size: 0.6875rem;
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-150%, -20%);
}

#bibliography {
  margin-top: 2.25em;
}

@media screen and (max-width: 600px) {
  html {
    font-size: 14px;
  }
  header {
    font-size: 14px;
  }
}

@media screen and (max-width: 400px) {
  html {
    font-size: 12px;
  }
  header {
    font-size: 12px;
  }
}
