/* ===================================
 * Change global settings for Franklin
 * =================================== 
 * Use variables to set the color shame for the page.
 * Fully change the colors by just changing those few variables. 
 * */

:root {
  --block-background: #c7ccd8; /* bloki tekstu */
  --output-background: #FF10F0; /* to chyba nic nie robi */
  --small: 14px;
  --normal: 19px;
  --text-color: #0E1021; /* tekst */
  --sidebar-width: 15.5rem;
  --background-color: #F6F3EC; /* tło */
  --secondary-background-color: #e6ddc9; /* przyciski i pasek między tym na górze i tłem */
  --links-color: #325097; /* adresy e-mail */
  --contrast-text-color: #325097; /* wytłuszczony tekst */
  --header-text-color: #3F4F6E; /* nagłówki */

  --accent-color: #f0ebdf; /* sidebar i to na górze */
  --less-important-text-color: #9B9CBF; /* mniej ważny tekst */
}

body:has(#theme-checkbox:checked) {
  --block-background: #1a1f2e; /* bloki tekstu */
  --text-color: #F6F3EC; /* tekst */
  --background-color: #0e1020; /* tło */
  --secondary-background-color: #232836; /* przycisk i pasek */
  --links-color: #7a99d6; /* adresy e-mail */
  --contrast-text-color: #a0c4ff; /* wytłuszczony tekst */
  --header-text-color: #e8d5c4; /* nagłówki */
  --accent-color: #191e2c; /* sidebar */
  --less-important-text-color: #6b6d8f; /* mniej ważny tekst */
}

/*
 *                        ___
 *                       /\_ \
 *  _____     ___     ___\//\ \      __
 * /\ '__`\  / __`\  / __`\\ \ \   /'__`\
 * \ \ \_\ \/\ \_\ \/\ \_\ \\_\ \_/\  __/
 *  \ \ ,__/\ \____/\ \____//\____\ \____\
 *   \ \ \/  \/___/  \/___/ \/____/\/____/
 *    \ \_\
 *     \/_/
 *
 * Designed, built, and released under MIT license by @mdo. Learn more at
 * https://github.com/poole/poole.
 */

/*
 * Contents
 *
 * Body resets
 * Custom type
 * Messages
 * Container
 * Masthead
 */

/*
 * Body resets
 *
 * Update the foundational and global aspects of the page.
 */

* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  font-family: "Computer Modern Serif", Times, serif;
  font-size: var(--normal);
  scroll-behavior: smooth;
}

body {
  color: var(--text-color);
  background-color: var(--background-color);
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* No `:visited` state is required by default (browsers will use `a`) */
a {
  color: var(--links-color);
  text-decoration: none;
}

a strong {
  /* was in KMPSUJ template */
  color: inherit;
  text-decoration: underline;
}

/* `:focus` is linked to `:hover` for basic accessibility */
a:hover,
a:focus {
  text-decoration: underline;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 0.5rem;
  font-weight: bold;
  line-height: 1.25;
  color: var(--header-text-color);
  text-rendering: optimizeLegibility;
}

h1 {
  font-size: 2rem;
}

h2 {
  margin-top: 1rem;
  font-size: 1.5rem;
}

h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

h4,
h5,
h6 {
  margin-top: 1rem;
  font-size: 1rem;
}

/* Body text */

strong {
  color: var(--contrast-text-color);
}

/* Lists */
ul,
ol,
dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

dt {
  font-weight: bold;
}

dd {
  margin-bottom: 0.5rem;
}

/* Misc */
hr {
  position: relative;
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #fff;
}

abbr {
  font-size: 85%;
  font-weight: bold;
  color: #555;
  text-transform: uppercase;
}

abbr[title] {
  cursor: help;
  border-bottom: 1px dotted #e5e5e5;
}

img {
  display: block;
  margin: 0 0 1rem;
  border-radius: 5px;
}

/* Tables */
table {
  margin-bottom: 1rem;
  width: 100%;
  border: 1px solid #e5e5e5;
  border-collapse: collapse;
}

td,
th {
  padding: 0.25rem 0.5rem;
  border: 1px solid #e5e5e5;
}

tbody tr:nth-child(odd) td,
tbody tr:nth-child(odd) th {
  background-color: var(--block-background);
}

/*
 * Wrapper
 *
 * The wrapper is used to position site content when the sidebar is toggled. We
 * use an outter wrap to position the sidebar without interferring with the
 * regular page content.
 */

.wrap {
  position: relative;
  width: 100%;
}

/*
 * Container
 *
 * Center the page content.
 */

.container {
  max-width: 54rem;
  margin-left: auto;
  margin-right: auto;
}

/*
 * Masthead
 *
 * Super small header above the content for site name and short description.
 * class logo for inserting logotypes on top of your page.
 */

.masthead {
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--secondary-background-color);
  background-color: var(--accent-color);
}

.masthead-title {
  margin-top: 0;
  margin-bottom: 0;
  margin-right: 2%;
  color: var(--text-color);
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: flex-end;
}

.masthead-title a {
  padding-left: 0.1rem;
  padding-right: 0.1rem;
  color: var(--header-text-color);
}

.masthead-title small {
  font-size: 75%;
  font-weight: 400;
  color: var(--text-color);
  letter-spacing: 0;
  padding-left: 1rem;
  padding-right: 1rem;
}

.masthead-title .logo {
  height: 5rem;
  padding: 0.2rem;
}

.masthead-title .logo img {
  display: inline-block;
}

@media (max-width: 48rem) {
  .masthead-title {
    margin-left: 3.5rem;
  }

  .masthead-title small {
    display: none;
  }

  .masthead-title .logo {
    height: 3rem;
    padding: 0.1rem;
  }
}

/*
 * Page footer setup.
 *
 */

.page-foot {
  font-family: "Computer Modern Sans", Arial, sans-serif;
  color: var(--less-important-text-color);
}

/*
 *  ___
 * /\_ \
 * \//\ \      __      ___   __  __    ___     ___
 *   \ \ \   /'__`\  /' _ `\/\ \/\ \  / __`\ /' _ `\
 *    \_\ \_/\ \_\.\_/\ \/\ \ \ \_\ \/\ \_\ \/\ \/\ \
 *    /\____\ \__/.\_\ \_\ \_\/`____ \ \____/\ \_\ \_\
 *    \/____/\/__/\/_/\/_/\/_/`/___/> \/___/  \/_/\/_/
 *                               /\___/
 *                               \/__/
 *
 * Designed, built, and released under MIT license by @mdo. Learn more at
 * https://github.com/poole/lanyon.
 */

/*
 * Contents
 *
 * Sidebar
 * Slide effect
 */

/*
 * Sidebar
 *
 * The sidebar is the drawer, the item we are toggling with our handy hamburger
 * button in the corner of the page.
 *
 * This particular sidebar implementation was inspired by Chris Coyier's
 * "Offcanvas Menu with CSS Target" article, and the checkbox variation from the
 * comments by a reader. It modifies both implementations to continue using the
 * checkbox (no change in URL means no polluted browser history), but this uses
 * `position` for the menu to avoid some potential content reflow issues.
 *
 * Source: http://css-tricks.com/off-canvas-menu-with-css-target/#comment-207504
 */

/* Style and "hide" the sidebar */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: calc(var(--sidebar-width) * -1);
  width: var(--sidebar-width);
  visibility: hidden;
  overflow-y: auto;
  font-family: "Computer Modern Serif", Times, serif;
  font-size: var(--small);
  color: var(--less-important-text-color);
  background-color: var(--accent-color);
  -webkit-transition: all 0.3s ease-in-out;
  transition: transform 0.3s ease-in-out;
}

@media (min-width: 40rem) {
  .sidebar {
    font-size: var(--normal);
  }
}

/* Sidebar content */

.sidebar a {
  font-weight: normal;
  color: var(--header-text-color);
}

.sidebar-about h1 {
  /* About section from KMPSUJ */
  color: var(--header-text-color);
  margin-top: 0;
  font-family: "Computer Modern Serif", Times, serif;
  font-style: italic;
  font-weight: normal;
  font-size: 2.3rem;
  max-width: 100%;
  text-align: center;
}

.sidebar-item {
  padding: 0.5rem;
}

.sidebar-item p:last-child {
  margin-bottom: 0;
}

/* Sidebar nav */
.sidebar-nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav-item {
  display: block;
  padding: 0.5rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav-iner-item {
  display: block;
  /* line-height: 1.75; */
  font-size: 13px;
  text-indent: 12px;
}

.sidebar-nav-item.active,
a.sidebar-nav-item:hover,
a.sidebar-nav-item:focus,
.sidebar-nav-iner-item.active,
a.sidebar-nav-iner-item:hover,
a.sidebar-nav-iner-item:focus {
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: transparent;
}

@media (min-width: 48rem) {
  .sidebar-item {
    padding: 1rem;
  }

  .sidebar-nav-item,
  .sidebar-nav-iner-item {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Hide the sidebar checkbox that we toggle with `.sidebar-toggle` */
.sidebar-checkbox {
  display: none;
}

/* Style the `label` that we use to target the `.sidebar-checkbox` */
.sidebar-toggle {
  position: fixed;
  top: 0.25rem;
  left: 0.25rem;
  display: block;
  width: 2.2rem;
  padding: 0.5rem 0.65rem;
  color: var(--links-color);
  background-color: var(--secondary-background-color);
  border-radius: 4px;
  cursor: pointer;
}

.sidebar-toggle::before {
  display: block;
  content: "";
  width: 100%;
  padding-bottom: 0.125rem;
  border-top: 0.375rem double;
  border-bottom: 0.125rem solid;

  /* Make the border inside the box */
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.sidebar-toggle:active,
#sidebar-checkbox:checked ~ .sidebar-toggle {
  background-color: var(--secondary-background-color);
}

@media (min-width: 30.1rem) {
  .sidebar-toggle {
    width: 2.25rem;
    top: 1rem;
    left: 1rem;
  }

  .sidebar-toggle::before {
    padding-bottom: 0.15rem;
    border-top-width: 0.45rem;
    border-bottom-width: 0.15rem;
  }
}

/* Slide effect
 *
 * Handle the sliding effects of the sidebar and content in one spot, seperate
 * from the default styles.
 *
 * As an a heads up, we don't use `transform: translate3d()` here because when
 * mixed with `position: fixed;` for the sidebar toggle, it creates a new
 * containing block. Put simply, the fixed sidebar toggle behaves like
 * `position: absolute;` when transformed.
 *
 * Read more about it at http://meyerweb.com/eric/thoughts/2011/09/12/.
 */

.wrap,
.sidebar,
.sidebar-toggle {
  -webkit-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  backface-visibility: hidden;
}

.wrap,
.sidebar-toggle {
  -webkit-transition: -webkit-transform 0.3s ease-in-out;
  transition: transform 0.3s ease-in-out;
}

#sidebar-checkbox:checked + .sidebar {
  visibility: visible;
}

#sidebar-checkbox:checked ~ .sidebar,
#sidebar-checkbox:checked ~ .wrap,
#sidebar-checkbox:checked ~ .sidebar-toggle {
  transform: translateX(var(--sidebar-width));
}

code {
  font-size: 16px;
}
