321 lines
5.1 KiB
CSS
321 lines
5.1 KiB
CSS
/*
|
|
* Cascading Style Sheets für www.nelsbrock.de
|
|
* Copyright © 2025 Niklas Elsbrock
|
|
*/
|
|
|
|
:root {
|
|
--bg-color: hsl(120, 25%, 7%);
|
|
--text-color: hsl(42, 20%, 85%);
|
|
--deco-color: hsl(42, 20%, 85%);
|
|
--card-link-color: hsl(42, 20%, 85%);
|
|
--card-link-hover-color: hsl(0, 0%, 100%);
|
|
--footer-bg-color: hsl(20, 25%, 5%);
|
|
--footer-text-color: hsl(0, 0%, 75%);
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Inter';
|
|
font-display: swap;
|
|
src: local('Inter Regular'),
|
|
url('./fonts/inter/Inter-Regular.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Inter';
|
|
font-style: italic;
|
|
font-display: swap;
|
|
src: local('Inter Italic'),
|
|
url('./fonts/inter/Inter-Italic.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Inter';
|
|
font-weight: bold;
|
|
font-display: swap;
|
|
src: local('Inter Bold'),
|
|
url('./fonts/inter/Inter-Bold.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Metropolis';
|
|
font-display: swap;
|
|
src: local('Metropolis Regular'),
|
|
url('./fonts/metropolis/Metropolis-Regular.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Metropolis';
|
|
font-style: italic;
|
|
font-display: swap;
|
|
src: local('Metropolis RegularItalic'),
|
|
url('./fonts/metropolis/Metropolis-RegularItalic.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Metropolis';
|
|
font-weight: bold;
|
|
font-display: swap;
|
|
src: local('Metropolis Bold'),
|
|
url('./fonts/metropolis/Metropolis-Bold.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Font Awesome 6 Free Solid';
|
|
font-weight: 900;
|
|
font-display: block;
|
|
src: url('./fonts/fontawesome/fa-solid-900.woff2') format('woff2');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Font Awesome 6 Free Brands';
|
|
font-weight: 400;
|
|
font-display: block;
|
|
src: url('./fonts/fontawesome/fa-brands-400.woff2') format('woff2');
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
0% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes moveFromLeft {
|
|
0% {
|
|
transform: translateX(-2rem);
|
|
}
|
|
100% {
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
@keyframes moveFromRight {
|
|
0% {
|
|
transform: translateX(2rem);
|
|
}
|
|
100% {
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
@keyframes moveFromTop {
|
|
0% {
|
|
transform: translateY(-2rem);
|
|
}
|
|
100% {
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
@keyframes moveFromBottom {
|
|
0% {
|
|
transform: translateY(2rem);
|
|
}
|
|
100% {
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
@keyframes enlargeX {
|
|
0% {
|
|
transform: scaleX(0.5);
|
|
}
|
|
100% {
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
@keyframes enlargeY {
|
|
0% {
|
|
transform: scaleY(0.5);
|
|
}
|
|
100% {
|
|
transform: none;
|
|
}
|
|
}
|
|
|
|
html {
|
|
height: 100%;
|
|
font-size: 20px;
|
|
scrollbar-width: none;
|
|
scroll-snap-type: y proximity;
|
|
}
|
|
|
|
body {
|
|
height: 100%;
|
|
margin: 0;
|
|
color: var(--text-color);
|
|
background-color: var(--bg-color);
|
|
font-family: Inter, sans-serif;
|
|
}
|
|
|
|
.viewstretch {
|
|
min-height: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
scroll-snap-align: start;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
margin: 2rem 0 1rem 0;
|
|
font-family: Metropolis, sans-serif;
|
|
}
|
|
|
|
hr {
|
|
margin: 2rem 0;
|
|
border: 4px solid var(--deco-color);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
main {
|
|
max-width: 40rem;
|
|
margin: 2rem;
|
|
animation: fadeIn ease 1s;
|
|
animation-iteration-count: 1;
|
|
}
|
|
|
|
.card {
|
|
display: flex;
|
|
gap: 2.25rem;
|
|
}
|
|
|
|
.card .main-info {
|
|
text-align: right;
|
|
animation: moveFromLeft ease 1s;
|
|
animation-iteration-count: 1;
|
|
}
|
|
|
|
.card hr {
|
|
margin: 0;
|
|
animation: enlargeY ease 1s;
|
|
animation-iteration-count: 1;
|
|
}
|
|
|
|
.card nav {
|
|
display: flex;
|
|
align-items: center;
|
|
line-height: 2;
|
|
animation: moveFromRight ease 1s;
|
|
animation-iteration-count: 1;
|
|
}
|
|
|
|
.card nav ul {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.card nav a {
|
|
display: inline-block;
|
|
width: 100%;
|
|
color: var(--card-link-color);
|
|
text-decoration: none;
|
|
transition: color 0.25s;
|
|
}
|
|
|
|
.card nav a:hover {
|
|
color: var(--card-link-hover-color);
|
|
}
|
|
|
|
.card nav a::before {
|
|
display: inline-block;
|
|
min-width: 1.5em;
|
|
font-family: 'Font Awesome 6 Free Solid', 'Font Awesome 6 Free Brands';
|
|
margin: 0;
|
|
}
|
|
|
|
.card nav a.link-github::before {
|
|
content: "\f09b";
|
|
}
|
|
|
|
.card nav a.link-bluesky::before {
|
|
content: "\e671";
|
|
}
|
|
|
|
.card nav a.link-email::before {
|
|
content: "\f0e0";
|
|
}
|
|
|
|
.card nav a.link-pgp-key::before {
|
|
content: "\f084";
|
|
}
|
|
|
|
.card nav li::after {
|
|
width: 0;
|
|
color: var(--card-link-hover-color);
|
|
float: right;
|
|
content: "\f100";
|
|
font-family: 'Font Awesome 6 Free Solid';
|
|
opacity: 0;
|
|
translate: 2.5em;
|
|
}
|
|
|
|
.card nav li:hover::after {
|
|
opacity: 1;
|
|
translate: 1em;
|
|
transition: all 0.375s ease-out;
|
|
}
|
|
|
|
.card nav li:active::after {
|
|
transform: scale(0.5, 1);
|
|
transition: all 0.05s linear;
|
|
}
|
|
|
|
footer {
|
|
padding: 1rem;
|
|
text-align: center;
|
|
font-size: 0.75rem;
|
|
color: var(--footer-text-color);
|
|
border-top: 2px dashed var(--footer-text-color);
|
|
background-color: var(--footer-bg-color);
|
|
scroll-snap-align: end;
|
|
}
|
|
|
|
a {
|
|
color: inherit;
|
|
text-decoration: underline dotted;
|
|
}
|
|
|
|
a:hover {
|
|
text-decoration-style: solid;
|
|
}
|
|
|
|
a[data-icon]::before {
|
|
font-family: 'Font Awesome 6 Free Solid', 'Font Awesome 6 Free Brands';
|
|
font-style: normal;
|
|
font-weight: normal;
|
|
content: attr(data-icon) '\00A0';
|
|
}
|
|
|
|
@media (max-width: 800px) {
|
|
.card {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.card .main-info {
|
|
text-align: center;
|
|
animation-name: moveFromTop;
|
|
}
|
|
|
|
.card .main-info p {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.card hr {
|
|
animation-name: enlargeX;
|
|
}
|
|
|
|
.card nav {
|
|
justify-content: center;
|
|
animation-name: moveFromBottom;
|
|
}
|
|
}
|