/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}
/* 2. Remove default margin */
* {
  margin: 0;
}
body {
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* 5. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
/* 6. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
}
/* 7. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
/* 8. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}
/*
  9. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}

@font-face {
    font-family: 'OrtoRNIDS';
    src: url('/fonts/OrtoRNIDS-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'OrtoRNIDS';
    src: url('/fonts/OrtoRNIDS-Italic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'OrtoRNIDS';
    src: url('/fonts/OrtoRNIDS-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
  --sidebar-background: #334e9e;
  --sidebar-color: #fefefe;
  --sidebar-width: 15em;
  --accent-light: #5a7ec9;
  --accent-dark: #253a75;
  --content-background: #ffffff;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;
}

html[lang="sr"] {
  --sidebar-background: #ae483d;
  --accent-light: #c8685a;
  --accent-dark: #8a3830;
}

body {
    font-family: "OrtoRNIDS", sans-serif;
}
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100%;
    padding: 20px;
    background: var(--sidebar-background);
    color: var(--sidebar-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    line-height: 2em;
}

.sidebar a, .sidebar a:visited, .header a, .header a:visited {
    color: var(--sidebar-color);
    text-decoration: none;
    font-size: 1.25em;
}

.sidebar a:hover {
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-style: wavy;
    text-underline-offset: 0.1em;
}

.sidebar a:focus-visible, .header a:focus-visible {
    outline: 2px solid var(--sidebar-color);
    outline-offset: 2px;
    text-decoration: underline;
}

.sidebar > .title {
    font-size: 1.75em;
    margin-bottom: 0.75em;
    line-height: 1.2em;
    font-weight: bold;
}

nav {
    font-size: 1.25em;
}

.header > nav > a:last-child {
    float: right;
}

.header > nav > a:not(:last-child) {
    margin-right: 0.75em;
}

.lang-switch {
    margin-top: 3em;
}

.header {
    display: none;
    padding: 10px;
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
    background: var(--sidebar-background);
    color: var(--sidebar-color);
}

/* Content */

.content {
    margin-left: var(--sidebar-width);
    padding: 1.5em;
    max-width: 50em;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.content > * {
    font-size: 1.25em;
}

.content a, .content a:visited {
    color: var(--sidebar-background);
    font-weight: bold;
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-style: wavy;
    text-decoration-offset: 0.1em;
}

.content a:focus-visible {
    outline: 2px solid var(--sidebar-background);
    outline-offset: 2px;
    text-decoration: underline;
}

.content h1 {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 0.25em;
}

.content h2 {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 0.25em;
    margin-top: 0.25em;
}

article > .article_date {
    font-size: 0.8em;
    font-style: italic;
    margin-bottom: 1.5em;
}

article > .now_date {
    font-size: 0.8em;
    font-style: italic;
    margin-bottom: 1em;
}

.inline_date {
    margin-top: 0.5em;
    font-size: 1em;
}

article > p {
    text-indent: 1em;
    line-height: 1.5em;
    padding-bottom: 0.5em;    
}

/* Lists */

ul {
    margin-bottom: 1em;
    line-height: 1.5em;
}

ul > li {
    margin-bottom: 0.5em;
}

/* List of article */

h1.article_list, h1.notes_list, h1.tags_list {
    margin-bottom: 0.25em;
}

h2.article_list, h2.notes_list {
    margin-bottom: 0em;  
}

p.article_list, p.tags_list {
    line-height: 1.5em;
}

.notes_date_tags {
    font-size: 1em;
    margin-top: 0em;
    margin-bottom: 1em;
}

article.notes_list {
    margin-bottom: 1.5em;
}

/* Misc. */

#welcome_image {
    float: right;
    max-width: 10em;
    margin-left: 0.75em;
    margin-bottom: 0.75em;
    display: inline;
}

.strikethrough {
    text-decoration: line-through;
}

strong {
    font-weight: bold;
}

footer {
    margin-top: 0.5em;
    text-align: center;
    line-height: 1.75em;
}

hr {
    border: none;
    background-color: var(--sidebar-background);
    height: 5px;
    margin-bottom: 1em;
}

.short-lang {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .header {
        display: block;
    }
    .content {
        margin-left: 0;
        padding: 1em;
    }
}

@media (max-width: 475px) {
    nav {
        font-size: 0.9em;
    }
    .header nav a:last-child::before {
        content: attr(data-shortlangname);
    }
    .short-lang {
        display: block;
    }
    .full-lang {
        display: none;
    }
    .content h1 {
        font-size: 1.5em;
    }
    .content h2 {
        font-size: 1.25em;
    }
    img.intro {
        max-width: 33%;
        width: auto;
    }
    .content p {
        font-size: 0.7em;
    }
}

@media print {
    .sidebar {
        display: none;
    }
    .header {
        display: block;
        background: #ffffff;
        color: #000000;
        border-bottom: 2px solid #000000;
    }
    .header a, .header a:visited {
        color: #000000;
    }
    .content {
        margin-left: 0;
        padding: 1em;
    }
    .content a, .content a:visited {
        color: #000000;
        text-decoration: underline;
    }
}
