Files
Personal-Website/styles.css
Erik Fehér d97e432695
All checks were successful
Deploy new version of the application / Deploy Application (push) Successful in 3s
Add new animation, add close button, add back button
2025-10-23 16:54:54 +02:00

283 lines
6.3 KiB
CSS

@import url('https://fonts.googleapis.com/css2?family=BBH+Sans+Bogle&display=swap');
:root {
--card-gap: 6px;
--background-color: #1b1b1b;
--text-color: #ffffff;
--label-height: 60px;
--header-height: 50px;
--base-border-radius: 7px;
--base-box-shadow: 0 10px 15px rgb(0 0 0 / 20%);
--base-blur: blur(3px);
--base-content-background-color: #ffffff20;
--content-wrap-padding: 16px;
--header-margin-bottom: 20px;
--content-container-height: calc(100dvh - (2 * var(--card-gap)));
--card-switch-duration: 0.8s;
font-family: "BBH Sans Bogle", sans-serif;
font-weight: 400;
font-style: normal;
color: #fff;
}
html, body {
background: var(--background-color);
margin: 0;
padding: 0;
overflow-y: hidden; /* Hide vertical scrollbar */
overflow-x: hidden; /* Hide horizontal scrollbar */
height: 100dvh;
}
.card-listener {
position: relative;
display: block;
width: 100%;
height: var(--content-container-height);
top: calc(-1 * (100dvh - (2 * var(--card-gap))) - var(--label-height) - var(--content-container-height));
z-index: 9999;
}
.active > .card-listener {
top: calc(-1 * (100dvh - (2 * var(--card-gap))) - var(--label-height) + 20px);
}
#container {
display: flex;
justify-content: space-around;
align-items: center;
gap: var(--card-gap);
margin: var(--card-gap);
transition: var(--card-switch-duration) cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
#container:has(.hidden) {
gap: 0;
}
.card-image {
filter: grayscale(100%) brightness(80%);
transform: translateY(0);
transition: 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955);
object-fit: cover;
width: 100%;
height: 100%;
}
.card {
height: calc(100dvh - (2 * var(--card-gap)));
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
}
.card-wrapper {
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
cursor: pointer;
transition: var(--card-switch-duration) cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
.card-label {
position: relative;
bottom: calc(-1 * var(--label-height / 2));
display: flex;
align-items: center;
background-color: var(--background-color);
color: var(--text-color);
height: var(--label-height);
width: 100%;
filter: grayscale(0%) brightness(100%);
transform: translateY(0);
transition: var(--card-switch-duration) cubic-bezier(0.455, 0.03, 0.515, 0.955);
font-size: 32px;
padding-left: 30px;
}
.card-wrapper:hover .card .card-image {
filter: grayscale(0%) brightness(110%);
transform: translateY(-30px);
}
.card-wrapper:hover .card-label {
transform: translateY(calc(-1 * var(--label-height)));
}
.card-image-idle-animation {
filter: grayscale(0%) brightness(110%);
transform: translateY(-30px);
}
.card-label-idle-animation {
transform: translateY(calc(-1 * var(--label-height)));
}
.hidden {
width: 0;
}
.active .card-label {
transform: translateY(0) !important;
}
.active .card .card-image {
filter: grayscale(0%) brightness(110%) !important;
transform: translateY(0) !important;
}
.active {
cursor: default !important;
}
.content-container {
display: block;
position: relative;
max-width: 100%;
width: 100%;
height: calc(100dvh - (2 * var(--card-gap)));
top: calc(-1 * (100dvh - (2 * var(--card-gap))) - var(--label-height));
overflow: hidden;
}
.content-wrapper {
display: flex;
opacity: 0;
transition: opacity 0s cubic-bezier(0.455, 0.03, 0.515, 0.955);
height: calc(100% - 16px);
margin: var(--content-wrap-padding) var(--content-wrap-padding) 0px var(--content-wrap-padding);
}
.visible {
display: block !important;
opacity: 1 !important;
transition-delay: var(--card-switch-duration) !important;
transition: 0.2s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
.header {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
justify-content: space-between;
align-items: center;
font-size: 48px;
margin-bottom: var(--header-margin-bottom);
height: var(--header-height);
}
.header-left {
display: flex;
gap: 16px;
justify-content: left;
}
.header-right {
display: flex;
gap: 16px;
justify-content: right;
align-items: center;
width: 100%;
}
.header-center {
display: flex;
justify-content: center;
align-items: center;
}
.brand {
font-size: 24px;
display: flex;
align-items: center;
justify-items: center;
padding: 10px;
background-color: var(--base-content-background-color);
box-shadow: var(--base-box-shadow);
color: var(--text-color);
backdrop-filter: var(--base-blur);
border-radius: var(--base-border-radius);
}
.control-button {
cursor: pointer;
width: 48px;
background-color: var(--base-content-background-color);
backdrop-filter: var(--base-blur);
box-shadow: var(--base-box-shadow);
border-radius: var(--base-border-radius);
transition: 0.2s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
.close-svg {
width: 24px !important;
}
.close {
display: flex;
justify-content: center;
align-items: center;
width: 42px;
height: 42px;
border: 3px solid white;
}
.back {
transform: rotate(180deg) scale(1);
}
.back:hover {
transform: rotate(180deg) scale(1.1) !important;
}
.control-button:hover {
transform: scale(1.1);
}
.card-content {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: calc(100% - var(--header-height) - var(--header-margin-bottom) - var(--content-wrap-padding));
}
#card-content-container {
display: flex;
}
#card-content-image {
border-radius: var(--base-border-radius);
background-color: var(--base-content-background-color);
backdrop-filter: var(--base-blur);
box-shadow: var(--base-box-shadow);
padding: 10px;
width: 300px;
height: 300px;
}
#under-construction {
color: #ff5555;
background-color: #fff;
font-size: 24px;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
position: absolute;
z-index: 10000;
top: 0;
}