@use 'sass:map'; $fonts: ( ('Lora', 'Lora-Medium', 500, normal), ('Inconsolata', 'Inconsolata-Regular', 400, normal), ('STIX Two Math', 'STIXTwoMath-Regular', 400, normal), ('CormorantGaramond', 'CormorantGaramond-Medium', 600, normal), ('CormorantGaramond', 'CormorantGaramond-Bold', 700, normal), ('CormorantGaramond', 'CormorantGaramond-MediumItalic', 700, italic), ); $breakpoints: ( 'mobile': 768px, 'toc': 1250px ); /* text color, background color (hex) */ $isa: ( ("info", #00529b, #bde5f8), ("success", #4f8a10, #dff2bf), ("warning", #9f6000, #fad776), ("error", #d8000c, #feebe3) ); @each $family, $file, $weight, $style in $fonts { @font-face { font-family: '#{$family}'; font-style: $style; font-weight: $weight; src: url('/fonts/#{$file}.woff2') format('woff2'); font-display: swap; } } @each $name, $textcolor, $bgcolor in $isa { .isa_#{$name} { color: $textcolor; background-color: $bgcolor; width: 90%; margin: 10px 0; padding: 12px; } } @mixin custom-scrollbar { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 50%, transparent) color-mix(in srgb, var(--accent) 8%, transparent); &::-webkit-scrollbar { height: 6px; width: 6px; } &::-webkit-scrollbar-track { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 4px; } &::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 4px; &:hover { background-color: var(--accent); } } } @mixin horizontal-scroll { display: block; overflow-x: auto; } @mixin bp($name) { $value: map.get($breakpoints, $name); @if $value { @media (max-width: $value) { @content; } } @else { @error "Screen size '#{$name}' is not defined in the $breakpoints map."; } } @function accent_rgba($aval) { @return rgb(from var(--accent) r g b / $aval); } :root { --bg-main: #FBF8F1; --text-main: #4A3F35; --text-highlight: #ffe066; --accent: #D4A373; --toc-bg: #F2EFE7; --link-color: #B0413E; --code-bg: #1e1e2e; --code-text: #cdd6f4; --code-radius: 6px; --font-serif: "Lora", serif; --font-mono: "Inconsolata", monospace; --font-header: "CormorantGaramond", serif; --font-math: "STIX Two Math",'Latin Modern Math', serif; } ::selection { color: var(--text-main); background: var(--text-highlight); } *, *::before, *::after { box-sizing: border-box; } /* scrollbar */ ::-webkit-scrollbar { width: 12px; height: 12px; } ::-webkit-scrollbar-track { background: var(--bg-main); } ::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--accent) 60%, var(--bg-main)); border-radius: 8px; border: 3px solid var(--bg-main); &:hover { background-color: var(--accent); } } html { scrollbar-color: color-mix(in srgb, var(--accent) 60%, var(--bg-main)) var(--bg-main); scrollbar-width: thin; } body { background: radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px), var(--bg-main); background-size: 6px 6px; margin: 0; padding: 0; padding-left: 250px; color: var(--text-main); font-family: var(--font-serif), serif; font-size: 18px; line-height: 1.75; font-weight: 500; font-variant-ligatures: common-ligatures; min-height: 100vh; -webkit-font-smoothing: antialiased; @include bp('toc') { padding-left: 0; font-size: 20px; } } main, header, footer { width: 100%; max-width: 85ch; padding: 1rem 20px; margin: 0 auto; } h1, h2, h3 { line-height: 1.2; font-family: var(--font-header), serif; } h4, h5, h6 { font-family: var(--font-mono), monospace; line-height: 1.3; margin-top: 1.5rem; margin-bottom: 0.5rem; } h1, h2 { padding-bottom: 8px; margin-top: 2.5rem; letter-spacing: -0.01em; position: relative; } h1 { font-size: 2.3rem; margin-top: 3rem; margin-bottom: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; } h2 { font-size: 1.6rem; margin-top: 2.5rem; margin-bottom: 0.6rem; @include bp('mobile') { font-size: 1.5rem; } } h3 { font-size: 1.25rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.4rem; letter-spacing: 0.02em; } h4 { font-size: 1.1rem; font-weight: 700; color: var(--text-main); } h5 { font-size: 1rem; font-weight: 700; color: var(--link-color); } h6 { font-size: 0.85rem; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; color: color-mix(in srgb, var(--text-main) 60%, transparent); } p, ul, ol { margin-top: 1rem; margin-bottom: 1rem; } li { margin-top: 0.3rem; } a, .org-link { color: var(--link-color); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; transition: all 0.2s ease-in-out; &:hover { color: color-mix(in srgb, var(--link-color) 80%, black); text-decoration-thickness: 4px; } } dl { margin: 1.5rem 0 2rem 0; } dt { margin-top: 1rem; font-family: var(--font-mono), monospace; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: color-mix(in srgb, var(--text-main) 80%, transparent); } dd { margin: 0.3rem 0 0 1.5rem; color: var(--text-main); } table { display: block; table-layout: fixed; width: 100%; margin: 2rem 0; font-size: 0.95rem; line-height: 1.5; background: color-mix(in srgb, var(--accent) 4%, var(--bg-main)); @include horizontal-scroll; @include custom-scrollbar; } th, td { padding: 0.75rem 0.9rem; text-align: left; vertical-align: top; } thead th { font-family: var(--font-mono), monospace; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; background: color-mix(in srgb, var(--accent) 10%, var(--bg-main)); border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); } tbody tr + tr td { border-top: 1px solid color-mix(in srgb, var(--text-main) 8%, transparent); } figure { margin: 2rem auto; text-align: center; } figcaption { font-family: var(--font-serif); font-size: 0.9rem; color: color-mix(in srgb, var(--text-main) 80%, gray); margin-top: 0.5rem; } img { border-radius: 10px; display: block; margin: 2rem auto; max-width: 50%; width: auto; height: auto; @include bp('mobile') { max-width: 100%; } } /* inline code blocks */ :not(pre) > code { font-family: var(--font-mono), monospace; background: var(--code-bg); color: var(--code-text); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.85em; white-space: pre-wrap; word-break: break-word; } pre { font-family: var(--font-mono), monospace; &.src-stem::before { content: "Stem"; } } blockquote { width: 80%; margin: 40px auto; font-style: italic; color: var(--text-main); padding: 1.5em 30px 1.5em 60px; border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; line-height: 1.6; position: relative; background: color-mix(in srgb, var(--accent) 15%, transparent); @include bp('mobile') { padding: 1em 15px 1em 40px; width: 100%; } &::before { font-family: var(--font-serif), serif; content: "\201C"; color: var(--accent); font-size: 5em; position: absolute; left: 10px; top: -20px; opacity: 0.5; } } math { display: inline-block; white-space: nowrap; &[display="block"] { font-family: var(--font-math); font-size: 1.3em; min-width: 0; overflow-y: hidden; & mtable { margin-left: 0; text-align: left; } & mtd { text-align: left; } @include custom-scrollbar; @include horizontal-scroll; } } h1.title { padding-top: 1.5rem; margin-top: 0.5rem; } .underline { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; } .footdef .footpara, .footdef p { display: inline; margin: 0; } .footdef { display: block; sup { display: inline; vertical-align: super; margin-right: 0.25em; } } .footnotes-label-hidden { display: none; } .title { font-size: 2.6rem; margin-bottom: 0.5rem; text-align: center; & .subtitle { text-align: center; font-style: italic; padding-bottom: 30px; /* maybe change */ margin-top: 10px; color: #555; display: block; font-size: 1.2rem; font-family: var(--font-header), serif; } } .author, .date { display: inline; font-family: var(--font-serif), serif; font-style: italic; font-size: 1.1rem; color: color-mix(in srgb, var(--text-main) 70%, gray); } .author { &::before { content: "by "; font-family: var(--font-mono), monospace; font-style: normal; font-weight: bold; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; margin-right: 4px; text-align: center; } &:not(:last-child)::after { content: ", "; font-style: normal; } } .todo, .done, .tag, .timestamp-wrapper { font-family: var(--font-mono), monospace; font-size: 0.75em; font-weight: bold; letter-spacing: 1px; padding: 2px 8px; border-radius: 4px; vertical-align: middle; margin-right: 6px; } .todo.TODO { color: #5c3a21; background-color: color-mix(in srgb, var(--accent) 30%, var(--bg-main)); border: 1px solid var(--accent); } .done.DONE { color: #2a3b24; background-color: #e4e7d3; border: 1px solid #8f9e76; } .timestamp-wrapper { margin-left: 8px; font-weight: normal; color: #5e4a57; background-color: #efe6eb; border: 1px solid #c8b2bc; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 32ch; vertical-align: middle } .tag { margin-left: 8px; font-weight: normal; color: color-mix(in srgb, var(--text-main) 80%, transparent); background-color: color-mix(in srgb, var(--accent) 15%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16ch; vertical-align: middle } .theorem, .lemma, .corollary, .definition, .proof { display: block; font-style: normal; background: color-mix(in srgb, var(--accent) 8%, transparent); border-left: 3px solid var(--accent); padding: 1rem 1.3rem; margin: 2rem 0 20px 10px; &::before { font-weight: bold; margin-right: 0.4em; } } .theorem::before { content: "Theorem."; } .lemma::before { content: "Lemma."; } .corollary::before { content: "Corollary."; } .definition::before { content: "Definition."; } .proof { position: relative; margin-bottom: 30px; padding-right: 1.2em; &::before { content: "Proof.\00a0\00a0"; } &::after { content: ""; position: absolute; right: 0; bottom: 0.2em; width: 0.65em; height: 0.65em; border: 0.08em solid currentColor; box-sizing: border-box; } } .links-page > ul { columns: 2; @include bp('mobile') { columns: 1; } } .org-svg { width: 100%; max-width: none; } .verse { width: fit-content; max-width: min(100%, 38rem); margin: 2rem auto; padding: 1.25rem 1.5rem; white-space: pre-wrap; line-height: 1.9; font-style: italic; color: color-mix(in srgb, var(--text-main) 92%, transparent); background: color-mix(in srgb, var(--accent) 6%, transparent); } .src, .example { @include custom-scrollbar; @include horizontal-scroll; position: relative; background: var(--code-bg); color: var(--code-text); padding: 1rem; border-radius: 6px; font-size: 0.9rem; &::before { position: absolute; top: 0.5rem; right: 0.5rem; float: right; z-index: 10; font-family: var(--font-mono), monospace; font-size: 0.7rem; opacity: 0.5; pointer-events: none; background: var(--code-bg); padding: 2px 4px; } } .org-center { text-align: center; } .question { width: 80%; margin: 40px auto; font-style: normal; color: var(--text-main); padding: 1.5em 30px 1.5em 60px; border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; line-height: 1.6; position: relative; z-index: 1; background: color-mix(in srgb, var(--accent) 8%, transparent); @include bp('mobile') { padding: 1em 15px 1em 40px; width: 100%; } &::before { font-family: var(--font-serif), serif; content: "?"; color: var(--accent); font-size: 5em; position: absolute; left: 15px; top: -15px; opacity: 0.5; z-index: 0; } &::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; background-color: var(--accent); opacity: 0.2; // This is your exact SVG, just safely encoded in Base64 $svg-mask: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48dGV4dCB4PSIxNSIgeT0iMjIiIGZvbnQtZmFtaWx5PSJzeXN0ZW0tdWksIHNhbnMtc2VyaWYiIGZvbnQtd2VpZ2h0PSJib2xkIiBmb250LXNpemU9IjIwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj4/PC90ZXh0Pjx0ZXh0IHg9IjQ1IiB5PSI1MiIgZm9udC1mYW1pbHk9InN5c3RlbS11aSwgc2Fucy1zZXJpZiIgZm9udC13ZWlnaHQ9ImJvbGQiIGZvbnQtc2l6ZT0iMjAiIHRleHQtYW5jaG9yPSJtaWRkbGUiPj88L3RleHQ+PC9zdmc+"; -webkit-mask-image: url(#{$svg-mask}); mask-image: url(#{$svg-mask}); -webkit-mask-size: 60px 60px; mask-size: 60px 60px; -webkit-mask-repeat: repeat; mask-repeat: repeat; } > * { position: relative; } } .equation-container { display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; align-items: center; width: 100%; box-sizing: border-box; margin: 2rem 0; background: accent_rgba(0.05); padding: 1.5rem; border-left: 2px solid var(--accent); .equation { grid-column: 2; text-align: center; & math[display="block"] { margin: 0; } @include horizontal-scroll; @include custom-scrollbar; } .equation-label { grid-column: 3; justify-self: end; } } .org-src-container { position: relative; margin: 1.2em 0; color: var(--code-text); background: var(--code-bg); padding: 1.5rem 1rem 1rem 1rem; overflow-x: auto; overflow-y: hidden; @include custom-scrollbar; pre.src { margin: 0; border: none; overflow: visible; display: inline-block; min-width: 100%; width: max-content; padding-right: 1rem; box-sizing: border-box; } } .figure { margin: 2rem auto; text-align: center; display: flex; flex-direction: column; align-items: center; p:last-of-type { font-size: 0.9rem; color: color-mix(in srgb, var(--text-main) 80%, gray); margin-top: 0.5rem; max-width: 80%; } } .figure-number { font-weight: 700; font-family: var(--font-serif); color: var(--text-main); } #preamble { margin-top: 10px; margin-bottom: 0; .preamble { font-family: var(--font-mono), monospace; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: color-mix(in srgb, var(--text-main) 50%, transparent); } a { color: var(--text-main); text-decoration: none; padding: 4px 8px; border-radius: 4px; transition: all 0.2s ease; &:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--link-color); } } & hr { border: none; height: 1px; background: linear-gradient(to right, var(--accent), transparent); opacity: 0.5; width: 100%; margin: 1rem 0 0 0; } } #table-of-contents { height: 100vh; width: 250px; position: fixed; z-index: 10; top: 0; left: 0; padding-top: 0; background: var(--toc-bg); border-right: 1px solid var(--accent); overflow-y: auto; overflow-x: hidden; @include custom-scrollbar; &::before { content: "NAVIGATION"; display: block; padding: 24px 16px 12px 19px; font-family: var(--font-mono), monospace; font-size: 11px; font-weight: bold; letter-spacing: 2px; color: var(--text-main); border-bottom: 1px solid accent_rgba(0.2); margin-bottom: 10px; } ul { list-style-type: none; padding-left: 0; margin: 0; a { display: block; width: 100%; padding: 10px 16px 10px 32px; font-size: 15px; font-family: var(--font-mono), monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); border-left: 3px solid transparent; &, &:visited { color: var(--text-main); text-decoration: none; } &:hover { background-color: var(--text-main); color: var(--bg-main); padding-left: 22px; border-left: 3px solid var(--accent); } } ul { a { padding-left: 48px; opacity: 0.85; font-size: 13px; &:hover { padding-left: 38px; opacity: 1; } } ul{ a { padding-left: 64px; opacity: 0.75; &:hover { padding-left: 54px; } } } } } h2 { display: none; } @include bp('toc') { display: none; } } #postamble { text-align: center; } #content { padding-top: 0; } #footnotes { padding-top: 1rem; } #footnotes hr { margin-top: 0; margin-bottom: 0; } #footnotes hr { margin-top: 1rem; margin-bottom: 0.5rem; }