lynnespace/assets/style.css

235 lines
4.1 KiB
CSS

* {
box-sizing: border-box;
}
body {
font-family: "Noto Sans", sans-serif;
margin: 0;
display: grid;
grid-template-columns: max(325px, 15%) auto;
background: #fafafa;
color: black;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Open Sans", sans-serif;
}
main article h1 a,
main article h2 a,
main article h3 a,
main article h4 a,
main article h5 a,
main article h6 a {
color: inherit;
text-decoration: underline mediumpurple solid 3px;
}
main article h1 a {
text-decoration-thickness: 5px;
}
h1 {
font-size: 3em;
text-align: center;
}
h2 {
font-size: 1.4em;
}
main {
box-shadow: 0 0 40px black;
z-index: 2;
}
main article {
font-family: "IBM Plex Serif", serif;
font-size: 1.3em;
max-width: max(1200px, 60%);
padding: 0 50px 30px;
margin: 0 auto;
background: #fafafa;
min-height: 100%;
overflow: auto;
}
main article a {
color: #60a;
text-decoration-color: transparent;
transition: 0.2s all;
}
main article a:hover {
text-decoration-color: unset;
}
p {
line-height: 1.5em;
}
header {
/* sidebar */
position: sticky;
top: 0;
background: #333;
height: 100vh;
transition: 0.2s all;
}
header::after { /* the background image behind the sidebar */
/* will use webp with jpeg fallback when
https://developer.mozilla.org/en-US/docs/Web/CSS/image()#browser_compatibility becomes a thing, until then, it's jpeg
only for now :c */
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
/*noinspection CssInvalidFunction*/
background: linear-gradient(to bottom, #333, #333 10%, 70%, transparent),
/* image("/assets/img/background.webp", "/assets/img/background.jpeg") no-repeat bottom center/cover, */
url("/assets/img/background.jpeg") no-repeat bottom center/cover,
#333;
filter: blur(3px) saturate(75%);
content: "";
}
#hamburger { /* hamburger menu button, should only display on mobile devices. see @media section at bottom of file */
display: none;
position: fixed;
top: 10px;
left: 10px;
padding: 10px;
background: #fafafa;
color: mediumpurple;
border-radius: 10px;
height: 27px;
width: 27px;
z-index: 3;
box-sizing: content-box;
}
#hb-icon {
height: 100%;
width: 100%;
background: linear-gradient(to bottom, mediumpurple, mediumpurple 10%, #fafafa 10%, #fafafa 45%, mediumpurple 45%, mediumpurple 55%, #fafafa 55%, #fafafa 90%, mediumpurple 90%, mediumpurple 100%);
}
nav a {
color: white;
padding: 10px 40px;
display: block;
width: 100%;
text-align: center;
text-decoration: none;
font-size: 1.5em;
transition: 0.2s all;
position: relative;
}
nav a::before {
width: 5px;
top: 0;
bottom: 0;
left: -5px;
background: mediumpurple;
content: "";
display: block;
position: absolute;
transition: 0.2s all;
}
nav a:hover {
background: #00000044;
}
nav a.current:not(:hover) {
background: #9370db44;
}
nav a:hover::before,
nav a.current::before {
left: 0;
}
#logo {
object-fit: contain;
display: block;
width: min(100%, 150px);
height: auto;
margin: 30px auto 50px auto;
}
#bune-img {
height: max(200px, 10vh);
display: block;
margin: 50px auto 0;
filter: drop-shadow(0 0 15px #ccc);
}
.project {
border-top: thin grey solid;
}
.project:last-of-type {
border-bottom: thin grey solid;
}
.project p {
margin-bottom: 0.5em;
}
.project-footer {
font-size: 0.85em;
padding-bottom: 1em;
}
.project-footer a {
font-style: italic;
}
/* dark theme */
@media (prefers-color-scheme: dark) {
body, main article {
background: #282a36;
color: white;
}
main article a {
color: #a380eb;
}
header::after {
filter: blur(3px) saturate(75%) brightness(80%);
}
#bune-img {
filter: drop-shadow(0 0 15px #111);
}
}
/* smaller screen tweaks */
@media only screen and (max-device-width: 840px) {
body {
grid-template-columns: max(225px, 15%) auto;
}
}
/* mobile tweaks */
@media only screen and (max-device-width: 480px) {
main {
width: 100vw;
box-shadow: none;
}
main article {
padding: 0 20px 30px;
font-size: 1.1em;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 1.5em;
}
header {
position: fixed;
left: -100vw;
width: 100vw;
overflow: hidden;
z-index: 3;
}
header.active {
left: 0;
}
#hamburger {
display: inline-block;
touch-action: manipulation;
}
}