/* MVP.css v1.12 - https://github.com/andybrewer/mvp */

:root {
    --accent-bg: #2e5766;
    --active-brightness: 0.85;
    --base-fontsize: 1.15rem;
    --border: #d8dae1;
    --border-radius: 5px;
    --box-shadow: 2px 2px 10px;
    --color-accent: #118bee15;
    --color-bg: #fff0e5;
    --color-bg-secondary: #e9e9e9;
    --color-link: #000;
    --color-secondary: #920de9;
    --color-secondary-accent: #920de90b;
    --color-shadow: #f4f4f4;
    --color-table: #118bee;
    --color-text: #000;
    --color-text-secondary: #999;
    /* https://modernfontstacks.com */
    --font-family: Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --header-scale: 1.25;
    --hover-brightness: 1.2;
    --intro-bg: rgba(219, 219, 219, 0.5);
    --justify-important: center;
    --justify-normal: left;
    --line-height: 1.618;
    --width-card: 285px;
    --width-card-medium: 460px;
    --width-card-wide: 800px;
    --width-content: 900px;
}

@media (prefers-color-scheme: dark) {
    :root[color-mode="user"] {
        --color-accent: #0097fc4f;
        --color-bg: #333;
        --color-bg-secondary: #555;
        --color-link: #0097fc;
        --color-secondary: #e20de9;
        --color-secondary-accent: #e20de94f;
        --color-shadow: #bbbbbb20;
        --color-table: #0097fc;
        --color-text: #f7f7f7;
        --color-text-secondary: #aaa;
    }
}

/* mobile first would be:
@media screen and (min-width: 768px) {
*/
/* mobile */
@media
only screen and (-webkit-min-device-pixel-ratio: 3),
only screen and (min--moz-device-pixel-ratio: 3),
only screen and (-o-min-device-pixel-ratio: 3/1),
only screen and (min-device-pixel-ratio: 3),
only screen and (max-width: 720px) {
  .share-buttons {
    margin: 0 auto;
    width: 100%;
  }
  /* hide some menu items */
  .mobile-hide {
    display: none;
  }
  
  span.post-meta.mobile-hide {
    display: none;
  }
  
  ul.recent-list li {
    display: inline-block;
    border-left: 2px solid var(--intro-bg);
    padding-left: 0.5rem;
    margin-bottom: 0.5rem; /* Adjust this value as needed */
  }
  
  article {    
      display: block;
      margin-left: auto;
      margin-right: auto;
      max-width: 95%;tr
  }
  
  textarea,
  select,
  input {
    width: 100%;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2.1rem;
  }
  
  h3 {
    font-size: 1.75rem;
  }
  
  h4 {
    font-size: 1.25rem;
  }
}

/* Layout */
html {
  /* Set the font globally */
  font-family: var(--font-family);
  font-size: 1.1rem;
}

article aside {
    background: var(--color-secondary-accent);
    border-left: 4px solid var(--color-secondary);
    padding: 0.01rem 0.8rem;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
    line-height: var(--line-height);
    margin: 0;
    overflow-x: hidden;
    padding: 0;
}

header,
main {
    margin: 0 auto;
    max-width: var(--width-content);
    padding-left: 1rem;
}

hr {
    background-color: var(--color-bg-secondary);
    border: none;
    height: 1px;
    margin: 2rem 0;
    width: 100%;
}

section {
    display: flex;
    flex-wrap: wrap;
    justify-content: var(--justify-important);
}

section img,
article img {    
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

section pre {
    overflow: auto;
}

section aside {
    border: 1px solid var(--color-bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow) var(--color-shadow);
    margin: 1rem;
    padding: 1.25rem;
    width: var(--width-card);
}

section aside:hover {
    box-shadow: var(--box-shadow) var(--color-bg-secondary);
}

[hidden] {
    display: none;
}

/* Headers */
article header,
div header,
main header {
    padding-top: 0;
}

header {
    text-align: var(--justify-important);
}

header a b,
header a em,
header a i,
header a strong {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

header nav img {
    margin: 1rem 0;
}

section header {
    padding-top: 0;
    width: 100%;
}

/* Nav */
nav {
    align-items: center;
    display: flex;
    font-weight: bold;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline-block;
    margin: 0 0.5rem;
    position: relative;
    text-align: left;
}

/* Nav Dropdown */
nav ul li:hover ul {
    display: block;
}

nav ul li ul {
    background: var(--color-bg);
    border: 1px solid var(--color-bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow) var(--color-shadow);
    display: none;
    height: auto;
    left: -2px;
    padding: .5rem 1rem;
    position: absolute;
    top: 1.7rem;
    white-space: nowrap;
    width: auto;
}

nav ul li ul::before {
    /* fill gap above to make mousing over them easier */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -0.5rem;
    height: 0.5rem;
}

nav ul li ul li,
nav ul li ul li a {
    display: block;
    transition: color 0.3s ease, background-color 0.3s ease;
}
  
nav ul li a:hover {
    background-color: rgba(104, 196, 12, 1);
    filter: brightness(var(--hover-brightness));
}

/* Typography */
code,
samp {
    background-color: var(--color-accent);
    border-radius: var(--border-radius);
    color: var(--color-text);
    display: inline-block;
    font-size: 0.9rem;
    margin: 0 0.1rem;
    padding: 0 0.3rem;
}

details {
    margin: 1.3rem 0;
}

details summary {
    font-weight: bold;
    cursor: pointer;
}

/* Format headers */
h1 {
  font-size: calc(var(--base-fontsize) * var(--header-scale) * var(--header-scale) * var(--header-scale) * var(--header-scale));
  margin-top: calc(var(--line-height) * 0.5rem);
}

h2 {
  font-family: var(--font-family);
  font-size: calc(var(--base-fontsize) * var(--header-scale) * var(--header-scale) * var(--header-scale));
  margin-top: calc(var(--line-height) * 0.5rem);
}

h3 {
  font-family: var(--font-family);
  font-size: calc(var(--base-fontsize) * var(--header-scale) * var(--header-scale));
  margin-top: calc(var(--line-height) * 0.5rem);
}

h4 {
  font-family: var(--font-family);
  font-size: calc(var(--base-fontsize) * var(--header-scale));
  margin-top: calc(var(--line-height) * 0.5rem);
}

h5 {
  font-size: var(--base-fontsize);
  margin-top: calc(var(--line-height) * 0.5rem);
}

h6 {
  font-size: calc(var(--base-fontsize) / var(--header-scale));
  margin-top: calc(var(--line-height) * 0.1rem);
}

mark {
    padding: 0.1rem;
}


ol li,
ul li {
    list-style-position: inside;
    padding: 0.2rem 0;
}

p {
    margin: 0.75rem 0;
    padding: 0;
    width: 100%;
}

pre {
    margin: 1rem 0;
    max-width: var(--width-card-wide);
    padding: 1rem 0;
}

pre code,
pre samp {
    display: block;
    max-width: var(--width-card-wide);
    padding: 0.5rem 2rem;
    white-space: pre-wrap;
}

small {
    color: var(--color-text-secondary);
}

sup {
    background-color: var(--color-secondary);
    border-radius: var(--border-radius);
    color: var(--color-bg);
    font-size: xx-small;
    font-weight: bold;
    margin: 0.2rem;
    padding: 0.2rem 0.3rem;
    position: relative;
    top: -2px;
}

/* Links */
a {
    color: var(--color-link);
    display: inline-block;
    /* font-weight: bold; */
    text-decoration: underline;
    transition: color 0.3s ease, background-color 0.3s ease;
}

a:active {
    filter: brightness(var(--active-brightness));
    text-decoration: underline;
}

main a:hover {
    background-color: rgba(104, 196, 12, 1);
    filter: brightness(var(--hover-brightness));
    text-decoration: underline;
}

a b,
a em,
a i,
a strong,
button,
input[type="submit"] {
    border-radius: var(--border-radius);
    display: inline-block;
    font-size: medium;
    font-weight: bold;
    line-height: var(--line-height);
    margin: 0.5rem 0;
    padding: 1rem 2rem;
}

button,
input[type="submit"] {
    font-family: var(--font-family);
}

button:active,
input[type="submit"]:active {
    filter: brightness(var(--active-brightness));
}

button:hover,
input[type="submit"]:hover {
    cursor: pointer;
    filter: brightness(var(--hover-brightness));
}

a b,
a strong,
button,
input[type="submit"] {
    background-color: var(--color-link);
    border: 2px solid var(--color-link);
    color: var(--color-bg);
}

a em,
a i {
    border: 2px solid var(--color-link);
    border-radius: var(--border-radius);
    color: var(--color-link);
    display: inline-block;
    padding: 1rem 2rem;
}

article aside a {
    color: var(--color-secondary);
}

/* Images */
figure {
    margin: 0;
    padding: 0;
}

figure img {
    max-width: 100%;
}

figure figcaption {
    color: var(--color-text-secondary);
}

/* Forms */
button:disabled,
input:disabled {
    background: var(--color-bg-secondary);
    border-color: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    cursor: not-allowed;
}

button[disabled]:hover,
input[type="submit"][disabled]:hover {
    filter: none;
}

form {
    border: 1px solid var(--color-bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow) var(--color-shadow);
    display: block;
    max-width: var(--width-card-wide);
    min-width: var(--width-card);
    padding: 1.5rem;
    text-align: var(--justify-normal);
}

form header {
    margin: 1.5rem 0;
    padding: 1.5rem 0;
}

input,
label,
select,
textarea {
    display: block;
    font-size: inherit;
    max-width: var(--width-card-wide);
}

input[type="checkbox"],
input[type="radio"] {
    display: inline-block;
}

input[type="checkbox"]+label,
input[type="radio"]+label {
    display: inline-block;
    font-weight: normal;
    position: relative;
    top: 1px;
}

input[type="range"] {
    padding: 0.4rem 0;
}

input,
select,
textarea {
    border: 1px solid var(--color-bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    padding: 0.4rem 0.8rem;
}

input[type="text"],
textarea {
    width: calc(100% - 1.6rem);
}

input[readonly],
textarea[readonly] {
    background-color: var(--color-bg-secondary);
}

label {
    font-weight: bold;
    margin-bottom: 0.2rem;
}

/* Popups */
dialog {
    border: 1px solid var(--color-bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow) var(--color-shadow);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    z-index: 999;
}

/* Tables */
table {
    border: 1px solid var(--color-bg-secondary);
    border-radius: var(--border-radius);
    border-spacing: 0;
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
    padding: 0;
    white-space: nowrap;
}

table td,
table th,
table tr {
    padding: 0.4rem 0.8rem;
    text-align: var(--justify-important);
}

table thead {
    background-color: var(--color-table);
    border-collapse: collapse;
    border-radius: var(--border-radius);
    color: var(--color-bg);
    margin: 0;
    padding: 0;
}

table thead th:first-child {
    border-top-left-radius: var(--border-radius);
}

table thead th:last-child {
    border-top-right-radius: var(--border-radius);
}

table thead th:first-child,
table tr td:first-child {
    text-align: var(--justify-normal);
}

table tr:nth-child(even) {
    background-color: var(--color-accent);
}

/* Quotes */
blockquote {
    border-left: .35rem solid var(--accent-bg);
    font-style: italic;
    margin: 2rem 0 2rem 2rem;
    opacity: .8;
    padding: .4rem .8rem;
}

blockquote footer {
    color: var(--color-text-secondary);
    display: block;
    font-size: small;
    line-height: var(--line-height);
    padding: 1.5rem 0;
}

footer {
  margin-top: 4rem;
  padding: 2rem 1rem 1.5rem 1rem;
  color: var(--text-light);
  font-family: var(--font-family);
  font-size: .7rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--light) !important;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
}

/* mine */
.intro {
  background-color: var(--intro-bg);
  border-color: transparent;
  border-radius: 0.375rem;
  font-size: 1rem;
  margin: 1rem 0.5rem 3rem;
  padding: 0.75rem;
}

.intro a,
.intro a:visited {
  color: var(--accent-bg);
  text-decoration: underline;
  text-decoration-style: dotted;
}

span.post-meta {
  background: var(--intro-bg);
  border-color: transparent;
  border-radius: 0.175rem;
  display: inline-block;
  font-size: .8rem;
  font-weight: normal;
  text-align: center;
  /* top+bottom left+right */
  padding: .3rem .5rem;
  width: 6rem;
}

/* Recents + Posts list */
ul.recent-list {
  list-style-type: none;
  padding: 0;
}

ul.recent-list li {
  display: inline-block;
  /* Add your other styles here */
}

ul.recent-list a {
  font-size: 1rem; 
  font-weight: 500;
  color: var(--accent-bg);
}

ul.post-list {
  font-family: var(--font-family);
  list-style-type: none;
  padding: 0;
}

ul.post-list a {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 500;
  /* background: var(--accent); */
  color: var(--accent-bg);
  /* font-weight: bold; */
  /* padding: .5rem .5rem; */
  text-decoration: underline;
  transition: .25s .1s ease-in-out;
}

ul.post-list li {
  /* color: var(--border); */
  margin-bottom: 0.5rem;
  text-align: left;
}

/* list */
span.date {
  font-size: 0.8rem;
}

/* 512kb.club */
.kb-club a {
  color: #212121;
  font-weight: bold;
  font-family: var(--font-family);
  padding: .25rem 0;
  text-decoration: none;
  transition: .4s;
}

.kb-club a:hover {
  background: #BBDEFB;
}

.kb-club-bg,
.kb-club-no-bg {
  border: 2px solid #4caf50;
  padding: .25rem .5rem;
}

.kb-club-bg {
  background: #4caf50;
  color: #212121;
}

.video-container {
  height: 0;
  overflow: hidden;
  padding-bottom: 56.25%;
  padding-top: 30px;
  position: relative;  
}

.video-container iframe, .video-container object, .video-container embed {
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;  
}

/* tinyletter sub */

.tinyletter {
    margin: 20px auto;
    max-width: 500px;
    width: 100%;
}

.tinyletter input {
    height: 50px;
    padding: 0 0 0 10px;
    width: 100%;
    outline: none;
    border: 1px solid #e3e3e3;
    color: #141414;
    font-size: 1.3rem;
    border-radius: 5px;
    appearance: none;
}

.tinyletter .form-button {
    min-width: 110px;
    height: 40px;
    top: 5px;
    right: -5px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
    outline: none;
    border: 0;
    color: white;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    background-color: #333333;
    border-radius: 4px;
    cursor: pointer;
}

/*
.tinyletter {
  border: .05rem solid #ccc;
  margin: 3rem 1rem 1rem 1rem;
}

.tinyletter input {
  align-items: center;
  padding: 1rem;
  
}
*/

/* moved from share-buttons.html partial */
.share-buttons {
  margin: 2rem 0rem 2rem 0rem;
}
.resp-sharing-button__link,
.resp-sharing-button__icon {
  display: inline-block
}

.resp-sharing-button__link {
  text-decoration: none;
  color: #fff !important;
  margin: {{ $buttonMargin }}
}

.resp-sharing-button {
  border-radius: 5px;
  transition: 25ms ease-out;
  padding: 0.5em 0.75em;
  font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
  {{ if (isset .Site.Params.ShareButtons "fontsize" ) }}
  font-size: {{ .Site.Params.ShareButtons.FontSize }}
  {{ end }}
}

.resp-sharing-button__icon svg {
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: middle
}

.resp-sharing-button--small svg {
  margin: 0;
  vertical-align: middle
}

/* Non solid icons get a stroke */
.resp-sharing-button__icon {
  stroke: #fff;
  fill: none
}

/* Solid icons get a fill */
.resp-sharing-button__icon--solid,
.resp-sharing-button__icon--solidcircle {
  fill: #fff;
  stroke: none
}

.resp-sharing-button--twitter {
  background-color: #55acee
}

.resp-sharing-button--twitter:hover {
  background-color: #2795e9
}

.resp-sharing-button--pinterest {
  background-color: #bd081c
}

.resp-sharing-button--pinterest:hover {
  background-color: #8c0615
}

.resp-sharing-button--facebook {
  background-color: #3b5998
}

.resp-sharing-button--facebook:hover {
  background-color: #2d4373
}

.resp-sharing-button--tumblr {
  background-color: #35465C
}

.resp-sharing-button--tumblr:hover {
  background-color: #222d3c
}

.resp-sharing-button--reddit {
  background-color: #ff4500
}

.resp-sharing-button--reddit:hover {
  background-color: #3a80c1
}

.resp-sharing-button--google {
  background-color: #dd4b39
}

.resp-sharing-button--google:hover {
  background-color: #c23321
}

.resp-sharing-button--linkedin {
  background-color: #0077b5
}

.resp-sharing-button--linkedin:hover {
  background-color: #046293
}

.resp-sharing-button--email {
  background-color: #777
}

.resp-sharing-button--email:hover {
  background-color: #5e5e5e
}

.resp-sharing-button--xing {
  background-color: #1a7576
}

.resp-sharing-button--xing:hover {
  background-color: #114c4c
}

.resp-sharing-button--whatsapp {
  background-color: #25D366
}

.resp-sharing-button--whatsapp:hover {
  background-color: #1da851
}

.resp-sharing-button--hackernews {
  background-color: #FF6600
}
.resp-sharing-button--hackernews:hover, .resp-sharing-button--hackernews:focus {
  background-color: #FB6200
}

.resp-sharing-button--vk {
  background-color: #507299
}

.resp-sharing-button--vk:hover {
  background-color: #43648c
}

.resp-sharing-button--facebook {
  background-color: #3b5998;
  border-color: #3b5998;
}

.resp-sharing-button--facebook:hover,
.resp-sharing-button--facebook:active {
  background-color: #2d4373;
  border-color: #2d4373;
}

.resp-sharing-button--twitter {
  background-color: #55acee;
  border-color: #55acee;
}

.resp-sharing-button--twitter:hover,
.resp-sharing-button--twitter:active {
  background-color: #2795e9;
  border-color: #2795e9;
}

.resp-sharing-button--tumblr {
  background-color: #35465C;
  border-color: #35465C;
}

.resp-sharing-button--tumblr:hover,
.resp-sharing-button--tumblr:active {
  background-color: #222d3c;
  border-color: #222d3c;
}

.resp-sharing-button--email {
  background-color: #777777;
  border-color: #777777;
}

.resp-sharing-button--email:hover,
.resp-sharing-button--email:active {
  background-color: #5e5e5e;
  border-color: #5e5e5e;
}

.resp-sharing-button--pinterest {
  background-color: #bd081c;
  border-color: #bd081c;
}

.resp-sharing-button--pinterest:hover,
.resp-sharing-button--pinterest:active {
  background-color: #8c0615;
  border-color: #8c0615;
}

.resp-sharing-button--linkedin {
  background-color: #0077b5;
  border-color: #0077b5;
}

.resp-sharing-button--linkedin:hover,
.resp-sharing-button--linkedin:active {
  background-color: #046293;
  border-color: #046293;
}

.resp-sharing-button--reddit {
  background-color: #ff4500;
  border-color: #ff4500;
}

.resp-sharing-button--reddit:hover,
.resp-sharing-button--reddit:active {
  background-color: #ff5700;
  border-color: #ff5700;
}

.resp-sharing-button--xing {
  background-color: #1a7576;
  border-color: #1a7576;
}

.resp-sharing-button--xing:hover
.resp-sharing-button--xing:active {
  background-color: #114C4C;
  border-color: #114C4C;
}

.resp-sharing-button--whatsapp {
  background-color: #25D366;
  border-color: #25D366;
}

.resp-sharing-button--whatsapp:hover,
.resp-sharing-button--whatsapp:active {
  background-color: #1DA851;
  border-color: #1DA851;
}

.resp-sharing-button--hackernews {
  background-color: #FF6600;
  border-color: #FF6600;
}

.resp-sharing-button--hackernews:hover
.resp-sharing-button--hackernews:active {
  background-color: #FB6200;
  border-color: #FB6200;
}

.resp-sharing-button--vk {
  background-color: #507299;
  border-color: #507299;
}

.resp-sharing-button--vk:hover
.resp-sharing-button--vk:active {
  background-color: #43648c;
  border-color: #43648c;
}

.resp-sharing-button--telegram {
  background-color: #54A9EB;
}

.resp-sharing-button--telegram:hover {
  background-color: #4B97D1;
}
