/* reset all styles - source http://meyerweb.com/eric/tools/css/reset/ */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* Custom styles */
/* Color scheme variables */

:root {
    --primary-color: #157EAC;
    --bg-color: #fff;
    --text-color: #595959;
    --heading-color: #157EAC;
    --brand-heading-color: #222;
    --border-color: #ddd;
    --border-color-light: #e2e2e2;
    --border-color-dark: #dedede;
    --timeline-gradient-end: #fff;
    --entry-dot-bg: #fff;
    --code-border: #157EAC;
    --code-bg: #157EAC;
    --window-bg: #fff;
    --window-border: #acacac;
    --window-shadow: #acacac;
    --pagination-text: #a5a5a5;
    --icon-color: #157EAC;
    --code-bg-color: #fff;
    --code-text-color: #000;
}

/* Dark mode using system preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #d0d0d0;
        --heading-color: #4db8e8;
        --brand-heading-color: #e0e0e0;
        --border-color: #444;
        --border-color-light: #333;
        --border-color-dark: #3a3a3a;
        --timeline-gradient-end: #1a1a1a;
        --entry-dot-bg: #1a1a1a;
        --code-border: #4db8e8;
        --code-bg: #4db8e8;
        --window-bg: #2a2a2a;
        --window-border: #555;
        --window-shadow: #000;
        --pagination-text: #888;
        --icon-color: #4db8e8;
        --code-bg-color: #1e1e1e;
        --code-text-color: #d4d4d4;
    }
}

/* Manual dark mode override */
[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #d0d0d0;
    --heading-color: #4db8e8;
    --brand-heading-color: #e0e0e0;
    --border-color: #444;
    --border-color-light: #333;
    --border-color-dark: #3a3a3a;
    --timeline-gradient-end: #1a1a1a;
    --entry-dot-bg: #1a1a1a;
    --code-border: #4db8e8;
    --code-bg: #4db8e8;
    --window-bg: #2a2a2a;
    --window-border: #555;
    --window-shadow: #000;
    --pagination-text: #888;
    --icon-color: #4db8e8;
    --code-bg-color: #1e1e1e;
    --code-text-color: #d4d4d4;
}

/* Manual light mode override */
[data-theme="light"] {
    --primary-color: #157EAC;
    --bg-color: #fff;
    --text-color: #595959;
    --heading-color: #157EAC;
    --brand-heading-color: #222;
    --border-color: #ddd;
    --border-color-light: #e2e2e2;
    --border-color-dark: #dedede;
    --timeline-gradient-end: #fff;
    --entry-dot-bg: #fff;
    --code-border: #157EAC;
    --code-bg: #157EAC;
    --window-bg: #fff;
    --window-border: #acacac;
    --window-shadow: #acacac;
    --pagination-text: #a5a5a5;
    --icon-color: #157EAC;
    --code-bg-color: #fff;
    --code-text-color: #000;
}

/* General styling */

body, html {
    padding:0;
    margin:0;
    font:300 18px/1.5 Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
}

body {
    border-top: 5px solid var(--primary-color);
}

a {
    color: var(--primary-color);
    text-decoration: inherit;
    font-weight: normal;
}

img {
    width: 100%;
}

/* Header styling */

header {
    margin-top: 40px;
}

#brand-a {
    font-size: 26px;
    color: inherit;
    text-decoration: inherit;
}

#brand-1 {
    font-size: 26px;
    color: var(--brand-heading-color);
    font-weight: bold;
}

#brand-2 {
    font-size: 26px;
    color: var(--primary-color);
    font-weight: bold;
}

#author {
    float: right;
    text-align: right;
    margin-top: 8px;
}

/* Theme toggle styling */
#theme-toggle {
    float: right;
    margin-left: 15px;
    margin-top: 8px;
    cursor: pointer;
    font-size: 20px;
    color: var(--primary-color);
    background: none;
    border: none;
    padding: 0;
    transition: transform 0.3s ease;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

#theme-toggle:focus {
    outline: none;
}

/* Navigation styling */

nav {
    order: -1;
    margin-top: 10px;
}

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

nav li {
    padding-bottom: 10px;
}

nav .blank {
    padding-bottom: 0;
}

nav .share {
    text-transform: uppercase;
    font-size: 13px;
}

/* Timeline styling */

.timeline {
    position: relative;
    margin-top: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0px;
    left: 25px;
    bottom: 0px;
    width: 4px;
    background: var(--border-color);
    background-image: linear-gradient(180deg, var(--border-color) 15%, var(--timeline-gradient-end) 100%);
}

.timeline::after {
    content: '';
    display: table;
    clear: both;
}

.entry {
    clear: both;
    width: calc(100% - 55px);
    text-align: left;
    position: relative;
    left: 50px;
    top: 25px;
    margin-bottom: 50px;
}

.entry h2 {
    margin: 0 0;
}

.entry::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--entry-dot-bg);
    border: 4px solid var(--primary-color);
    border-radius: 100%;
    left: -31px;
    top: 15px;
    z-index: 99;
}

/* Icons styling */

i {
    color: var(--icon-color);
}

.blue-fa {
    color: var(--icon-color);
}

/* Article styling */

p, ul, ol, h1, h2 {
    margin: 0 0 20px;
}

strong, b {
    font-weight: 500;
}

ul {
    list-style-type: circle;
    list-style-position: outside;
    padding-left: 24px;
}

ol {
    list-style-type: decimal;
    list-style-position: outside;
    padding-left: 24px;
}

main li {
    padding-bottom: 12px;
}

h1, h2, h3 {
    font-weight: 500;
    letter-spacing: -1px;
    line-height: 1.2;
    color: var(--heading-color);
}

h1 {
    font-size: 36px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 18px;
}

p.info {
    text-transform: uppercase;
    font-size: 11px;
    line-height: 1.6;
    margin-top: -10px;
}

p.intro, .intro p {
    font-size: 22px;
    font-weight: 300;
    line-height: 1.3;
}

p.tags a {
    font-size: 14px;
}

blockquote {
    padding: 12px 12px 12px 24px;
    font-size: 24px;
    font-weight: 300;
    line-height: 1.3;
    color: var(--heading-color);
    border-left: 3px solid var(--primary-color);
}

.tweet {
    font-size: 12px;
    float: right;
    padding-top: 12px;
}

.pull {
    width: 300px;
}

.pull-right {
    float: right;
    margin: 0 -120px 20px 20px;
}

.pull-left {
    float: left;
    margin: 0 20px 20px -120px;
}

.quote-inline {
    width: 100%;
    margin: 20px 0 30px 0;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 300;
}

.pagination {
    line-height: 36px;
    text-align: center;
    overflow: hidden;
}

.pagination .button {
    display: inline-block;
    font-weight: 500;
    font-size: 13px;
    color: var(--pagination-text);
    padding: 0 20px;
    border-radius: 18px;
    height: 36px;
    line-height: 36px;
    border: 1px solid var(--border-color-light);
}

.pagination .button-disabled {
    opacity: 0.4;
}

.pagination .button-prev {
    float: left;
}

.pagination .button-next {
    float: right;
}

/* Code block styling */
.highlight {
    padding: 4px 4px 4px 4px;
}

.highlight-wrapper {
    font-family: Monaco, Menlo, Consolas, monospace;
    font-size: 14px;
    border: 1px solid var(--code-border);
    margin: 0 0 20px 0;
    position: relative;
}

.highlight-before {
    background-color: var(--code-bg);
    color: #fff;
    padding: 2px 0px 2px 8px;
}

.highlight-link {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 14px;
}

pre {
    overflow-x: scroll;
}

/* Override Hugo's inline styles for code blocks */
.highlight pre {
    background-color: var(--code-bg-color) !important;
    color: var(--code-text-color);
}

.highlight code {
    color: var(--code-text-color);
}

/* Syntax highlighting color overrides for dark mode */
/* Override specific problematic colors in dark mode that are too dark to read */
[data-theme="dark"] .highlight span[style*="color:#000"],
[data-theme="dark"] .highlight span[style*="color:#222"],
[data-theme="dark"] .highlight span[style*="color: #000"],
[data-theme="dark"] .highlight span[style*="color: #222"] {
    color: #d4d4d4 !important;
}

/* Adjust purple keywords for dark mode */
[data-theme="dark"] .highlight span[style*="color:#a90d91"] {
    color: #c586c0 !important;
}

/* Adjust red strings for dark mode */
[data-theme="dark"] .highlight span[style*="color:#c41a16"] {
    color: #ce9178 !important;
}

/* Subscription styling */

#subscribe {
    padding-top: 24px;
    font-size: 15px;
}

#subscribe h3 {
    margin-top: 9px;
    margin-bottom: 9px;
}

#subscribe i {
    color: var(--icon-color);
}

.subscribe-input {
    padding-left: 64px;
    width: calc(100% - 64px);
}

.subscribe-input-email {
    border: 1px solid var(--border-color-dark);
    padding: 5px 10px;
    font-size: 15px;
    width: 100%;
    float: left;
}

.subscribe-input-button {
    background-color: transparent;
    width: 33.6px;
    height: 33.6px;
    right: 5px;
    border: 0;
    padding: 0;
    margin-left: -38px;
    margin-top: -2px;
    font-size: 18px;
    cursor: pointer;
    float: left;
}

/* Comments styling */

#comments {
    padding-top: 24px;
}

#comments .jcCommentsHeader h3 {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -1px;
    line-height: 1.2;
    color: var(--heading-color);
}

.jcSendCommentButton {
    background-color: var(--primary-color) !important;
    text-shadow: none !important;
}

.Widget__attribution--1a7uF {
    display: none;
}

/* Image styling */
.responsive {
    width: 100%;
    max-width: 624px;
    height: auto;
}

figure {
    padding: 12px;
}

figcaption {
    font-size: 12px;
    text-align: center;
    padding-top: 12px;
}

/* Footer styling */

footer {
    margin-bottom: 30px;
    margin-top: 30px;
    font-size: 12px;
}

/* Flexbox layout */

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    display: flex;
    margin-top: 35px;
    margin-bottom: 35px;
}

main {
    flex: 1; 
    max-width: 624px; 
}

/* Device styles */

@media screen and (min-width: 768px) {
    .container {
        width: 768px;
        margin: 0 auto;
    }

    nav {
        flex: 0 0 8em;
        font-size: 1.0em;
    }

    .nav-text {
        display: inline;
    }
}

@media screen and (min-width: 420px) and (max-width: 1023px) {
    blockquote {
        font-size: 24px;
    }
    
    .pull {
        width: 240px;
    }
    
    .pull-right {
        float: right;
        margin: 0 -15px 20px 20px;
    }
    
    .pull-left {
        float: left;
        margin: 0 20px 20px -15px;
    }
}

@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        margin: 0 auto;
    }

    nav {
        flex: 0 0 2.5em;
        font-size: 1.2em;
    }

    nav .share {
        display: none;
    }

    .nav-text {
        display: none;
    }

}

@media screen and (max-width: 420px) {
    ul {
        padding-left: 0px;    
    }

    .pagination .button {
        box-sizing: border-box;
        text-align: center;
        float: none;
        margin-bottom: 20px;
        display: block;
    }

    .pagination .button-disabled {
        display: none;
    }

    blockquote {
        font-size: 24px;
    }

    .pull {
        width: 60vw;
    }
    
    .pull-right {
        float: none;
        margin: 36px 12px 36px 12px;
    }
    
    .pull-left {
        float: none;
        margin: 36px 12px 36px 12px;
    }
}

@media print {
    nav {
        display: none;
    }

    .pagination {
        display: none;
    }

    .tweet {
        display: none;
    }

    .pull {
        width: 300px;
    }
    
    .pull-right {
        float: right;
        margin: 0 0px 20px 20px;
    }
    
    .pull-left {
        float: left;
        margin: 0 20px 20px 0px;
    }

    #subscribe {
        display: none;
    }

    #comments {
        display: none;
    }
}


/* macos terminal styling */

/* window BEGIN */
.window {
    background: var(--window-bg);
    width: 65vw;
    max-width: 600px;
    min-width: 360px;
    margin: auto;
    margin-top: 3.5vh;
    margin-bottom: 3.5vh;
    border: 1px solid var(--window-border);
    border-radius: 6px;
    box-shadow: 0px 0px 20px var(--window-shadow);
  }
  
  .window a {
    text-decoration: none;
  }
  
  .window span {
    line-height: 9px;
    vertical-align: 50%;
  }
  
  .titlebar {
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #ebebeb, color-stop(1.0, #d5d5d5)));
    background: -webkit-linear-gradient(top, #ebebeb, #d5d5d5);
    background: -moz-linear-gradient(top, #ebebeb, #d5d5d5);
    background: -ms-linear-gradient(top, #ebebeb, #d5d5d5);
    background: -o-linear-gradient(top, #ebebeb, #d5d5d5);
    background: linear-gradient(top, #ebebeb, #d5d5d5);
    color: #4d494d;
    font-size: 11pt;
    line-height: 22px;
    text-align: center;
    width: 100%;
    height: 22px;
    border-top: 1px solid #f3f1f3;
    border-bottom: 1px solid #b1aeb1;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    cursor: default;
  }
  
  .buttons {
    padding-left: 8px;
    padding-top: 5px;
    float: left;
    line-height: 0px;
  }
  
  .buttons:hover a {
    visibility: visible;
  }
  
  .bclose {
    background: #ff5c5c;
    font-size: 9pt;
    line-height: 11px;
    margin-left: 4px;
    width: 11px;
    height: 11px;
    border: 1px solid #e33e41;
    border-radius: 50%;
    float: left;
    display: inline-block;
  }
  
  .bclose:active {
    background: #c14645;
    border: 1px solid #b03537;
  }
  
  .bclose:active .closebutton {
    color: #4e0002;
  }
  
  .closebutton {
    color: #820005;
    visibility: hidden;
    cursor: default;
  }
  
  .minimize {
    background: #ffbd4c;
    font-size: 9pt;
    line-height: 11px;
    margin-left: 8px;
    width: 11px;
    height: 11px;
    border: 1px solid #e09e3e;
    border-radius: 50%;
    display: inline-block;
  }
  
  .minimize:active {
    background: #c08e38;
    border: 1px solid #af7c33;
  }
  
  .minimize:active .minimizebutton {
    color: #5a2607;
  }
  
  .minimizebutton {
    color: #9a5518;
    visibility: hidden;
    cursor: default;
  }
  
  .zoom {
    background: #00ca56;
    font-size: 9pt;
    line-height: 11px;
    margin-left: 4px;
    width: 11px;
    height: 11px;
    border: 1px solid #14ae46;
    border-radius: 50%;
    display: inline-block;
  }
  
  .zoom:active {
    background: #029740;
    border: 1px solid #128435;
  }
  
  .zoom:active .zoombutton {
    color: #003107;
  }
  
  .zoombutton {
    color: #006519;
    visibility: hidden;
    cursor: default;
  }
  /* window END */
  
  /* terminal BEGIN */
  .terminal {
    margin: 0;
    padding: 5px;
    list-style: none;
    background: #141414;
    color: #fff;
    font-family: "Courier New", "Courier", monospace;
    font-size: 0.6rem;
    line-height: 1.6em;
   
    -webkit-border-bottom-right-radius: 3px;
    -webkit-border-bottom-left-radius: 3px;
    -moz-border-radius-bottomright: 3px;
    -moz-border-radius-bottomleft: 3px;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
  }
  
  .terminal ul {
    padding-left: 0;
    margin-left: 0;
    margin-bottom: 0;
  }
   
  .terminal li {
    width: 100%;
    word-wrap: break-word;
    white-space: pre-wrap;
    position: relative;
    padding: 0 0 0 15px;
    list-style: none;
  }
  /* terminal END */
  