From aeb886198b3d111f70a389a84dfc1c63d9d57ebb Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 22 Aug 2026 19:18:35 -0400 Subject: [PATCH] Visual overhaul: dark modern theme --- css/main.css | 592 +++++++++++++++++++++++++++------------------------ 1 file changed, 311 insertions(+), 281 deletions(-) diff --git a/css/main.css b/css/main.css index 1fb1692..a66b5f2 100644 --- a/css/main.css +++ b/css/main.css @@ -1,5 +1,24 @@ +/* ============================================================ + krisforbes.ca — Dark Modern Theme + One stylesheet for the whole site; content untouched. + ============================================================ */ + +:root { + --bg: #0d1117; + --bg-raised: #161b22; + --bg-hover: #1c2330; + --border: #2d333b; + --text: #e6edf3; + --text-muted: #8b949e; + --accent: #58a6ff; + --accent-strong: #79c0ff; + --accent-glow: rgba(88, 166, 255, 0.25); + --code-bg: #1a2129; + --radius: 10px; +} + /** - * Reset some basic elements + * Reset */ body, h1, h2, h3, h4, h5, h6, p, blockquote, pre, hr, @@ -8,111 +27,153 @@ dl, dd, ol, ul, figure { padding: 0; } /** - * Basic styling + * Base — dark modern */ +* { + box-sizing: border-box; } + +html { + scroll-behavior: smooth; } + body { - font: 400 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; - color: #111; - background-color: #fdfdfd; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + "Helvetica Neue", Arial, sans-serif; + font-size: 17px; + line-height: 1.7; + color: var(--text); + background-color: var(--bg); -webkit-text-size-adjust: 100%; - -webkit-font-feature-settings: "kern" 1; - -moz-font-feature-settings: "kern" 1; - -o-font-feature-settings: "kern" 1; - font-feature-settings: "kern" 1; - font-kerning: normal; } + font-kerning: normal; + transition: background-color 0.3s ease; } + +::selection { + background: var(--accent-glow); + color: #fff; } /** - * Set `margin-bottom` to maintain vertical rhythm + * Vertical rhythm */ h1, h2, h3, h4, h5, h6, p, blockquote, pre, ul, ol, dl, figure, .highlight { - margin-bottom: 15px; } - -/** - * Images - */ -img { - max-width: 100%; - vertical-align: middle; } - -/** - * Figures - */ -figure > img { - display: block; } - -figcaption { - font-size: 14px; } - -/** - * Lists - */ -ul, ol { - margin-left: 30px; } - -li > ul, -li > ol { - margin-bottom: 0; } + margin-bottom: 16px; } /** * Headings */ h1, h2, h3, h4, h5, h6 { - font-weight: 400; } + font-weight: 650; + letter-spacing: -0.02em; + line-height: 1.25; + color: var(--text); } + +h1 { font-size: 2.2em; } +h2 { font-size: 1.55em; margin-top: 1.4em; } +h3 { font-size: 1.28em; margin-top: 1.3em; } +h4 { font-size: 1.08em; margin-top: 1.2em; } /** * Links */ a { - color: #2a7ae2; - text-decoration: none; } - a:visited { - color: #1756a9; } - a:hover { - color: #111; - text-decoration: underline; } + color: var(--accent); + text-decoration: none; + transition: color 0.15s ease; } + +a:hover { + color: var(--accent-strong); + text-decoration: underline; + text-underline-offset: 3px; } + +/** + * Images / figures + */ +img { + max-width: 100%; + vertical-align: middle; + border-radius: var(--radius); } + +figure > img { + display: block; } + +figcaption { + font-size: 14px; + color: var(--text-muted); + text-align: center; + margin-top: 8px; } + +/** + * Lists + */ +ul, ol { + margin-left: 28px; } + +li > ul, +li > ol { + margin-bottom: 0; } + +li::marker { + color: var(--text-muted); } /** * Blockquotes */ blockquote { - color: #828282; - border-left: 4px solid #e8e8e8; - padding-left: 15px; - font-size: 18px; - letter-spacing: -1px; - font-style: italic; } + color: var(--text-muted); + border-left: 3px solid var(--accent); + background: var(--bg-raised); + padding: 12px 20px; + border-radius: 0 var(--radius) var(--radius) 0; + font-size: 1.05em; } blockquote > :last-child { margin-bottom: 0; } +/** + * Horizontal rule + */ +hr { + border: 0; + height: 1px; + background: var(--border); + margin: 32px 0; } + /** * Code formatting */ -pre, -code { - font-size: 15px; - border: 1px solid #e8e8e8; - border-radius: 3px; - background-color: #eef; } +pre, code { + font-family: "SF Mono", "Cascadia Code", Consolas, Menlo, monospace; + font-size: 0.88em; } code { - padding: 1px 5px; } + padding: 2px 6px; + background: var(--code-bg); + border: 1px solid var(--border); + border-radius: 5px; + color: var(--accent-strong); } pre { - padding: 8px 12px; - overflow-x: auto; } + padding: 16px; + overflow-x: auto; + background: var(--code-bg); + border: 1px solid var(--border); + border-radius: var(--radius); + line-height: 1.55; } pre > code { border: 0; - padding-right: 0; - padding-left: 0; } + padding: 0; + background: none; + color: var(--text); } + pre::-webkit-scrollbar { + height: 8px; } + pre::-webkit-scrollbar-thumb { + background: var(--border); + border-radius: 4px; } /** * Wrapper */ .wrapper { - max-width: -webkit-calc(800px - (30px * 2)); max-width: calc(800px - (30px * 2)); margin-right: auto; margin-left: auto; @@ -120,15 +181,11 @@ pre { padding-left: 30px; } @media screen and (max-width: 800px) { .wrapper { - max-width: -webkit-calc(800px - (30px)); max-width: calc(800px - (30px)); padding-right: 15px; padding-left: 15px; } } -/** - * Clearfix - */ -.wrapper:after, .footer-col-wrapper:after { +.wrapper:after { content: ""; display: table; clear: both; } @@ -142,46 +199,62 @@ pre { height: 16px; vertical-align: middle; } .icon > svg path { - fill: #828282; } + fill: var(--text-muted); } /** - * Site header + * Site header — sticky glass effect */ .site-header { - border-top: 5px solid #424242; - border-bottom: 1px solid #e8e8e8; - min-height: 56px; - position: relative; } + position: sticky; + top: 0; + z-index: 100; + min-height: 60px; + background: rgba(13, 17, 23, 0.85); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border-bottom: 1px solid var(--border); } .site-title { - font-size: 26px; - font-weight: 300; - line-height: 56px; - letter-spacing: -1px; + font-size: 24px; + font-weight: 700; + letter-spacing: -0.02em; + line-height: 60px; + float: left; margin-bottom: 0; - float: left; } - .site-title, .site-title:visited { - color: #424242; } + background: linear-gradient(90deg, var(--accent), #a371f7); + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; + transition: filter 0.15s ease; } + +.site-title:hover { + filter: brightness(1.2); } .site-nav { float: right; - line-height: 56px; } + line-height: 60px; } .site-nav .menu-icon { display: none; } .site-nav .page-link { - color: #111; - line-height: 1.5; } + color: var(--text-muted); + line-height: 1.5; + font-weight: 500; + padding: 4px 2px; } + .site-nav .page-link:hover { + color: var(--accent-strong); + text-decoration: none; } .site-nav .page-link:not(:last-child) { - margin-right: 20px; } + margin-right: 22px; } @media screen and (max-width: 600px) { .site-nav { position: absolute; - top: 9px; + top: 14px; right: 15px; - background-color: #fdfdfd; - border: 1px solid #e8e8e8; - border-radius: 5px; - text-align: right; } + background: var(--bg-raised); + border: 1px solid var(--border); + border-radius: var(--radius); + text-align: right; + line-height: normal; } .site-nav .menu-icon { display: block; float: right; @@ -194,7 +267,7 @@ pre { width: 18px; height: 15px; } .site-nav .menu-icon > svg path { - fill: #424242; } + fill: var(--text); } .site-nav .trigger { clear: both; display: none; } @@ -203,21 +276,114 @@ pre { padding-bottom: 5px; } .site-nav .page-link { display: block; - padding: 5px 10px; + padding: 6px 12px; margin-left: 20px; } .site-nav .page-link:not(:last-child) { margin-right: 0; } } +/** + * Page content + */ +.page-content { + padding: 40px 0 60px; } + +.page-heading { + font-size: 30px; + font-weight: 700; + letter-spacing: -0.03em; } + +/** + * Post list — card style on index + */ +.home { + animation: fadein 0.4s ease; } + +.post-list { + margin-left: 0; + list-style: none; } + .post-list > li { + margin-bottom: 16px; + padding: 18px 22px; + background: var(--bg-raised); + border: 1px solid var(--border); + border-radius: var(--radius); + transition: border-color 0.2s ease, transform 0.2s ease, + background-color 0.2s ease; } + .post-list > li:hover { + border-color: var(--accent); + background: var(--bg-hover); + transform: translateY(-2px); } + +.post-meta { + font-size: 14px; + color: var(--text-muted); + font-variant-numeric: tabular-nums; } + +.post-link { + display: inline; + font-size: 21px; + font-weight: 600; + letter-spacing: -0.01em; } + +/** + * Posts + */ +.post { + animation: fadein 0.4s ease; } + +.post-header { + margin-bottom: 36px; + padding-bottom: 24px; + border-bottom: 1px solid var(--border); } + +.post-title { + font-size: 42px; + font-weight: 750; + letter-spacing: -0.03em; + line-height: 1.15; + background: linear-gradient(120deg, var(--text) 60%, var(--accent-strong)); + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; } + @media screen and (max-width: 800px) { + .post-title { + font-size: 32px; } } + +.post-content { + margin-bottom: 30px; + font-size: 1.05em; } + .post-content h2 { + font-size: 1.65em; } + .post-content h3 { + font-size: 1.32em; } + .post-content h4 { + font-size: 1.1em; } + +@keyframes fadein { + from { + opacity: 0; + transform: translateY(6px); } + to { + opacity: 1; + transform: translateY(0); } } + /** * Site footer */ .site-footer { - border-top: 1px solid #e8e8e8; - padding: 30px 0; } + border-top: 1px solid var(--border); + padding: 36px 0; + background: var(--bg-raised); + color: var(--text-muted); } + .site-footer a { + color: var(--text-muted); } + .site-footer a:hover { + color: var(--accent-strong); } .footer-heading { - font-size: 18px; - margin-bottom: 15px; } + font-size: 17px; + margin-bottom: 15px; + color: var(--text); } .contact-list, .social-media-list { @@ -226,7 +392,7 @@ pre { .footer-col-wrapper { font-size: 15px; - color: #828282; + color: var(--text-muted); margin-left: -15px; } .footer-col { @@ -235,223 +401,87 @@ pre { padding-left: 15px; } .footer-col-1 { - width: -webkit-calc(35% - (30px / 2)); width: calc(35% - (30px / 2)); } .footer-col-2 { - width: -webkit-calc(20% - (30px / 2)); width: calc(20% - (30px / 2)); } .footer-col-3 { - width: -webkit-calc(45% - (30px / 2)); width: calc(45% - (30px / 2)); } @media screen and (max-width: 800px) { .footer-col-1, .footer-col-2 { - width: -webkit-calc(50% - (30px / 2)); width: calc(50% - (30px / 2)); } - .footer-col-3 { - width: -webkit-calc(100% - (30px / 2)); width: calc(100% - (30px / 2)); } } + @media screen and (max-width: 600px) { .footer-col { float: none; - width: -webkit-calc(100% - (30px / 2)); width: calc(100% - (30px / 2)); } } -/** - * Page content - */ -.page-content { - padding: 30px 0; } - -.page-heading { - font-size: 20px; } - -.post-list { - margin-left: 0; - list-style: none; } - .post-list > li { - margin-bottom: 30px; } - -.post-meta { - font-size: 14px; - color: #828282; } - -.post-link { - display: block; - font-size: 24px; } /** - * Posts - */ -.post-header { - margin-bottom: 30px; } - -.post-title { - font-size: 42px; - letter-spacing: -1px; - line-height: 1; } - @media screen and (max-width: 800px) { - .post-title { - font-size: 36px; } } - -.post-content { - margin-bottom: 30px; } - .post-content h2 { - font-size: 32px; } - @media screen and (max-width: 800px) { - .post-content h2 { - font-size: 28px; } } - .post-content h3 { - font-size: 26px; } - @media screen and (max-width: 800px) { - .post-content h3 { - font-size: 22px; } } - .post-content h4 { - font-size: 20px; } - @media screen and (max-width: 800px) { - .post-content h4 { - font-size: 18px; } } - -/** - * Syntax highlighting styles + * Syntax highlighting — dark palette */ .highlight { - background: #fff; } + background: var(--code-bg); + border-radius: var(--radius); } .highlighter-rouge .highlight { - background: #eef; } - .highlight .c { - color: #998; + background: var(--code-bg); } + .highlight .c, .highlight .cm, .highlight .c1 { + color: #7d8ca3; font-style: italic; } .highlight .err { - color: #a61717; - background-color: #e3d2d2; } - .highlight .k { - font-weight: bold; } - .highlight .o { - font-weight: bold; } - .highlight .cm { - color: #998; - font-style: italic; } - .highlight .cp { - color: #999; - font-weight: bold; } - .highlight .c1 { - color: #998; - font-style: italic; } - .highlight .cs { - color: #999; - font-weight: bold; - font-style: italic; } + color: #ff7b72; + background: none; } + .highlight .k, .highlight .o, .highlight .ow { + color: #ff7b72; } + .highlight .cp, .highlight .cs { + color: #ffa657; } .highlight .gd { - color: #000; - background-color: #fdd; } - .highlight .gd .x { - color: #000; - background-color: #faa; } + color: var(--text); + background-color: rgba(248, 81, 73, 0.15); } .highlight .ge { font-style: italic; } .highlight .gr { - color: #a00; } + color: #ff7b72; } .highlight .gh { - color: #999; } + color: #79c0ff; + font-weight: bold; } .highlight .gi { - color: #000; - background-color: #dfd; } - .highlight .gi .x { - color: #000; - background-color: #afa; } + color: var(--text); + background-color: rgba(63, 185, 80, 0.15); } .highlight .go { - color: #888; } + color: var(--text-muted); } .highlight .gp { - color: #555; } + color: var(--text-muted); } .highlight .gs { font-weight: bold; } .highlight .gu { - color: #aaa; } + color: #d2a8ff; } .highlight .gt { - color: #a00; } - .highlight .kc { - font-weight: bold; } - .highlight .kd { - font-weight: bold; } - .highlight .kp { - font-weight: bold; } - .highlight .kr { - font-weight: bold; } - .highlight .kt { - color: #458; - font-weight: bold; } - .highlight .m { - color: #099; } - .highlight .s { - color: #d14; } - .highlight .na { - color: #008080; } - .highlight .nb { - color: #0086B3; } - .highlight .nc { - color: #458; - font-weight: bold; } - .highlight .no { - color: #008080; } - .highlight .ni { - color: #800080; } - .highlight .ne { - color: #900; - font-weight: bold; } - .highlight .nf { - color: #900; - font-weight: bold; } - .highlight .nn { - color: #555; } - .highlight .nt { - color: #000080; } - .highlight .nv { - color: #008080; } - .highlight .ow { - font-weight: bold; } - .highlight .w { - color: #bbb; } - .highlight .mf { - color: #099; } - .highlight .mh { - color: #099; } - .highlight .mi { - color: #099; } - .highlight .mo { - color: #099; } - .highlight .sb { - color: #d14; } - .highlight .sc { - color: #d14; } - .highlight .sd { - color: #d14; } - .highlight .s2 { - color: #d14; } - .highlight .se { - color: #d14; } - .highlight .sh { - color: #d14; } - .highlight .si { - color: #d14; } - .highlight .sx { - color: #d14; } - .highlight .sr { - color: #009926; } - .highlight .s1 { - color: #d14; } - .highlight .ss { - color: #990073; } - .highlight .bp { - color: #999; } - .highlight .vc { - color: #008080; } - .highlight .vg { - color: #008080; } - .highlight .vi { - color: #008080; } - .highlight .il { - color: #099; } + color: #ff7b72; } + .highlight .kc, .highlight .kd, .highlight .kn, + .highlight .kp, .highlight .kr, .highlight .kt { + color: #d2a8ff; } + .highlight .m, .highlight .mf, .highlight .mh, + .highlight .mi, .highlight .mo, .highlight .il { + color: #79c0ff; } + .highlight .s, .highlight .sb, .highlight .sc, .highlight .sd, + .highlight .s2, .highlight .se, .highlight .sh, .highlight .si, + .highlight .sx, .highlight .sr, .highlight .s1, .highlight .ss { + color: #a5d6ff; } + .highlight .na { color: #79c0ff; } + .highlight .nb { color: #ffa657; } + .highlight .nc { color: #7ee787; font-weight: bold; } + .highlight .no { color: #79c0ff; } + .highlight .ni { color: #ffa657; } + .highlight .ne { color: #ff7b72; font-weight: bold; } + .highlight .nf { color: #d2a8ff; } + .highlight .nn { color: var(--text-muted); } + .highlight .nt { color: #7ee787; } + .highlight .nv, .highlight .vc, .highlight .vg, .highlight .vi { + color: #79c0ff; } + .highlight .bp { color: var(--text-muted); } + .highlight .w { color: #484f58; }