@import url("fonts.css"); :root { --background-color: #fafafa; --foreground-color: #212121; --highlighted-background-color: #fffde7; --glassy-background-color: #fafafadf; } @media screen and (prefers-color-scheme: dark) { :root { --background-color: #212121; --foreground-color: #fafafa; --highlighted-background-color: #424242; --glassy-background-color: #212121df; } } html { width: 100%; height: 100%; background-color: var(--background-color); color: var(--foreground-color); font-family: var(--font-content); } body { margin: auto; display: flex; flex-direction: column; /* position: relative; */ width: 100%; max-width: 1024px; min-height: 100%; margin-top: 64px; &::before { content: ""; display: block; position: fixed; pointer-events: none; inset: 0; z-index: 1000; width: 100%; max-width: 1024px; margin: auto; border-left: solid 1px var(--foreground-color); } } header { display: flex; position: fixed; top: 0; z-index: 2; &:before { content: ""; display: block; position: fixed; inset: 0; height: 64px; pointer-events: none; z-index: -1; background-color: var(--glassy-background-color); backdrop-filter: blur(8px); } &:after { content: ""; display: block; position: fixed; pointer-events: none; inset: 0; height: 64px; border-bottom: solid 1px var(--foreground-color); } #logo { text-decoration: none; color: var(--foreground-color); font-family: var(--font-heading); line-height: 64px; font-size: 1.5rem; &::before { content: ""; display: inline-block; background-color: var(--foreground-color); width: 64px; height: 64px; float: left; mask-image: url(../img/logo-black.svg); mask-size: 100% 100%; } } nav { flex: 1; menu { display: flex; height: 100%; justify-content: flex-end; align-items: stretch; margin: 0; padding: 0; li { list-style: none; a { display: block; padding: 4px 16px 0; height: 100%; box-sizing: border-box; display: flex; align-items: center; border-bottom: solid 4px transparent; &:hover, &.current { text-decoration: none; border-bottom-color: var(--foreground-color); } } } } } } nav#index { flex: 1; margin: 32px 8px 16px; display: flex; flex-direction: column; section { position: relative; h1 { position: absolute; width: 0; font-size: 0; left: -16px; height: 100%; time { position: sticky; top: 72px; margin-left: -2ic; margin-bottom: 8px; display: inline-block; overflow: hidden; font-family: var(--font-calendar-nav); text-transform: uppercase; font-size: 1.5rem; line-height: 1; span { display: block; text-align: right; } .day { font-size: 1.5em; } .month { font-size: 1em; } .year, .month.four { font-size: 0.75em; } } } article { h2 { margin: 0; font-size: 2rem; } ul.tags { margin: 0; padding: 0; display: flex; gap: 8px; font-size: 0.8rem; li { list-style: none; display: inline-block; padding: 2px 8px; background-color: var(--foreground-color); color: var(--background-color); border-radius: 4px; } } } } } main { flex: 1; display: flex; margin: 32px 8px 16px -248px; gap: 16px; } svg { path, rect, polygon { stroke: var(--foreground-color); &.filled { fill: var(--background-color); } } text { font-family: var(--font-content); fill: var(--foreground-color); } } footer { text-align: center; } h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: normal; margin-top: 0; padding: 0; } h1 { font-size: 2.25rem; } a { color: unset; text-decoration: none; &:hover { text-decoration: underline; } } figure { margin: 0; padding: 0; figcaption { text-align: center; position: relative; margin-top: 16px; &::before { content: ""; display: block; width: 256px; border-top: solid 1px var(--foreground-color); position: absolute; inset: -8px 0 auto; margin: auto; } } } @media screen and (max-width: 1536px /* 1024 + 2*(240+16) */) { body::before { display: none; } main { margin: 32px 8px 16px; & > nav#toc { position: relative; &::after { content: ""; position: absolute; inset: 0 -8px 0 auto; border-right: solid 1px var(--foreground-color); } } } } @media screen and (max-width: 1164px) { nav#index section { h1 { width: unset; font-size: 2rem; position: sticky; inset: 64px 0 auto; background-color: var(--glassy-background-color); backdrop-filter: blur(8px); padding: 8px 0 16px; &::after { content: ""; position: absolute; inset: auto 0 8px; border: solid 1px var(--foreground-color); } time { margin-left: 0; position: static; display: inline; font-family: unset; font-size: unset; .day, .month, .year { display: inline !important; font-size: unset; } } } } } @media screen and (max-width: 1024px) { main { flex-direction: column; & > nav#toc { width: auto; &::after { display: none; } } } }