/* CSC colors
 *  (main)
 *   magenta:   #830051
 *   teal:      #006778
 *   grey:      #5e6a71
 *
 *  (extra)
 *   green:     #7dc242
 *   orange:    #ff5800
 *   purple:    #ea1d77
 *   turquoise: #00c7b2
 *   dark blue: #002f5f
 *   blue:      #0082bb
 */
:root {
  --csc-magenta:   #830051;
  --csc-teal:      #006778;
  --csc-grey:      #5e6a71;
  --csc-green:     #7dc242;
  --csc-orange:    #ff5800;
  --csc-purple:    #ea1d77;
  --csc-turquoise: #00c7b2;
  --csc-dark-blue: #002f5f;
  --csc-blue:      #0082bb;
  --csc-highlight: #ffc0b0;
  --c-primary-900: #002930;
}
/* Screen geometry + base size for text */
:root {
  --xsize:  1920px;
  --ysize:  1080px;
  --xmargin:  74px;
  --ymargin:  84px;
  --fontsize: 50px;
}
/* Fonts */
:root {
  --csc-font-family: 'Noto Sans';
  --csc-code-font-family: 'Inconsolata';
}

/*********************************************
 * GLOBAL STYLES
 *********************************************/
.reveal-viewport {
  background-color: black;
}

.slide-background {
  background-image:    url("img/normal.svg");
  background-repeat:   no-repeat;
  background-position: center;
  background-size:     contain;
}

.slide-background.title {
  background-image:    url("img/title.svg");
}

:lang(fi) .slide-background.title {
  background-image:    url("img/title.svg");
}

.slide-background.section {
  background-image:    url("img/normal.svg");
}

.slide-background.author {
  background-image:    url("img/author.svg");
}

.high-contrast .reveal {
  color: #000000;
}
.reveal {
  font-family: var(--csc-font-family);
  font-size:   var(--fontsize);
  color:       var(--c-primary-900);
  font-weight: normal;
}
.reveal .slide-number,
html.print-pdf .reveal .slide-number {
  font-family: var(--csc-font-family);
  font-size:   30px;
  color:       #025c96;
  font-weight: normal;
  right:       10px;
  bottom:      30px;
  background-color: transparent;
}
.reveal .slides {
  text-align:  left;
  line-height: 1.4;
}
.reveal .slides section.slide ,
.reveal .slides .pdf-page section.slide {
  margin-top:   var(--ymargin)                            !important;
  margin-left:  var(--xmargin)                            !important;
  margin-right: var(--xmargin)                            !important;
  max-width:    calc(var(--xsize) - 2 * var(--xmargin))   !important;
  padding:      0                                         !important;
}
.reveal p {
  margin-top: 1ex;
}
.reveal section.slide::before {
  content: "";
}
.reveal .text-orange {
  color: var(--csc-orange);
}
.reveal .text-teal {
  color: var(--csc-teal);
}
.reveal .text-magenta {
  color: var(--csc-magenta);
}
.reveal .text-green {
  color: var(--csc-green);
}
.reveal .text-grey {
  color: var(--csc-grey);
}
.reveal .text-purple {
  color: var(--csc-purple);
}
.reveal .text-turquoise {
  color: var(--csc-turquoise);
}
.reveal .text-blue {
  color: var(--csc-blue);
}
.reveal .text-ghost {
  color: transparent;
}

/*********************************************
 * HEADERS
 *********************************************/
.reveal h1, .reveal h2, .reveal h3 {
  line-height: 1.1;
  text-align:  left;
  font-weight: bold;
}
.reveal h1 {
  font-size: 1.2em;
  color:     var(--csc-teal);
}
.reveal h2 {
  font-size: 1.1em;
  padding-top: 1ex;
  padding-bottom: 1ex;
}
.reveal h3 {
  font-size:   1em;
  padding-top: 1ex;
}
.reveal section.slide h1:first-child {
  padding-bottom: 1.7em;
}
.reveal section.slide h2:first-child,
.reveal section.slide h3:first-child,
.reveal section.slide h1:first-child + p,
.reveal section.slide h1:first-child + h2,
.reveal section.slide h1:first-child + h3,
.reveal .column p:first-child,
.reveal .column h2:first-child,
.reveal .column h3:first-child {
  padding-top: 0;
  margin-top: 0;
}

/*********************************************
 * OTHER
 *********************************************/

/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
  max-width: 95%;
  max-height: 95%;
}

/* General formatting */
.reveal strong, b {
  font-weight: bold;
}
.reveal em {
  font-style: italic;
}
.reveal sup {
  vertical-align: super;
}
.reveal sub {
  vertical-align: sub;
}
.reveal small {
  font-size: 0.7em;
}

/*********************************************
 * DOUBLE COLUMN LAYOUT
 *********************************************/
.reveal .column {
  width: 49%;
}
.reveal .column:first-of-type {
  float: left;
  margin-right: 1%;
}
.reveal .column:last-of-type {
  float: right;
  margin-left: 1%;
}
.reveal .column:first-of-type ul,
.reveal .column:first-of-type ol,
.reveal .column:first-of-type dl,
.reveal .column:first-of-type p,
.reveal .column:first-of-type h2,
.reveal .column:first-of-type h3,
.reveal .column:first-of-type pre,
.reveal .column:first-of-type table,
.reveal .column:first-of-type figure,
.reveal .column:first-of-type video {
  margin-right: 0;
}
.reveal .column:last-of-type ul,
.reveal .column:last-of-type ol,
.reveal .column:last-of-type dl,
.reveal .column:last-of-type p,
.reveal .column:last-of-type h2,
.reveal .column:last-of-type h3,
.reveal .column:last-of-type pre,
.reveal .column:last-of-type table,
.reveal .column:last-of-type figure,
.reveal .column:last-of-type video {
  margin-left: 0;
}

/*********************************************
 * LISTS
 *********************************************/
.reveal ol,
.reveal dl,
.reveal ul {
  display: inline-block;
}
.reveal ol {
  list-style-type: decimal;
}
.reveal ul {
  list-style-type: disc;
}
.reveal ul ul {
  list-style-type: circle;
}
.reveal li {
  margin-left:  1em;
  margin-right: 0;
  margin-bottom: 1ex;
}

.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul,
.reveal ul dl,
.reveal ol dl {
  display: block;
  margin-left: 0.5em;
}
.reveal li li {
  font-size: 0.9em;
  margin-bottom: 0;
}
.reveal li p {
  margin-left: 0;
}

/* description list */
.reveal dt {
  margin-top: 1ex;
  font-family: var(--csc-code-font-family);
  font-weight: bold;
}
.reveal dt:first-child,
.reveal dl dl dt {
  margin-top: 0;
}
.reveal dd {
  margin-left: 1em;
}
.reveal dd dl {
  margin-left: 0;
  margin-right: 0;
}
.reveal ul dl dd,
.reveal ol dl dd,
.reveal dd dl dd {
  font-size: 0.8em;
}
.reveal dl p:first-child {
  margin-top: 0;
}
.reveal dd p {
  margin-left: 0;
}
.reveal .split-definition dd dl,
.reveal .split-def-2 dd dl {
  column-count: 2;
  column-width: calc(0.5 * (var(--xsize) - 2 * var(--xmargin)) - 1em);
}
.reveal .split-def-3 dd dl {
  column-count: 3;
  column-width: calc(0.33 * (var(--xsize) - 2 * var(--xmargin)) - 1em);
}
.reveal .split-def-3 dd dl dt {
  font-size: 0.9em;
}
.reveal .split-def-3 dd dl dd {
  font-size: 0.7em;
}


/*********************************************
 * CODE
 *********************************************/
.reveal div.sourceCode {
  margin-top: 0.1em;
  margin-bottom: 0.1em;
}
.reveal pre {
  display:       block;
  margin-top:    2px;
  margin-bottom: 1ex;
  font-size:     0.7em;
  line-height:   1.2;
  word-wrap:     break-word;
  border:        2px solid;
}
.reveal pre,
.reveal code,
.reveal code.sourceCode,
.reveal code.sourceCode > span {
  font-family: var(--csc-code-font-family);
  color:       var(--c-primary-900);
}
.reveal pre code {
  display:    block;
  padding:    5px;
  overflow:   auto;
  max-height: calc(0.735 * var(--ysize));
  word-wrap:  normal;
  white-space: pre;
  font-family: var(--csc-code-font-family);
}
.reveal code {
  white-space: pre-wrap;
}
.reveal p code {
  padding-left:  0.1em;
  padding-right: 0.1em;
}
.reveal code.input {
  color: var(--csc-orange);
}
.reveal code.output {
  color: var(--csc-blue);
}
.reveal code.ghost {
  color: transparent;
}
.reveal mark {
  background-color: var(--csc-highlight);
}

/*********************************************
 * TABLES
 *********************************************/
.reveal table {
  margin-bottom: 1ex;
  border-collapse: collapse;
  border-spacing: 0;
}
.reveal table th {
  font-weight: bold;
}
.reveal table th,
.reveal table td {
  padding: 0.2em 0.5em 0.2em 0.5em;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
  text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
  text-align: right;
}
.reveal table th[align="left"],
.reveal table td[align="left"] {
  text-align: left;
}
/* cell highlight */
.reveal table strong em,
.reveal table b em {
  color: var(--csc-orange);
  font-style: normal;
  font-weight: normal;
}
/* default style w/ only some horisontal lines */
.reveal table thead {
  border-top: 4px solid;
  border-bottom: 2px solid;
}
.reveal table tbody {
  border-bottom: 4px solid;
}
/* alternative style w/ color accents */
.reveal .table-colour table th,
.reveal .table-colour table td:first-child {
  color: var(--csc-blue);
  font-weight: normal;
}
.reveal .table-colour table strong, b {
  color: var(--csc-blue);
  font-weight: normal;
}
/* alternative style w/ visible cells in colour */
.reveal .table-grid table {
  border-collapse: separate;
  border-spacing: 0.1ex;
}
.reveal .table-grid table th,
.reveal .table-grid table td {
  padding: 0.1em 0.5em 0.1em 0.5em;
  background-color: var(--csc-blue);
  color: white;
}
.reveal .table-grid table thead,
.reveal .table-grid table tbody {
  border: none;
}
/* alternative style w/out any extra styling */
.reveal .table-none table thead,
.reveal .table-none table tbody {
  border: none;
}
.reveal .table-none table th {
  font-weight: normal;
}
.reveal .table-none table strong em,
.reveal .table-none table b em {
  color: var(--c-primary-900);
  font-style: italic;
  font-weight: bold;
}

/*********************************************
 * LINKS
 *********************************************/
.reveal a {
  color: #2a76dd;
  text-decoration: none;
  -webkit-transition: color .15s ease;
  -moz-transition: color .15s ease;
  transition: color .15s ease; }

.reveal a:hover {
  color: #6ca0e8;
  text-shadow: none;
  border: none; }

.reveal .roll span:after {
  color: #fff;
  background: #1a53a1; }

/*********************************************
 * IMAGES
 *********************************************/
.reveal section img {
  border: 0;
  box-shadow: none;
}
.reveal section img.border {
  border: 4px solid #222;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal section img.center {
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.reveal a img {
  -webkit-transition: all .15s linear;
  -moz-transition: all .15s linear;
  transition: all .15s linear;
}
.reveal a:hover img {
  background: rgba(255, 255, 255, 0.2);
  border-color: #2a76dd;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}

/*********************************************
 * NAVIGATION CONTROLS
 *********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
  border-right-color: #2a76dd; }

.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
  border-left-color: #2a76dd; }

.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
  border-bottom-color: #2a76dd; }

.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
  border-top-color: #2a76dd; }

.reveal .controls .navigate-left.enabled:hover {
  border-right-color: #6ca0e8; }

.reveal .controls .navigate-right.enabled:hover {
  border-left-color: #6ca0e8; }

.reveal .controls .navigate-up.enabled:hover {
  border-bottom-color: #6ca0e8; }

.reveal .controls .navigate-down.enabled:hover {
  border-top-color: #6ca0e8; }

/*********************************************
 * PROGRESS BAR
 *********************************************/
.reveal .progress {
  background: rgba(0, 0, 0, 0.2);
}
.reveal .progress span {
  background: #2a76dd;
  -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
  -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
  transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
}

/*********************************************
 * CSC SPECIAL SLIDES
 *********************************************/

/* Title slide */

.reveal .slides section.slide.title ,
.reveal .slides .pdf-page section.slide.title {
  margin-top:   calc(0.412 * var(--ysize))                !important;
  margin-left:  calc(0.291 * var(--xsize))                !important;
  margin-right: 0                                         !important;
  max-width:    calc(var(--xsize) - 0.291 * var(--xsize)) !important;
}
.reveal section.slide.title * {
  color:       var(--csc-dark-blue);
  text-align:  left;
}
.reveal section.slide.title h1 {
  font-size:   1.4em;
  font-weight: bold;
  line-height: 1.2;
}
.reveal section.slide.title h1:first-child {
  padding-bottom: 1ex;
}
.reveal section.slide.title p {
  font-size: 0.6em;
}

/* Section slide */

.reveal .slides section.slide.section ,
.reveal .slides .pdf-page section.slide.section {
  margin-top:   calc(0.412 * var(--ysize))                !important;
}
.reveal section.slide.section h1:first-child {
  padding-bottom: 1ex;
}
.reveal section.slide.section p {
  font-size: 0.8em;
}

/* Author slide */

.reveal .slides section.slide.author,
.reveal .slides .pdf-page section.slide.author {
  margin-top:  calc(0.58 * var(--ysize))                  !important;
  margin-left: calc(0.24 * var(--xsize))                  !important;
}
.reveal section.slide.author {
  text-align:    left;
  font-size:     0.5em;
}
.reveal section.slide.author h1,
.reveal section.slide.author div {
  padding-bottom: 1.4em;
}
.reveal section.slide.author h1 {
  font-weight: bold;
}
.reveal section.slide.author img {
  position: absolute;
  top:   0;
  left:  calc(-0.167 * var(--xsize));
  width: calc(0.142 * var(--xsize));
  max-width:  unset;
  max-height: unset;
  border: 0;
}
