@import 'fonts.scss'; $font-size-2: 19px; $landing-size-value: 2.2; $landing-line-height: 1.4em; $font-family-body: 'Castoro', serif; @mixin light-theme { --color-bg: #fff; --color-text: #111; --color-accent: #b91c1c; --color-accent-hover: #df2929; --color-muted: #60606f; --color-faint: #afafb9; --color-rule: #ddd; --color-code-bg: #f4f4f2; } @mixin dark-theme { --color-bg: #2d3929; --color-text: #f5f2e9; --color-accent: #e38a3d; --color-accent-hover: #e9a56a; --color-muted: #b0b4a7; --color-faint: #9b9f93; --color-rule: #1a1d19; --color-code-bg: #1a1d19; } :root { @include light-theme; color-scheme: light; } @media (prefers-color-scheme: dark) { :root { @include dark-theme; color-scheme: dark; } } html[data-theme="light"] { @include light-theme; color-scheme: light; } html[data-theme="dark"] { @include dark-theme; color-scheme: dark; } * { box-sizing: border-box; } html { font-family: $font-family-body; font-weight: 500; font-size: $font-size-2; line-height: 1.4; background: var(--color-bg); } body { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; color: var(--color-text); } a { color: var(--color-accent); &:hover { color: var(--color-accent-hover); } } header { display: flex; flex-wrap: nowrap; flex: 1 0 67%; align-items: center; .logo { flex-grow: 0; flex-shrink: 0; img { width: auto; height: 100px; max-width: 100%; } } nav { text-align: right; margin-left: auto; padding-left: 2.5vw; flex-grow: 1; flex-shrink: 1; a { font-family: sans-serif; font-weight: 700; &:not(:first-child) { margin-left: 2.5vw; } } } } .header-actions { display: flex; align-items: center; gap: 1rem; margin-left: 2.5vw; } .language-switcher { display: flex; align-items: center; gap: 0.4rem; font-family: sans-serif; font-size: 0.8rem; font-weight: 700; a { color: var(--color-muted); text-decoration: none; &:hover { color: var(--color-accent); } } .is-current { color: var(--color-text); } } .language-sep { color: var(--color-faint); } .theme-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 0.25rem; border: 0; border-radius: 4px; background: none; color: var(--color-accent); cursor: pointer; svg { display: block; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .icon-sun { display: none; } &:hover { color: var(--color-accent-hover); } &:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; } } html[data-theme="dark"] .theme-toggle .icon-sun { display: block; } html[data-theme="dark"] .theme-toggle .icon-moon { display: none; } @media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; } html:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; } } //html[data-theme="dark"] .logo-type { // filter: brightness(1.5); //} // //@media (prefers-color-scheme: dark) { // html:not([data-theme="light"]) .logo-type { // filter: brightness(1.5); // } //} html[data-theme="dark"] main .highlight pre { background: var(--color-code-bg) !important; } @media (prefers-color-scheme: dark) { html:not([data-theme="light"]) main .highlight pre { background: var(--color-code-bg) !important; } } .fine-line { color: var(--color-faint); } footer { text-align: center; margin-top: 2rem; color: var(--color-muted); display: flex; flex-direction: column; justify-content: center; .links { display: flex; justify-content: center; } a { color: var(--color-muted); } } main { h1, h2, h3, h4 { line-height: 1.15; text-wrap: balance; } h1 { font-size: 2.1rem; } h2 { margin-top: 3rem; margin-bottom: 1rem; font-size: 1.75rem; &::after { content: ""; display: block; width: 3rem; height: 3px; margin-top: 0.6rem; border-radius: 2px; background: var(--color-accent); } } h3 { margin-top: 2rem; margin-bottom: 0.5rem; font-size: 1.25rem; line-height: 1.2; } p, ul, ol, blockquote { margin: 1rem 0; } ul, ol { padding-left: 1.5rem; } blockquote { margin-left: 0; padding-left: 1rem; border-left: 3px solid var(--color-accent); color: var(--color-muted); } img { max-width: 100%; height: auto; } hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--color-rule); } code { padding: 0.1em 0.3em; border-radius: 3px; background: var(--color-code-bg); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; } pre { padding: 1rem; overflow-x: auto; border-radius: 4px; background: var(--color-code-bg); code { padding: 0; background: none; font-size: 0.8rem; } } table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; } th, td { padding: 0.4rem 0.6rem; border: 1px solid var(--color-rule); text-align: left; } th { background: var(--color-code-bg); } } .post-meta { color: var(--color-muted); font-family: sans-serif; font-size: 0.8rem; } .post-title { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.4rem; line-height: 1.2; &::after { display: none; } } .post-translations { margin-top: 2rem; color: var(--color-muted); font-family: sans-serif; font-size: 0.8rem; } .empty-state { margin: 2rem 0; padding: 1.5rem; border: 1px dashed var(--color-rule); border-radius: 4px; color: var(--color-muted); text-align: center; } .work-intro { margin-bottom: 2.5rem; } .work-blurb p { color: var(--color-muted); } .project-list { margin: 0; padding: 0; list-style: none; } .project { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto 1.5rem; gap: 1rem; align-items: start; padding: 1.25rem 0; border-top: 1px solid var(--color-rule); } .project:last-child { border-bottom: 1px solid var(--color-rule); } .project-index { padding-top: 0.2rem; color: var(--color-muted); font-family: sans-serif; font-size: 0.8rem; } .project-name { margin: 0; font-size: 1.15rem; line-height: 1.2; &::after { display: none; } } .project-name a { text-decoration: none; } .project-name a:hover { text-decoration: underline; } .project-blurb { margin: 0.35rem 0 0; color: var(--color-muted); font-size: 0.9rem; } .project-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0 0; padding: 0; list-style: none; font-family: sans-serif; font-size: 0.75rem; } .project-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; } .project-tags li { padding: 0.15rem 0.35rem; border: 1px solid var(--color-rule); border-radius: 3px; color: var(--color-muted); font-family: sans-serif; font-size: 0.65rem; letter-spacing: 0.06em; text-transform: uppercase; } .project-arrow { color: var(--color-accent); font-size: 1.2rem; line-height: 1; svg { display: block; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; } } @media (max-width: 640px) { .project { grid-template-columns: 2rem minmax(0, 1fr); } .project-tags { grid-column: 2; } .project-arrow { display: none; } } .landing p { font-style: normal; font-size: calc(calc(#{$landing-size-value} - 1) * calc(.012 * min(100vh, 900px)) + 1rem); font-weight: 400; line-height: calc(#{$landing-line-height} * (1 + (1 - #{$landing-size-value})/25)); text-align: justify; } @media (max-width: 640px) { header { flex-wrap: wrap; } header nav { order: 3; width: 100%; margin-top: 0.75rem; padding-left: 0; } .header-actions { margin-left: auto; } }