

@font-face {
  font-family: 'cmu_serif';
  src: url('fonts/cmu-roman.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'cmu_serif';
  src: url('fonts/cmu-bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'cmu_serif';
  src: url('fonts/cmu-italic.woff') format('woff');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'cmu_serif';
  src: url('fonts/cmu-bolditalic.woff') format('woff');
  font-weight: bold;
  font-style: italic;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  counter-reset: figures;
  font-family: serif;
  font-size: 1rem;
  line-height: 1.4;
}

h1,
h3,
h5 {
  text-align: left;
  margin-bottom: 0;
  font-variant: small-caps;
  position: relative;
  overflow: hidden;
}

h1 {
  font-size: 1.8rem;
}

h3 {
  text-decoration: underline green double;
  font-size: 1.3rem;
}

h3:after {
  content: "";
  bottom: 0.8rem;
  width: 100%;
  margin-left: 0.1em;
  height: 0.45rem;
  position: absolute;
  background: green;
}

h5 {
  text-decoration: underline grey double;
  font-size: 1rem;
  padding-top: 2rem;
}

h5:after {
  content: "";
  bottom: 0.6rem;
  width: 100%;
  margin-left: 0.1rem;
  height: 0.45rem;
  position: absolute;
  background: grey;
}

h3+h5 {
  margin-top: 0.5rem;
  padding-top: 0;
}

h6 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

h5+h6 {
  margin: 0.5rem 0 -0.5rem;
  padding-top: 0;
}

p {
    hyphens: none;
  }

ul {
  margin: -1rem auto auto;
}

li>ul {
  margin-top: auto;
}

table {
  width: 100%;
  overflow-x: auto;
  text-align: center;
}

td {
  sborder-bottom: 1px solid #333;
}

tr:hover {
  background-color: lightgrey;
}

tr:last-child > td {
  border-bottom: 1px solid #333;
}

th {
  padding: 0 0.5em;
  background-color: #333;
  color: white;
}

section {
  background: white;
  border-radius: 0.5em;
  box-shadow: 0 0.5em 0.5em 0 rgba(153, 153, 153, 1);
  padding: 0.5em 2em 1em;
  width: 600px;
  margin: 0 auto 1em;
}

.MathJax,
.equation {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.flex-container {
  display: flex;
}

#search {
  flex-grow: 1;
}

#filter {
  border-radius:10px;
  border: 1px solid;
  height: 2.25em;
  background-color: rgba(0,0,0,0);
}

input {
  margin-bottom:15px;
  border: 1px solid;
  border-radius:10px;
  cursor: pointer;
  height: 1.5em;
  line-height: 1.5em;
  margin-right: 5px;
  padding: 4px 10px;
  background-color: rgba(0,0,0,0);
}

button.green {
  font-size: 0.9rem;
  display: block;
  margin-top: 2em;
  border-radius: 1em;
  border: 2px solid green;
}

button.green:hover {
  background-color: green;
  color: white;
}

button.red {
  font-size: 0.9rem;
  display: block;
  margin-top: 2em;
  border-radius: 1em;
  border: 2px solid red;
}

button.red:hover {
  background-color: red;
  color: white;
}

figcaption::before {
  counter-increment: figures;
  content: 'Рис. ' counter(figures) '. ';
}

p>img {
  margin: auto;
  display: block;
  max-width: 100%;
}

figcaption {
  text-align: center;
  font-style: italic;
}

code {
  background: #DCDCDC;
  padding: 0.4em;
  white-space: pre-wrap;
}

code:before {
  display: block;
  margin: -1em -1em 0;
  padding: 0.2em;
  text-transform: uppercase;
  font-weight: bold;
  content: attr(data-lang);
  background: #9baecf;
  text-indent: 2em;
}

code:after {
  display: block;
  margin: 1.2em -1em -2em;
  content: " ";
  border-top: solid thick #9baecf;
}

.alpha {
  text-decoration: none;
  color: black;
  background: transparent url(https://lectures.nikitin-pro.ru/alpha.png);
  display: inline-block;
  margin: 0 auto;
  background-size: cover;
  width: 2em;
  height: 2em;
}

.alpha:hover {
  transition: 1s ease;
  transform: rotate(360deg);
}


/*
.alpha:hover:after {
  content:"WolframAlpha";
    font-weight: bold;
    font-size: 1.2em;
    margin: 0.5em 0 0 2em;
    opacity: 1;
  animation-name: fadeInOpacity;
  animation-iteration-count: 1;
  animation-timing-function: ease-in;
  animation-duration: 2s;
}
@keyframes fadeInOpacity {
  0% {opacity: 0;}
  100% {opacity: 1;}
}
*/

.breaker {
  display: inline-block;
  width: 100%;
}

dd {
  margin-left: 1em;
}

hint-warning {
  background: whitesmoke;
  padding: 1rem 1rem 1rem 2.5rem;
  margin: 1rem auto;
  display: block;
  border-radius: 0.5rem;
  border-left: thick solid red;
}

hint-warning::before {
  content: "!";
  color: red;
  font-size: 1.2rem;
  font-weight: bold;
  border: solid red;
  padding: 0 0.5rem;
  border-radius: 1rem;
  position: relative;
  left: -2rem;
}

hint-info {
  background: whitesmoke;
  padding: 1rem 1rem 1rem 2.5rem;
  margin: 1rem auto;
  display: block;
  border-radius: 0.5rem;
  border-left: thick solid blue;
}

hint-info::before {
  content: "i";
  color: blue;
  font-size: 1.2rem;
  font-weight: bold;
  border: solid blue;
  padding: 0 0.5rem;
  border-radius: 1rem;
  position: relative;
  left: -2rem;
}

hint-ok {
  background: whitesmoke;
  padding: 1rem 1rem 1rem 2.5rem;
  margin: 1rem auto;
  display: block;
  border-radius: 0.5rem;
  border-left: thick solid green;
}

hint-ok::before {
  content: "✔";
  color: green;
  font-size: 1.2rem;
  font-weight: bold;
  border: solid green;
  padding: 0 0.25rem;
  border-radius: 1rem;
  position: relative;
  left: -2rem;
}

a.tooltips {
  position: relative;
  display: inline;
  border-bottom: 1px dashed red;
}
a.tooltips span {
  position: absolute;
  width:140px;
  color: #FFFFFF;
  background: #000000;
  height: auto;
  line-height: 1.2em;
  padding: 0.5em;
  text-align: center;
  visibility: hidden;
  border-radius: 6px;
}
a.tooltips span:after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -8px;
  width: 0; height: 0;
  border-bottom: 8px solid #000000;
  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
}
a:hover.tooltips span {
  visibility: visible;
  opacity: 0.8;
  top: 1.6em;
  left: 50%;
  margin-left: -76px;
  z-index: 999;
}

#logo {
  width: 50%;
}

.slideShowBtn {
  position: relative;
  opacity: 0.5;
  top:  10rem;
}

.slideShowBtn:hover {
  opacity: 1;
}


/* --------------- MENU ------------------- */

nav {
  background: #222;
  color: white;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
}

nav>ul {
  display: flex;
  list-style: none;
  justify-content: flex-end;
}

nav>ul>li:hover {
  background: #434343;
}

nav>ul>li>a:target {
  background: #434343;
}

nav>ul>li>a>span {
  visibility: hidden;
  position: absolute;
  z-index: 2;
  left: 2rem;
  letter-spacing: 0.5rem;
  font-size: 1.3rem;
  margin: 1rem;
}

nav>ul>li:hover>a>span {
  visibility: visible;
  color: white;
}

nav>ul>li>a>img {
  height: 1.5rem;
  padding: 1rem;
}

#burger {
  display: none;
}







@media only screen and (max-width: 690px) {
  html {
    scroll-behavior: smooth;
    font-size: 1rem;
  }
  section {
    padding: 0.5em 1em 1em;
    width: 90%;
    margin: 0 auto 1em;
  }
  #burger+label {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    height: 1.5rem;
    width: 1.5rem;
    z-index: 5;
  }
  #burger+label > box {
    position: absolute;
    width: 2rem;
    height: 2rem;
    top: -0.25rem;
    left: -0.25rem;
    display: block;
    background: white;
    transition-property: background;
    transition-delay: 0.8s;
  }
  #burger+label span {
    position: absolute;
    width: 100%;
    height: 2px;
    top: 50%;
    margin-top: -1px;
    left: 0;
    display: block;
    background: green;
    transition: 0.5s;
    z-index: 1;
  }
  #burger+label span:first-child {
    top: 0.25rem;
  }
  #burger+label span:last-child {
    top: 1.2rem;
  }
  #burger:hover {
    cursor: pointer;
  }
  #burger:checked+label > box {
    background: none;
    transition-property: background;
    transition-delay: 0s;
  }
  #burger:checked+label span {
    opacity: 0;
    top: 50%;
  }
  #burger:checked+label span:first-child {
    opacity: 1;
    transform: rotate(405deg);
  }
  #burger:checked+label span:last-child {
    opacity: 1;
    transform: rotate(-405deg);
  }
  nav {
    background: #ededed;
    opacity: 1;
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    z-index: 3;
    transition: 0.5s;
    transition-delay: 0.5s;
    overflow: hidden;
    display: flex;
    flex-flow: column;
    justify-content: space-between;
  }
  nav>ul {
    text-align: left;
    position: relative;
    transition: 0.5s;
    transition-delay: 0s;
    text-decoration: none;
    color: #020304;
    display: block;
    padding: 0 1rem 1rem;
    margin: 1rem 0 2rem;
    top: 1.5rem;
  }
  nav>ul>li {
    padding: 0 0 0.5rem;
    margin-bottom: 1rem;
  }
  nav>ul>li:hover {
    background: #ededed;
  }
  nav>ul>li:hover>a>span {
    color: #020304;
    text-shadow: 1px 1px 2px green, 0 0 1em green, 0 0 0.1em green;
  }
  nav>ul>li>a>img {
    padding: 0;
  }
  nav>ul>li>a>span {
    text-decoration: none;
    color: #020304;
    opacity: 0.8;
    padding: 1rem;
    margin-top: -0.8rem;
    letter-spacing: 0.1rem;
    font-size: 1rem;
  }
  #burger:checked~nav {
    width: 15rem;
    transition-delay: 0s;
  }
  #burger:checked~nav>ul>li>a>span {
    visibility: visible;
  }
  #burger:checked~nav>#info {
    display: flex;
    flex-flow: column;
  }


  #logo {
    width: 70%;
  }

}









@media only screen and (max-width: 500px) {
  html {
    scroll-behavior: smooth;
    font-size: 1rem;
  }
  body {
    font-family: serif;
    font-size: 1em;
  }
  h1 {
    font-size: 1.3rem;
  }
  h3 {
    font-size: 1.1rem;
    color: green;
    text-decoration: underline green double;
  }
  h3:after {
    all: unset;
  }
  h5 {
    font-size: 1rem;
    color: grey;
    text-decoration: underline grey double;
  }
  h5:after {
    all: unset;
  }
  h6 {
    font-size: 0.8rem;
  }
  ul,
  ol {
    margin:-1rem auto 0 -1rem;
  }
  p,
  ol,
  ul {
    hyphens: auto;
  }
  .popup{
    width: 80%;
  }
  p>img {
    width: 100%;
  }
  #logo {
  width: 100%;
}
}


/*  https://maxdesign.com.au/articles/definition/
    https://codemyui.com   
*/



@media (prefers-color-scheme: dark) {
	body,section,#burger+label > box{
		background: black;
		color: grey;
	}
	a{
		color: #9999ff;
	}
	nav,nav>ul>li:hover {
   	background: #333333;
   }
   nav>ul>li>a>span {
   	color: grey;
   }
   button.green {
  		background-color: green;
  		color: white;
  		cursor: pointer;
	}
	hint-ok{
		background: black;
		border-right: solid green;
		border-top: solid green;
		border-bottom: solid green;
	}
	hint-info{
		background: black;
		border-right: solid blue;
		border-top: solid blue;
		border-bottom: solid blue;
	}
	hint-warning{
		background: black;
		border-right: solid red;
		border-top: solid red;
		border-bottom: solid red;
	}
  #filter, input{
    border-color: grey;
    color: grey;
  }

}
