/* VARIABLES with default LIGHT MODE */ :root { --bg-main: #fffff0; --bg-special: #e9d79f; --border-radius-max: 250px; --border-radius-minimal: 5px; --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif; --font-size-default: 1rem; --font-size-h1: 2rem; --font-size-small: 0.85rem; --gap-default: 1rem; --gap-large: 2rem; --gap-small: 0.5rem; --line-height-default: 1.5; --line-height-heading: 1.2; --link-color: #996100; --link-hover: #b58900; --margin-padding-Y-default: 20px 0; --margin-padding-Y-big: 40px 0; --margin-padding-Y-small: 10px 0; --text-color: #1e1e1e; } /* BASICS */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-family: var(--font-family); font-size: var(--font-size-default); line-height: var(--line-height-default); scroll-behavior: smooth; & .theme-toggle .icon-moon { display: block; } & .theme-toggle .icon-sun { display: none; } /* DARK MODE */ &[data-theme="dark"] { --bg-main: #0a234a; --bg-special: #1e4a73; --link-color: #4fc3f7; --link-hover: #039be5; --text-color: #e0e0e0; & .theme-toggle .icon-moon { display: none; } & .theme-toggle .icon-sun { display: block; } } } body { background-color: var(--bg-main); color: var(--text-color); display: grid; grid-template-rows: auto auto 1fr auto; /* Ensure header & navmenu at top, main taking up main space, footer at bottom */ margin: 1.5rem auto; max-width: 80ch; min-height: 100vh; } main { margin: 0.5rem 0; p { margin-bottom: var(--gap-default); } /* Avoid affecting icon imgs in header & footer */ & img { border-radius: var(--border-radius-minimal); max-width: 90%; @media (max-width: 768px) { max-width: 100%; } } @media (max-width: 1024px) { margin: 20px; } } /* TYPOGRAPHY & text elements */ a { color: var(--link-color); font-weight: bold; &:hover { color: var(--link-hover); text-decoration: none; } } blockquote { border-left: 4px solid var(--bg-special); font-style: italic; margin: var(--gap-large); padding-left: 0.8rem; @media (max-width: 1024px) { margin: var(--gap-large) 0; } } dl { margin-left: 1rem; dt { color: var(--link-color); font-weight: bold; padding: var(--margin-padding-Y-small); } dd { line-height: var(--line-height-body); padding-left: 1.5rem; } } figure { font-style: italic; margin: var(--gap-small) 0 var(--gap-default) 0; text-align: center; } h1, h2, h3, h4, h5, h6 { line-height: var(--line-height-heading); margin: var(--gap-large) 0 var(--gap-default); } h1 { font-size: var(--font-size-h1); } h2 { font-size: 1.7rem; } h3 { font-size: 1.5rem; } h4 { font-size: 1.2rem; } h5 { font-size: 1.1rem; } h6 { font-size: var(--font-size-default); } hr { border: none; border-top: 2px solid var(--bg-special); color: var(--bg-special); } /* Lists generated from markdown text */ ol, ul { padding-left: 1.5rem; margin-bottom: var(--gap-default); } /* Lists for site navigation */ ul[class$="list"] { list-style: none; padding-left: 0; margin-bottom: 0; } section { margin: var(--margin-padding-Y-default); } time { font-style: italic; } ::selection { background-color: var(--link-hover); color: var(--bg-main); } /* Code block */ .highlight { margin: 1rem auto; & > pre { border-radius: var(--border-radius-minimal); padding: 0.5rem; } } /* HEADER */ .site__header { display: flex; align-items: center; justify-content: space-around; margin-bottom: 1.5rem; } .site-selections, .site-selections * { display: flex; align-items: center; justify-content: center; gap: var(--gap-default); } .site-title { color: inherit !important; font-size: var(--font-size-h1); font-weight: bold; text-decoration: none; } /* Flag Icon */ .language-select__language-item img { height: 2rem; } .theme-toggle { background-color: var(--text-color); border: none; border-radius: var(--border-radius-max); color: var(--bg-main); cursor: pointer; padding: 0.2rem; } .theme-toggle svg { display: none; } /* SITE NAVMENU */ .header__navigation { background-color: var(--bg-special); border-radius: var(--border-radius-minimal); padding: var(--margin-padding-Y-small); } .header__navigation-list { display: flex; align-items: center; justify-content: space-evenly; @media (max-width: 768px) { flex-direction: column; gap: 0.8rem; } } .header__navigation-link--active { color: var(--text-color); text-decoration: none; } /* FOOTER */ .site__footer { display: flex; align-items: center; justify-content: space-around; margin-top: 1.5rem; @media (max-width: 768px) { flex-direction: column; gap: var(--gap-default); } } .follow-me-list { display: flex; align-items: start; justify-content: center; gap: var(--gap-default); @media (max-width: 768px) { flex-direction: column; } } /* Footer Icons */ .follow-me-item img { height: 2rem; } /* POST CARD */ .post-card { margin: 0 auto 1.5rem; width: 90%; & .post-card__title { font-size: var(--font-size-default); } & .post-card__meta, .post-card__summary { font-size: var(--font-size-small); } } .post-card__header { display: flex; flex-direction: column; align-items: start; justify-content: center; gap: 0.5rem; margin: var(--margin-padding-Y-small); } .post-card__tags-list { display: flex; align-items: center; justify-content: start; gap: var(--gap-default); margin: var(--margin-padding-Y-default) !important; @media (max-width: 768px) { flex-direction: column; align-items: start; } } .post-card__tags-item { background-color: var(--bg-special); border-radius: var(--border-radius-max); color: var(--text-color); font-size: var(--font-size-small); padding: 0.1rem 0.4rem; } /* PAGES Content */ .page-not-found { text-align: center; } /* Homepage */ .homepage__header { text-align: center; } .homepage__header-image { border: 4px solid var(--bg-special); border-radius: var(--border-radius-max); display: block; margin: 1rem auto; max-width: 150px; max-height: 150px; } /* Article */ .post__header { margin-bottom: var(--gap-large); } .post__navigation-list { display: flex; align-items: center; justify-content: space-between; margin: 0 1rem !important; @media (max-width: 768px) { margin: 0 !important; } } .post__tags { margin: var(--margin-padding-Y-big); } .post__tags-list { display: flex; gap: var(--gap-default); @media (max-width: 768px) { flex-direction: column; } } .post__tags-link { font-weight: normal; } /* List navigation */ .pagination { display: flex; align-items: center; justify-content: space-between; } .recent-posts__view-all-link, .tag-page__view-all-link { display: block; margin: 0 auto; width: max-content; } .tags-index__list > li { margin-bottom: var(--gap-small); } /* Search */ .search-form__input { font-size: var(--font-size-default); border: 1px solid var(--bg-special); border-radius: var(--border-radius-minimal); padding: 0.2rem; width: 50%; @media (max-width: 768px) { width: 90%; } } .search-form__reset { background-color: var(--bg-special); border: none; border-radius: var(--border-radius-max); color: var(--text-color); font-size: var(--font-size-default); font-weight: bold; padding: 0.2rem 0.5rem 0.3rem 0.5rem; &:hover { background-color: var(--link-hover); color: var(--bg-main); cursor: pointer; } } .search-input { width: 30vw; @media (max-width: 768px) { width: 100vw; } } .search-results__count { font-weight: bold; margin: var(--margin-padding-Y-default); }