/* // VARIABLES // */

:root {
  /* colors */
  --ko_green: #8ebd82;
  --txtheader_hover: black;
  --txtfooter: black;
  --txtfooter_hover: #f2f2f2;

  /* dark mode */
  --bgheader_dark: #1b1c1b;
  --bgheaderlink_dark: #6b6c6b;
  --txtheader_dark: #e0e0e0;
  --bgmain_dark: #292a29; /* also body */
  --txtmain_dark: #f2f2f2;
  --txtmain_dark_hover: black;
  --txtlogo_dark:#ddd;
  --contentbox_dark: #3b3d3b;
  --bgfooter_dark: #767876;
  --dark_opacity: 0.8;

    /* light mode */
  --bgheader_light: #828482;
  --bgheaderlink_light: #bbbcbb;
  --txtheader_light: #f2f2f2;
  --bgmain_light: #f4f5f4; /* also body */
  --txtmain_light: black;
  --txtmain_light_hover: #333433;
  --txtlogo_light:#111;
  --contentbox_light: #fcfdfc;
  --bgfooter_light: #cccdcc;

  /* fonts */
  --fontmain: 'PT Root Light','Arial','Arial Black';
  --fontemph: 'PT Root Regular'; /* emphasis */
  --fonticons: 'Material Icons Rounded Regular';
  --fontsize_icons: 18px;
  --fontsize_header: 18px;

  --fontsize_main: 16px;

  --fontsize_footer: 14px;

  --fontsize_h1: 38px;
  --fontsize_h2: 26px;
  --fontsize_h3: 20px;

  --fontsize_h5: 14px;
}


/* // FONTS // */

@font-face {
  font-family: 'Material Icons Rounded Regular';
  font-style:normal;
  font-weight: 400;
  src: url(./fonts/maticns_rnd.woff2);
  src: local('Material Icons'),
    local('MaterialIcons-Rounded'),
    url(./fonts/maticns_rnd.woff2) format('woff2');
}

@font-face {
  font-family: 'Arial Black';
  src: url(./fonts/ariblk.woff2);
  src: local('Arial Black'),
    local('Arial Black'),
    url(./fonts/ariblk.woff2) format('woff2');
}

@font-face {
  font-family: 'PT Root Light';
  src: url(./fonts/pt-rt_lite.woff2);
  src: local('PT Root Light'),
    local('PT Root Light'),
    url(./fonts/pt-rt_lite.woff2) format('woff2');
}

@font-face {
  font-family: 'PT Root Regular';
  src: url(./fonts/pt-rt_reg.woff2);
  src: local('PT Root Regular'),
    local('PT Root Regular'),
    url(./fonts/pt-rt_reg.woff2) format('woff2');
}

.material-icons {
  font-family: var(--fonticons);
  font-weight: normal;
  font-style: normal;
  font-size: var(--fontsize_icons);
  display: inline-block;
  line-height: 0;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  vertical-align: -3px;
  /* Safari, Chrome. */
  text-rendering: optimizeLegibility;
  /* WebKit  */
  -webkit-font-smoothing: antialiased;
  /* Firefox. */
  -moz-osx-font-smoothing: grayscale;
}

.font20 {
  font-size: 20px;
}

.font24 {
  font-size: 24px;
  vertical-align: -6px;
}

.ko_logotxt {
  font-weight: normal;
  font-size: var(--fontsize_h1);
  line-height: 1;
}


/* // GENERAL // */

* {
  box-sizing: border-box;
  transition: all .3s ease;
  scroll-behavior: smooth;
  scroll-snap-align: top;
  scroll-snap-type: x;
}

h1 {
  font-size: var(--fontsize_h1);
}

h2 {
  font-weight: normal;
  font-size: var(--fontsize_h2);
}

h3 {
  font-weight: normal;
  font-size: var(--fontsize_h3);
}

h5 {
  font-weight: normal;
  font-size: var(--fontsize_h5);
  line-height: 0;
}

.bold {
  font-weight: bold;
}

.hide {
  visibility: hidden;
}

.noshow {
  display: none;
}

/*
div + ul { margin-top: 0.5em; }
ul + div { margin-top: -0.5em; }
p + ul { margin-top: -0.5em; }
ul + p { margin-top: -0.5em; }
*/

ul {
  margin-top: -0.5em;
  display: inline-block;
  text-align: left;
  line-height: 1.5;
}

ul.normalspace {
  line-height: 1;
}

ul.nodot {
  list-style-type: none;
  line-height: 1;
  margin: 0;
  padding-left: 0;
}

.leftalign {
  text-align: left;
}

/* // HEADER // */

.header {
  position: sticky;
  top: 0;
  overflow: hidden;
  padding: 10px 10px;
  z-index: 9;
}

.header a {
  float: left;
  display: block;
  text-align: center;
  padding: 14px 14px;
  text-decoration: none;
  font-size: var(--fontsize_header);
  line-height: 25px;
  border-radius: 5px;
}

.header a:hover {
  color: var(--txtheader_hover);
}

.logo-container {
  position: relative;
  width: 60px;
  height: 25px;
}

.header a.logolink {
  background-image: url('./pics/kologo.png');
  background-position: 25px;
  background-size: 40px;
  background-repeat: no-repeat;
  max-width:90px;
}

.header a.logolink:hover {
  background-image: url('./pics/kologo_bw.png');
  background-position: 25px;
  background-size: 40px;
  background-repeat: no-repeat;
  max-width:90px;
}

.header .burger {
  display: none;
  max-width:90px;
}


/* // BODY, MAIN // */

body {
  font-family: var(--fontmain);
  margin: 0;
}

/* container to keep footer always bottom */
.maincontainer {
  position: relative;
  min-height: 100vh;
}

.main {
  text-align: center;
  overflow-y: auto;
  font-size: var(--fontsize_main);
  /* padding-left: 20px; */
  padding-bottom: 4rem;
}

.main a {
  text-decoration: none;
}

/* scrollbox compensates scroll behavior */
.scrollbox {
  height: 2rem;
  margin: 2rem;
  line-height: 0.1;
  font-size: var(--fontsize_h5);
  font-style: italic;
}

/* contentbox contains content and grid */
.contentbox {
  text-align: center;
  overflow: hidden;
  padding: 15px;
  padding-bottom: 25px;
  width: 100%;
  margin-bottom: 200px;
}

/* text on main bg */
.centerbox {
  position: relative;
  display: block;
  padding: 0px 10px;
  margin: auto;
  width: 80%;
  max-width: 1500px;
  text-align: left;
}

/* more info */
details {
  overflow-x: auto;
  overflow-y: hidden;
}

details[open] > summary {
  margin-bottom: 0.5rem;
}

.infobox {
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  border-radius: 6px;
}

/* certifications */
.certs {
  display: flex;
  flex-wrap: wrap;
}

.certs > div {
  flex: 9.5%;
  margin: 6px 6px;
  text-align: center;
  border-radius: 6px;
}

.certbox {
  display: inline-block;
  height: 100px;
}

.topalign {
  vertical-align: top;
  margin-left: 6px;
  margin-right: 6px;
  margin-bottom: 12px;
}


/* grid with three columns (left, middle, right) */
.gridcontainer {
  position: relative;
  display:grid;
  grid-template-areas:
    'left middle right';
  grid-column-gap: 10px;
  grid-auto-rows: 1fr;
}

.left,
.middle,
.right {
  padding: 25px 10px;
  border-style: solid;
  border-width: 2px;
  border-radius: 6px;
  justify-self: center;
  margin-top: 10px;
  min-height: 250px;
}

.left {
  grid-area: left;

}

.middle {
  grid-area: middle;
}

.right {
  grid-area: right;
}

/* contact function button */
.contactbutton {
  background-color: var(--ko_green);
  color: var(--txtmain_light);
  padding: 10px 25px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  border-radius: 6px;
  border-style: solid;
  border-color: var(--bgheader_dark);
  border-width: 2px;
  opacity: var(--dark_opacity);
}

ul.contact {
  display: inline-block;
  text-align: left;
  line-height: 3;
  list-style: none;
}


/* // IMAGE // */


.image {
  width: 100%;
  padding: 20px;
  max-width: 350px;
}

.thumb {
  width: 90%;
  margin-top: 6px;
  max-width: 200px;
  border-radius: 6px;
}

/* // FOOTER // */

.footer {
  bottom: 0px;
  width: 100%;
  display: table;
  clear: both;
  font-size: var(--fontsize_footer);
  font-weight: lighter;
  position: absolute;
  bottom: 0;
  overflow: hidden;
}

.three_column {
  float: left;
  width: 33.33%;
  padding: 10px;
  height: 4rem;
  line-height: 3rem;
  display: block;
}

/*
.row {
  content: "";
  display: table;
  clear: both;
} */

/* footer weblinks */
.footer a {
  float: center;
  display: block;
  color: var(--txtfooter);
  text-decoration: none;
  align-self: right;
  text-align: right;
  height: 3rem;
  line-height: 2rem;
  border-radius: 5px;
  padding: .5rem;
}

.footer a:hover {
  color: var(--txtfooter_hover);
}

.footer a.linkedin {
  content: url('./pics/linkedin_z.png');
  padding: .5rem;
  width: 3rem;
  height: 3rem;
  margin: 0 auto;
  display: block;
}

.footer a.linkedin:hover {
  content: url('./pics/linkedin_w.png');

}

.footer a.jumptotop:hover {
  position: relative;
  animation-name: jump;
  animation-duration: 1s;
  animation-iteration-count: 3;
}


/* // DEVICE LIGHT & DARK SCHEME // */

@media (prefers-color-scheme: dark) {

  body {
    background-color: var(--bgmain_dark);
  }

  .header {
    background-color: var(--bgheader_dark);
    color: var(--txtheader_dark);
  }

  .header a {
    color: var(--txtheader_dark);
  }

  .header a.logolink {
    opacity: var(--dark_opacity);
  }

  .header a:hover {
    background-color: var(--bgheaderlink_dark);
  }

  .main {
    background-color: var(--bgmain_dark);
    color: var(--txtmain_dark);
  }

  .main a {
    color: var(--txtmain_dark);
  }

  .main a:hover {
    color: var(--txtmain_dark_hover)
  }

  .ko_logotxt {
    color: var(--txtlogo_dark);
  }

  .image {
    opacity: var(--dark_opacity);
  }

  .infobox {
    background-color: var(--contentbox_dark);
    border-radius: 9px;
    border-color: #444;
  }

  .active, .infobox:hover {
    background-color: var(--bgfooter_dark);
  }

  .thumb {
    background-color: var(--bgheader_dark);
    opacity: var(--dark_opacity);
  }

  .certs > div {
    background-color: var(--contentbox_dark);
  }

  .contentbox {
    background-color: var(--contentbox_dark);
  }

  .left,
  .middle,
  .right {
    border-color: var(--bgmain_dark);
  }

  .footer {
    background: var(--bgfooter_dark);
  }

  .footer a.linkedin {
    opacity: var(--dark_opacity);
  }
}

@media (prefers-color-scheme: light) {

  body {
    background-color: var(--bgmain_light);
    font-family: var(--fontemph);
  }

  .header {
    background-color: var(--bgheader_light);
    color: var(--txtheader_light);
  }

  .header a {
    color: var(--txtheader_light);
  }

  .header a:hover {
    background-color: var(--bgheaderlink_light);
  }

  .main {
    background-color: var(--bgmain_light);
    color: var(--txtmain_light);
  }

  .main a {
    color: var(--txtmain_light);
  }

  .main a:hover {
    color: var(--txtmain_light_hover);
  }

  .ko_logotxt {
    color: var(--txtlogo_light);
  }

  .infobox {
    background-color: var(--bgfooter_light);
  }

  .active, .infobox:hover {
    background-color: var(--bgfooter_dark);
  }

  .thumb {
    background-color: none;
    opacity: 1;
  }

  .certs > div {
    background-color: var(--bgfooter_light);
  }

  .contentbox {
    background-color: var(--contentbox_light);
  }

  .left,
  .middle,
  .right {
    border-color: var(--bgmain_light);
  }

  .footer {
    background: var(--bgfooter_light);
  }
}


/* // SLIMFOONCOMPATIBILITY // */

@media screen and (max-width: 900px) {
  .gridcontainer  {
    grid-template-areas:
      'left'
      'middle'
      'right';
  }

  .centerbox {
    width: 90%;
  }

  .certs > div {
    flex: 25%;
  }

}

@media screen and (max-width: 565px) {
  .header a:not(:first-child) {display: none;}
  .header a.burger {
    float: right;
    display: block;
  }

  .header.ham {
    position: sticky;
    top: 0;
  }
  .header.ham .burger {
    position: absolute;
    right: 10px;
    top: 10px;
  }
  .header.ham a {
    float: none;
    display: block;
    text-align: left;
  }

  .certs > div {
    flex: 50%;
  }

}


/* // ANIMATIONS // */

@keyframes jump {
  0%   {top:0px;}
  34%  {top:-5px;}
  100% {top:0px;}
}
