Files
org_roam/assets/styles/style.css
2026-03-08 14:54:29 +00:00

1047 lines
22 KiB
CSS
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* =========================================================
TOKENS / CUSTOM PROPERTIES
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=DM+Mono:wght@400;500&family=Lora:ital@0;1&display=swap');
:root {
--gutter: 2rem;
--margin: 420px;
--body-pad: 1.25rem;
--content-min: 56ch;
--content-max: 820px;
--content: clamp(
var(--content-min),
calc(100vi - (2 * var(--body-pad)) - (2 * (var(--margin) + var(--gutter)))),
var(--content-max)
);
--bleed: 48px;
--fullwidth-cap: 860px;
/* Core palette — warm dark */
--bg: #1c1a17;
--page-bg: #141210;
--pane-bg: #1e1c19;
--fg: #e8e2d9;
--fg-dim: #a09890;
--fg-faint: #5a534a;
/* Accent — warm amber */
--accent: #c8964a;
--accent-dim: color-mix(in oklab, var(--accent) 40%, transparent);
--accent-subtle: color-mix(in oklab, var(--accent) 10%, transparent);
/* Headings */
--heading: #e8dcc8;
--heading-2: #c8a878;
--heading-3: #a88858;
/* Links */
--link: #b8a888;
--link-2: var(--link);
/* Surfaces */
--code-bg: #161412;
--border: #2e2a24;
--border-mid: #3a342c;
/* Misc */
--muted: var(--fg-dim);
--note-color: #5a534a;
--note-bg: transparent;
--chip-bg: #2a2620;
--chip-fg: var(--fg-dim);
/* Aliases */
--border-color: var(--border);
--text-color: var(--fg);
--muted-text: var(--muted);
--link-color: var(--link);
--link-hover-color: var(--fg);
--bg-alt: #161412;
/* Spacing rhythm */
--r1: 0.25rem;
--r2: 0.5rem;
--r3: 0.75rem;
--r4: 1rem;
--r5: 1.5rem;
--r6: 2rem;
--r8: 3rem;
/* Typography */
--font-body: 'DM Sans', system-ui, sans-serif;
--font-mono: 'DM Mono', 'Fira Mono', monospace;
--font-serif: 'Lora', Georgia, serif;
/* Motion */
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--ease-in: cubic-bezier(0.4, 0, 1, 1);
--dur-fast: 120ms;
--dur-mid: 220ms;
--dur-slow: 380ms;
}
/* =========================================================
LIGHT THEME (optional override)
========================================================= */
[data-theme="light"] {
--bg: #f5f1eb;
--page-bg: #ede9e2;
--pane-bg: #f8f5f0;
--fg: #2a2520;
--fg-dim: #6a6058;
--fg-faint: #b0a898;
--accent: #a07030;
--border: #ddd8ce;
--border-mid:#ccc6bb;
--code-bg: #edeae4;
--bg-alt: #ede9e2;
--link: #7a5c30;
--heading: #2a2520;
--heading-2: #6a4820;
--heading-3: #8a5c30;
--chip-bg: #e5e0d8;
--chip-fg: #6a6058;
}
/* =========================================================
RESET / BASE
========================================================= */
*, *::before, *::after {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
background-color: var(--page-bg);
color: var(--fg);
font-family: var(--font-body);
font-size: 16px;
line-height: 1.7;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transition: background-color var(--dur-slow), color var(--dur-slow);
}
body {
display: flex;
flex-direction: column;
min-height: 100dvh;
}
/* =========================================================
TYPOGRAPHY
========================================================= */
h1 {
font-size: 1.65rem;
font-weight: 500;
line-height: 1.25;
letter-spacing: -0.02em;
color: var(--heading);
margin: 0 0 var(--r5);
}
h2 {
font-size: 1.25rem;
font-weight: 500;
letter-spacing: -0.01em;
color: var(--heading);
margin: var(--r8) 0 var(--r4);
padding-bottom: var(--r3);
border-bottom: 1px solid var(--border);
}
h3 {
font-size: 1.05rem;
font-weight: 500;
color: var(--heading-2);
margin: var(--r6) 0 var(--r3);
}
h4 {
font-size: 0.95rem;
font-weight: 500;
color: var(--heading-3);
margin: var(--r5) 0 var(--r2);
}
p {
margin: 0 0 var(--r4);
font-weight: 300;
}
a {
color: var(--link);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: color var(--dur-fast), border-color var(--dur-fast);
}
a:hover {
color: var(--fg);
border-bottom-color: var(--fg-faint);
text-decoration: none;
}
strong {
font-weight: 500;
color: var(--fg);
}
em {
font-style: italic;
font-family: var(--font-serif);
}
.tag {
background-color: var(--chip-bg) !important;
color: var(--accent) !important;
font-family: var(--font-mono);
font-size: 0.72rem;
padding: 0.15em 0.5em;
border-radius: 3px;
letter-spacing: 0.04em;
border: 1px solid var(--border-mid);
}
/* =========================================================
BANNER / PREAMBLE
========================================================= */
#preamble {
position: sticky;
top: 0;
z-index: 100;
background: var(--bg);
border-bottom: 1px solid var(--border);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}
.banner-header {
display: flex;
align-items: center;
gap: var(--r5);
padding: 0.6rem var(--r5);
max-width: 100%;
position: relative;
}
.banner-left {
display: flex;
align-items: center;
gap: var(--r4);
flex-shrink: 0;
}
.banner-logo {
height: 38px;
width: 38px;
border-radius: 50%;
object-fit: cover;
opacity: 0.92;
transition: opacity var(--dur-fast);
}
.banner-logo:hover {
opacity: 1;
}
#updated {
font-size: 0.7rem;
font-family: var(--font-mono);
color: var(--fg-faint);
white-space: nowrap;
letter-spacing: 0.03em;
}
nav {
display: flex;
gap: var(--r4);
font-size: 0.9rem;
font-weight: 400;
}
nav a {
color: var(--fg-dim);
border-bottom: none;
padding: var(--r1) 0;
position: relative;
}
nav a::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 1px;
background: var(--accent);
transition: width var(--dur-mid) var(--ease-out);
}
nav a:hover {
color: var(--fg);
}
nav a:hover::after {
width: 100%;
}
.banner-search {
flex: 1;
max-width: 26rem;
position: relative;
}
#search-box {
width: 100%;
padding: 0.45rem 0.8rem;
font-size: 0.875rem;
font-family: var(--font-body);
font-weight: 300;
background-color: var(--bg-alt);
color: var(--fg);
border: 1px solid var(--border);
border-radius: 6px;
transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
outline: none;
}
#search-box:focus {
border-color: var(--accent-dim);
box-shadow: 0 0 0 3px var(--accent-subtle);
}
#search-box::placeholder {
color: var(--fg-faint);
font-style: italic;
}
#search-results {
position: absolute;
top: calc(100% + 0.4rem);
left: 0;
right: 0;
background: var(--bg);
border: 1px solid var(--border-mid);
border-radius: 6px;
box-shadow: 0 12px 40px rgba(0,0,0,0.4);
max-height: 20rem;
overflow-y: auto;
z-index: 1000;
}
#search-results > * {
padding: 0.5rem 0.8rem;
font-size: 0.875rem;
line-height: 1.4;
cursor: pointer;
border-bottom: 1px solid var(--border);
transition: background var(--dur-fast);
}
#search-results > *:last-child { border-bottom: none; }
#search-results > *:hover,
#search-results > *.active {
background: var(--accent-subtle);
color: var(--fg);
}
.web-logo {
height: auto;
width: 22%;
max-width: 80px;
opacity: 0.7;
transition: opacity var(--dur-fast);
flex-shrink: 0;
}
.web-logo:hover { opacity: 1; }
.banner-actions {
display: flex;
align-items: center;
gap: var(--r2);
margin-left: auto;
flex-shrink: 0;
}
#theme-toggle {
background: transparent;
border: 1px solid var(--border);
border-radius: 5px;
width: 32px;
height: 32px;
font-size: 0.95rem;
cursor: pointer;
color: var(--fg-dim);
display: inline-flex;
align-items: center;
justify-content: center;
transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
line-height: 1;
}
#theme-toggle:hover {
color: var(--fg);
border-color: var(--border-mid);
background: var(--chip-bg);
}
#close-all {
background: transparent;
border: 1px solid var(--border);
border-radius: 5px;
padding: 0.3rem 0.7rem;
font-size: 0.75rem;
font-family: var(--font-mono);
color: var(--fg-faint);
cursor: pointer;
letter-spacing: 0.04em;
transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
white-space: nowrap;
}
#close-all:hover {
color: var(--fg);
border-color: var(--border-mid);
background: var(--chip-bg);
}
/* =========================================================
STACKED PANE LAYOUT
========================================================= */
#stack-root {
position: relative;
width: 100vw;
height: calc(100dvh - 60px);
overflow-x: auto;
overflow-y: hidden;
flex: 1 1 auto;
scroll-snap-type: x proximity;
scrollbar-width: thin;
scrollbar-color: var(--border-mid) transparent;
}
#stack-root::-webkit-scrollbar { height: 5px; }
#stack-root::-webkit-scrollbar-thumb {
background: var(--border-mid);
border-radius: 3px;
}
.stack-track {
display: flex;
flex-direction: row;
align-items: stretch;
width: max-content;
height: 100%;
}
.stack-pane {
flex: 0 0 auto;
width: clamp(400px, 34vw, 800px);
max-width: 100vw;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
background-color: var(--pane-bg);
border-right: 1px solid var(--border);
position: relative;
scroll-snap-align: start;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
/* Smooth entrance */
animation: pane-in var(--dur-slow) var(--ease-out);
}
@keyframes pane-in {
from { opacity: 0; transform: translateX(24px); }
to { opacity: 1; transform: translateX(0); }
}
.stack-pane::-webkit-scrollbar { width: 5px; }
.stack-pane::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
/* Depth shadow on last pane */
.stack-pane:last-child {
box-shadow: -8px 0 32px rgba(0,0,0,0.25);
}
/* Subtle vertical separator gradient */
.stack-pane::after {
content: '';
position: absolute;
top: 0;
right: 0;
width: 1px;
height: 100%;
background: linear-gradient(
to bottom,
transparent,
var(--border-mid) 20%,
var(--border-mid) 80%,
transparent
);
pointer-events: none;
}
/* =========================================================
CONTENT WRAPPER
========================================================= */
#content.content {
max-width: var(--content);
margin-left: auto !important;
margin-right: auto !important;
padding: var(--r6) var(--r5);
box-sizing: content-box;
position: relative;
}
/* =========================================================
TITLE SECTION
========================================================= */
.title-section {
position: relative;
margin-bottom: var(--r6);
padding: var(--r5) var(--r5) var(--r4);
padding-right: 7rem;
background: color-mix(in oklab, var(--bg) 50%, var(--pane-bg) 50%);
border: 1px solid var(--border);
border-radius: 8px;
}
.title-section .title {
margin: 0 0 var(--r4);
padding-bottom: var(--r4);
border-bottom: 1px solid var(--border);
font-size: 1.5rem;
}
.title-metadata {
display: flex;
flex-wrap: wrap;
gap: var(--r4);
}
.metadata-item {
display: flex;
align-items: baseline;
gap: var(--r2);
font-size: 0.75rem;
font-family: var(--font-mono);
letter-spacing: 0.03em;
}
.metadata-label {
color: var(--fg-faint);
font-style: normal;
}
.metadata-value {
color: var(--accent);
}
/* =========================================================
TITLE CONTROLS
========================================================= */
.title-controls {
position: absolute;
top: var(--r4);
right: var(--r4);
display: flex;
gap: var(--r2);
z-index: 10;
}
.title-controls button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
background: none;
border: 1px solid var(--border);
border-radius: 5px;
font-size: 0.8rem;
font-family: var(--font-mono);
cursor: pointer;
color: var(--fg-faint);
transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
line-height: 1;
}
.title-controls button:hover {
color: var(--fg);
border-color: var(--border-mid);
background: var(--chip-bg);
}
.pane-close {
font-size: 1rem !important;
}
/* Hide close on root pane */
.pane-root .pane-close {
display: none !important;
}
/* Hide old pane-header */
.pane-header { display: none; }
/* =========================================================
IMAGES
========================================================= */
#content .figure,
#content img:not(.fullwidth) {
max-width: 100%;
height: auto;
border-radius: 4px;
}
/* =========================================================
LISTS
========================================================= */
ul, ol {
margin: var(--r3) 0 var(--r5) var(--r4);
padding: 0;
line-height: 1.7;
}
ul { list-style: none; }
ul li {
position: relative;
padding-left: 1.4em;
}
ul li::before {
content: "·";
position: absolute;
left: 0;
top: 0;
color: var(--accent);
font-weight: 700;
font-size: 1.1em;
}
ol {
counter-reset: list-counter;
list-style: none;
}
ol li {
counter-increment: list-counter;
position: relative;
padding-left: 2em;
}
ol li::before {
content: counter(list-counter);
position: absolute;
left: 0;
top: 0.05em;
font-family: var(--font-mono);
font-size: 0.78em;
color: var(--accent);
font-weight: 500;
letter-spacing: 0.04em;
opacity: 0.7;
}
li {
margin-bottom: 0.45rem;
display: flow-root;
}
li::after { content: none; }
li ul, li ol {
margin-top: var(--r2);
margin-bottom: var(--r2);
}
li ul li::before {
content: "";
font-weight: normal;
color: var(--fg-faint);
font-size: 1em;
}
/* =========================================================
BLOCKQUOTE / EPIGRAPH
========================================================= */
blockquote {
margin: var(--r5) 0;
padding: var(--r4) var(--r5);
border-left: 2px solid var(--accent);
background: var(--accent-subtle);
border-radius: 0 6px 6px 0;
color: var(--fg-dim);
font-family: var(--font-serif);
font-style: italic;
line-height: 1.75;
}
blockquote p { margin: 0; }
.epigraph {
margin: var(--r6) auto;
max-width: 82%;
}
.epigraph blockquote {
margin: 0;
padding: var(--r4) var(--r5);
border-left: 2px solid var(--accent-dim);
}
.epigraph blockquote footer {
margin-top: var(--r3);
font-style: normal;
font-size: 0.85em;
color: var(--fg-faint);
text-align: right;
font-family: var(--font-mono);
}
.epigraph blockquote cite {
font-style: italic;
color: var(--accent);
}
/* =========================================================
CODE
========================================================= */
:not(pre) > code {
padding: 0.15em 0.45em;
margin: 0 0.1em;
font-family: var(--font-mono);
font-size: 0.8em;
background: var(--code-bg);
color: var(--heading-2);
border: 1px solid var(--border-mid);
border-radius: 4px;
}
pre {
background: var(--code-bg);
}
.org-src-container {
border: 1px solid var(--border);
border-radius: 8px;
font-family: var(--font-mono);
font-size: 0.82rem;
margin: var(--r5) auto;
overflow: hidden;
position: relative;
}
.org-src-container > pre {
overflow: auto;
margin: 0;
padding: var(--r5) var(--r4);
}
.org-src-container > pre:before {
display: block;
position: sticky;
top: 0;
background: color-mix(in oklab, var(--code-bg) 80%, var(--border) 20%);
color: var(--fg-faint);
padding: 0.35rem var(--r4);
font-size: 0.72rem;
letter-spacing: 0.08em;
text-transform: uppercase;
border-bottom: 1px solid var(--border);
}
.org-src-container > pre.src-bash:before { content: "bash"; }
.org-src-container > pre.src-sh:before { content: "sh"; }
.org-src-container > pre.src-shell:before { content: "shell"; }
.org-src-container > pre.src-python:before { content: "python"; }
.org-src-container > pre.src-emacs-lisp:before { content: "emacs lisp"; }
.org-src-container > pre.src-js:before,
.org-src-container > pre.src-javascript:before { content: "javascript"; }
.org-src-container > pre.src-typescript:before { content: "typescript"; }
.org-src-container > pre.src-html:before { content: "html"; }
.org-src-container > pre.src-css:before { content: "css"; }
.org-src-container > pre.src-c:before { content: "c"; }
.org-src-container > pre.src-cpp:before { content: "c++"; }
.org-src-container > pre.src-java:before { content: "java"; }
.org-src-container > pre.src-rust:before { content: "rust"; }
.org-src-container > pre.src-R:before { content: "R"; }
pre.src::before { content: none !important; }
pre.src {
padding: var(--r5) var(--r4) var(--r4);
font-family: var(--font-mono);
font-size: 0.875rem;
line-height: 1.55;
overflow-x: auto;
white-space: pre-wrap;
background: var(--code-bg);
}
/* Copy button */
.copy-btn {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background: var(--chip-bg);
color: var(--fg-faint);
border: 1px solid var(--border-mid);
border-radius: 4px;
padding: 0.2em 0.6em;
font-size: 0.72rem;
font-family: var(--font-mono);
letter-spacing: 0.04em;
cursor: pointer;
z-index: 10;
transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.copy-btn:hover {
color: var(--fg);
border-color: var(--accent-dim);
background: var(--accent-subtle);
}
/* =========================================================
TABLE OF CONTENTS
========================================================= */
#table-of-contents {
margin-bottom: var(--r6);
}
#text-table-of-contents ul {
margin: var(--r2) 0;
}
#text-table-of-contents a {
font-size: 0.875rem;
color: var(--fg-dim);
border-bottom: none;
transition: color var(--dur-fast);
}
#text-table-of-contents a:hover {
color: var(--fg);
border-bottom: none;
}
#text-table-of-contents a.is-active {
color: var(--accent);
}
#text-table-of-contents a[aria-current] {
color: var(--accent);
}
/* =========================================================
SIDENOTES / FOOTNOTES
========================================================= */
.sidenote {
font-size: 0.78rem;
line-height: 1.5;
color: var(--fg-dim);
font-family: var(--font-serif);
font-style: italic;
}
/* =========================================================
BACKLINKS
========================================================= */
.backlinks-section {
margin-top: var(--r8);
padding-top: var(--r5);
border-top: 1px solid var(--border);
opacity: 0.9;
}
.backlinks-section h2 {
font-size: 0.75rem;
font-family: var(--font-mono);
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--fg-faint);
border-bottom: none;
margin-top: 0;
padding-bottom: 0;
}
.backlinks-list {
margin-top: var(--r3);
padding-left: 0;
}
.backlinks-list li {
margin-bottom: var(--r2);
font-size: 0.875rem;
list-style: none;
padding-left: 0;
}
.backlinks-list li::before {
content: "↩ ";
font-size: 0.8em;
opacity: 0.4;
margin-right: var(--r1);
color: var(--accent);
}
.backlinks-list li a {
color: var(--link);
border-bottom: 1px solid transparent;
font-weight: 400;
transition: color var(--dur-fast), border-color var(--dur-fast);
}
.backlinks-list li a:hover {
color: var(--fg);
border-bottom-color: var(--fg-faint);
}
/* =========================================================
FOOTER
========================================================= */
footer {
color: var(--fg-faint);
padding: var(--r4) var(--r5);
border-top: 1px solid var(--border);
background: var(--bg);
text-align: center;
font-size: 0.78rem;
font-family: var(--font-mono);
letter-spacing: 0.03em;
flex-shrink: 0;
margin-top: 0;
}
footer a { color: var(--fg-faint); }
footer a:hover { color: var(--fg); }
/* =========================================================
FULLSCREEN PANE MODE
========================================================= */
body.pane-fullscreen #stack-root { overflow: hidden; }
body.pane-fullscreen .stack-track { width: 100%; }
body.pane-fullscreen .stack-pane {
width: 100% !important;
max-width: none;
border-right: none;
}
body.pane-fullscreen .stack-pane::after { display: none; }
body.pane-fullscreen .stack-pane:not(.is-fullscreen) { display: none; }
body.pane-fullscreen #content.content { max-width: 860px; }
/* =========================================================
BIGGER-PICTURE GALLERY
========================================================= */
.bp-x { right: 72px; }
.bp-next, .bp-prev { right: 8px; }
.bp-prev { left: 8px; }
.bp-wrap { transition: opacity 0.18s ease; }
.bp-wrap.bp-fadeout { opacity: 0; }
.bp-controls {
padding-top: env(safe-area-inset-top, 0);
padding-right: calc(env(safe-area-inset-right, 0) + 8px);
}
/* =========================================================
UTILITIES
========================================================= */
.hidden { display: none !important; }
.recipe-meta td:first-child { font-weight: 600; white-space: nowrap; }
.recipe-meta { font-size: 0.9em; opacity: 0.85; }
/* =========================================================
RESPONSIVE
========================================================= */
@media (max-width: 768px) {
.banner-header {
flex-wrap: wrap;
gap: var(--r3);
padding: var(--r3) var(--r4);
}
.banner-left {
flex-direction: row;
gap: var(--r3);
}
.banner-search {
max-width: 100%;
width: 100%;
order: 3;
}
.web-logo { display: none; }
.banner-actions {
margin-left: 0;
}
#stack-root {
overflow-x: hidden;
overflow-y: auto;
height: auto;
}
.stack-track {
flex-direction: column;
width: 100%;
}
.stack-pane {
width: 100%;
height: auto;
border-right: none;
border-bottom: 1px solid var(--border);
}
.pane-fullscreen { display: none !important; }
.title-section {
padding-right: var(--r5);
}
.title-controls {
position: static;
margin-bottom: var(--r3);
justify-content: flex-end;
}
}