383 lines
6.9 KiB
CSS
383 lines
6.9 KiB
CSS
:root {
|
|
--ink: #251f1a;
|
|
--ink-soft: #4b3f34;
|
|
--paper: #f5efe6;
|
|
--paper-deep: #e9ddcc;
|
|
--accent: #b6522f;
|
|
--accent-deep: #7a2e1a;
|
|
--nav-bg: #efe4d6;
|
|
--highlight: #f3c98b;
|
|
--shadow: rgba(45, 34, 26, 0.18);
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html {
|
|
max-width: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
max-width: 100%;
|
|
color: var(--ink);
|
|
background:
|
|
radial-gradient(
|
|
circle at 20% 20%,
|
|
rgba(255, 255, 255, 0.55),
|
|
transparent 45%
|
|
),
|
|
radial-gradient(
|
|
circle at 80% 0%,
|
|
rgba(236, 196, 140, 0.35),
|
|
transparent 50%
|
|
),
|
|
linear-gradient(135deg, #fbf7f2 0%, #efe0cb 50%, #f8f1e7 100%);
|
|
font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.page {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.hero {
|
|
padding: clamp(24px, 6vw, 48px) clamp(16px, 6vw, 6vw) clamp(16px, 4vw, 32px);
|
|
background:
|
|
linear-gradient(120deg, rgba(182, 82, 47, 0.12), transparent 55%),
|
|
linear-gradient(220deg, rgba(122, 46, 26, 0.18), transparent 45%);
|
|
border-bottom: 1px solid rgba(63, 44, 31, 0.2);
|
|
animation: fade-up 0.8s ease both;
|
|
}
|
|
|
|
.hero h1 {
|
|
font-family:
|
|
"Iowan Old Style", "Palatino Linotype", "Book Antiqua", Garamond, serif;
|
|
font-size: clamp(1.5rem, 6vw, 3.6rem);
|
|
letter-spacing: 0.02em;
|
|
margin: 0 0 8px;
|
|
}
|
|
|
|
.hero p {
|
|
margin: 0;
|
|
max-width: 54ch;
|
|
color: var(--ink-soft);
|
|
font-size: 1.05rem;
|
|
}
|
|
|
|
.layout {
|
|
display: grid;
|
|
grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
|
|
gap: clamp(16px, 4vw, 28px);
|
|
padding: clamp(16px, 4vw, 32px) clamp(12px, 6vw, 6vw) clamp(32px, 8vw, 64px);
|
|
}
|
|
|
|
.toc {
|
|
background: var(--nav-bg);
|
|
border-radius: 18px;
|
|
padding: clamp(16px, 4vw, 24px);
|
|
box-shadow: 0 18px 40px var(--shadow);
|
|
position: sticky;
|
|
top: 24px;
|
|
max-height: calc(100vh - 48px);
|
|
overflow: auto;
|
|
animation: fade-up 0.8s ease 0.1s both;
|
|
}
|
|
|
|
.toc h2 {
|
|
margin-top: 0;
|
|
font-size: 1.1rem;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
color: var(--accent-deep);
|
|
}
|
|
|
|
.toc input {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
border-radius: 10px;
|
|
border: 1px solid rgba(70, 50, 36, 0.2);
|
|
font-size: 0.95rem;
|
|
margin-bottom: 14px;
|
|
background: #fffaf3;
|
|
}
|
|
|
|
.toc-letters {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
|
|
gap: 6px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.toc-letters a {
|
|
font-size: 0.75rem;
|
|
text-decoration: none;
|
|
text-align: center;
|
|
color: var(--accent-deep);
|
|
padding: 4px 6px;
|
|
border-radius: 6px;
|
|
background: rgba(182, 82, 47, 0.12);
|
|
}
|
|
|
|
.toc-letters a:hover {
|
|
background: rgba(182, 82, 47, 0.25);
|
|
}
|
|
|
|
.toc-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
display: grid;
|
|
gap: 6px;
|
|
}
|
|
|
|
.toc-list a {
|
|
text-decoration: none;
|
|
color: var(--ink);
|
|
padding: 6px 8px;
|
|
border-radius: 10px;
|
|
display: block;
|
|
transition:
|
|
background 0.2s ease,
|
|
color 0.2s ease;
|
|
}
|
|
|
|
.toc-list a:hover,
|
|
.toc-list a:focus {
|
|
background: rgba(182, 82, 47, 0.15);
|
|
color: var(--accent-deep);
|
|
}
|
|
|
|
.toc-list a.active {
|
|
background: rgba(182, 82, 47, 0.22);
|
|
color: var(--accent-deep);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.content {
|
|
background: rgba(255, 255, 255, 0.6);
|
|
border-radius: clamp(12px, 3vw, 24px);
|
|
padding: clamp(16px, 4vw, 32px) clamp(16px, 5vw, 36px);
|
|
box-shadow: 0 20px 55px var(--shadow);
|
|
animation: fade-up 0.8s ease 0.2s both;
|
|
overflow-wrap: break-word;
|
|
word-wrap: break-word;
|
|
min-width: 0;
|
|
}
|
|
|
|
.content h2,
|
|
.content h3 {
|
|
font-family:
|
|
"Iowan Old Style", "Palatino Linotype", "Book Antiqua", Garamond, serif;
|
|
letter-spacing: 0.02em;
|
|
color: var(--accent-deep);
|
|
}
|
|
|
|
.entry-title {
|
|
font-weight: 700;
|
|
color: var(--accent-deep);
|
|
letter-spacing: 0.04em;
|
|
animation: fade-up 0.6s ease both;
|
|
animation-delay: var(--entry-delay, 0s);
|
|
scroll-margin-top: 1rem;
|
|
}
|
|
|
|
.entry-title:target {
|
|
background: var(--highlight);
|
|
padding: 2px 6px;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.entry-link {
|
|
color: var(--accent);
|
|
text-decoration: none;
|
|
border-bottom: 1px dashed rgba(122, 46, 26, 0.4);
|
|
}
|
|
|
|
.entry-link:hover {
|
|
color: var(--accent-deep);
|
|
border-bottom-style: solid;
|
|
}
|
|
|
|
.note {
|
|
font-style: italic;
|
|
color: var(--ink-soft);
|
|
}
|
|
|
|
@keyframes fade-up {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(16px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* Collapse/expand toggle */
|
|
.toc-toggle {
|
|
position: fixed;
|
|
left: 0;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
z-index: 100;
|
|
background: var(--accent);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 0 8px 8px 0;
|
|
padding: 12px 8px;
|
|
cursor: pointer;
|
|
font-size: 1.2rem;
|
|
box-shadow: 2px 2px 8px var(--shadow);
|
|
transition:
|
|
background 0.2s ease,
|
|
left 0.3s ease;
|
|
}
|
|
|
|
.toc-toggle:hover {
|
|
background: var(--accent-deep);
|
|
}
|
|
|
|
.toc-toggle::before {
|
|
content: "◀";
|
|
display: block;
|
|
}
|
|
|
|
.toc.collapsed + .content ~ .toc-toggle::before,
|
|
body.toc-collapsed .toc-toggle::before {
|
|
content: "▶";
|
|
}
|
|
|
|
.toc {
|
|
transition:
|
|
margin-left 0.3s ease,
|
|
opacity 0.3s ease,
|
|
width 0.3s ease;
|
|
}
|
|
|
|
.toc.collapsed {
|
|
margin-left: -340px;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.layout {
|
|
transition: grid-template-columns 0.3s ease;
|
|
}
|
|
|
|
.layout.toc-hidden {
|
|
grid-template-columns: 0 minmax(0, 1fr);
|
|
}
|
|
|
|
/* Entry popup preview */
|
|
.entry-popup {
|
|
position: fixed;
|
|
z-index: 300;
|
|
max-width: min(420px, 90vw);
|
|
max-height: min(320px, 60vh);
|
|
overflow-y: auto;
|
|
background: var(--paper);
|
|
border-radius: 12px;
|
|
padding: 16px 20px;
|
|
box-shadow:
|
|
0 8px 32px var(--shadow),
|
|
0 2px 8px rgba(45, 34, 26, 0.1);
|
|
border: 1px solid rgba(70, 50, 36, 0.15);
|
|
font-size: 0.95rem;
|
|
line-height: 1.55;
|
|
opacity: 0;
|
|
transform: translateY(4px);
|
|
transition:
|
|
opacity 0.2s ease,
|
|
transform 0.2s ease;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.entry-popup.visible {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.entry-popup .entry-title {
|
|
animation: none;
|
|
}
|
|
|
|
.entry-popup p {
|
|
margin: 0 0 0.75em;
|
|
}
|
|
|
|
.entry-popup p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.entry-popup .entry-link {
|
|
pointer-events: auto;
|
|
}
|
|
|
|
@media (max-width: 700px) {
|
|
.page,
|
|
.hero,
|
|
.content {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.toc {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: min(85vw, 320px);
|
|
max-height: 100vh;
|
|
border-radius: 0 18px 18px 0;
|
|
z-index: 200;
|
|
margin-left: 0;
|
|
transform: translateX(-100%);
|
|
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
animation: none;
|
|
}
|
|
|
|
body.toc-open .toc {
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.toc-toggle {
|
|
top: 50%;
|
|
bottom: auto;
|
|
transform: translateY(-50%);
|
|
z-index: 201;
|
|
transition: left 0.3s ease;
|
|
padding: 10px 6px;
|
|
font-size: 1rem;
|
|
left: 0;
|
|
}
|
|
|
|
body.toc-open .toc-toggle {
|
|
left: min(85vw, 320px);
|
|
}
|
|
|
|
.toc-toggle::before {
|
|
content: "▶";
|
|
}
|
|
|
|
body.toc-open .toc-toggle::before {
|
|
content: "◀";
|
|
}
|
|
|
|
.layout,
|
|
.layout.toc-hidden {
|
|
display: block;
|
|
grid-template-columns: none;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.content {
|
|
border-radius: clamp(8px, 2vw, 16px);
|
|
}
|
|
}
|