Files
www-krisforbes-ca/css/main.css
T

488 lines
10 KiB
CSS

/* ============================================================
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
*/
body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
margin: 0;
padding: 0; }
/**
* Base — dark modern
*/
* {
box-sizing: border-box; }
html {
scroll-behavior: smooth; }
body {
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%;
font-kerning: normal;
transition: background-color 0.3s ease; }
::selection {
background: var(--accent-glow);
color: #fff; }
/**
* Vertical rhythm
*/
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, figure,
.highlight {
margin-bottom: 16px; }
/**
* Headings
*/
h1, h2, h3, h4, h5, h6 {
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: 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: 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-family: "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
font-size: 0.88em; }
code {
padding: 2px 6px;
background: var(--code-bg);
border: 1px solid var(--border);
border-radius: 5px;
color: var(--accent-strong); }
pre {
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: 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: calc(800px - (30px * 2));
margin-right: auto;
margin-left: auto;
padding-right: 30px;
padding-left: 30px; }
@media screen and (max-width: 800px) {
.wrapper {
max-width: calc(800px - (30px));
padding-right: 15px;
padding-left: 15px; } }
.wrapper:after {
content: "";
display: table;
clear: both; }
/**
* Icons
*/
.icon > svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle; }
.icon > svg path {
fill: var(--text-muted); }
/**
* Site header — sticky glass effect
*/
.site-header {
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: 24px;
font-weight: 700;
letter-spacing: -0.02em;
line-height: 60px;
float: left;
margin-bottom: 0;
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: 60px; }
.site-nav .menu-icon {
display: none; }
.site-nav .page-link {
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: 22px; }
@media screen and (max-width: 600px) {
.site-nav {
position: absolute;
top: 14px;
right: 15px;
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;
width: 36px;
height: 26px;
line-height: 0;
padding-top: 10px;
text-align: center; }
.site-nav .menu-icon > svg {
width: 18px;
height: 15px; }
.site-nav .menu-icon > svg path {
fill: var(--text); }
.site-nav .trigger {
clear: both;
display: none; }
.site-nav:hover .trigger {
display: block;
padding-bottom: 5px; }
.site-nav .page-link {
display: block;
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 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: 17px;
margin-bottom: 15px;
color: var(--text); }
.contact-list,
.social-media-list {
list-style: none;
margin-left: 0; }
.footer-col-wrapper {
font-size: 15px;
color: var(--text-muted);
margin-left: -15px; }
.footer-col {
float: left;
margin-bottom: 15px;
padding-left: 15px; }
.footer-col-1 {
width: calc(35% - (30px / 2)); }
.footer-col-2 {
width: calc(20% - (30px / 2)); }
.footer-col-3 {
width: calc(45% - (30px / 2)); }
@media screen and (max-width: 800px) {
.footer-col-1,
.footer-col-2 {
width: calc(50% - (30px / 2)); }
.footer-col-3 {
width: calc(100% - (30px / 2)); } }
@media screen and (max-width: 600px) {
.footer-col {
float: none;
width: calc(100% - (30px / 2)); } }
/**
* Syntax highlighting — dark palette
*/
.highlight {
background: var(--code-bg);
border-radius: var(--radius); }
.highlighter-rouge .highlight {
background: var(--code-bg); }
.highlight .c, .highlight .cm, .highlight .c1 {
color: #7d8ca3;
font-style: italic; }
.highlight .err {
color: #ff7b72;
background: none; }
.highlight .k, .highlight .o, .highlight .ow {
color: #ff7b72; }
.highlight .cp, .highlight .cs {
color: #ffa657; }
.highlight .gd {
color: var(--text);
background-color: rgba(248, 81, 73, 0.15); }
.highlight .ge {
font-style: italic; }
.highlight .gr {
color: #ff7b72; }
.highlight .gh {
color: #79c0ff;
font-weight: bold; }
.highlight .gi {
color: var(--text);
background-color: rgba(63, 185, 80, 0.15); }
.highlight .go {
color: var(--text-muted); }
.highlight .gp {
color: var(--text-muted); }
.highlight .gs {
font-weight: bold; }
.highlight .gu {
color: #d2a8ff; }
.highlight .gt {
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; }