Files
ivanch.me/css/main.css
José Henrique 0293a5fa9d
All checks were successful
Homepage Build and Deploy / Build Homepage Image (push) Successful in 10m21s
Homepage Build and Deploy / Deploy Homepage (push) Successful in 31s
improving responsiviness
2025-08-28 17:41:49 -03:00

194 lines
4.8 KiB
CSS

@import url('variables.css');
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--font-family);
background: var(--background-color);
min-height: 100vh;
overflow-x: hidden;
position: relative;
/* Improve text rendering on mobile */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Prevent text size adjust on orientation change */
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 600;
color: var(--text-color);
}
a {
text-decoration: none;
color: var(--primary-color);
transition: color 0.3s;
}
a:hover {
color: var(--primary-color-light);
}
ul {
list-style: none;
}
img {
max-width: 100%;
height: auto;
}
.glass {
background: var(--glass-background);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border-radius: var(--border-radius);
border-top: 1px solid var(--glass-border);
border-bottom: 1px solid var(--glass-border);
/* base shadows: outer shadow from variables + subtle inset
an extra animated outer shadow is layered to give a natural "alive" feel */
box-shadow: 0 8px 36px 0 var(--glass-shadow), var(--inset-shadow);
will-change: box-shadow;
animation: glass-shadow 8s ease-in-out infinite !important;
}
.main-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 1200px;
width: 100%;
padding: 0 20px;
display: flex;
align-items: center;
justify-content: center;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* subtle, natural moving/pulsing shadow for .glass */
@keyframes glass-shadow {
0% {
box-shadow: 0 6px 24px -2px var(--glass-shadow), 0 18px 48px -12px var(--dark-shadow-15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
25% {
box-shadow: 6px 10px 38px -6px var(--tertiary-color-20), 0 22px 60px -18px var(--dark-shadow-18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
50% {
box-shadow: 0 8px 36px 0 var(--glass-shadow), 0 28px 72px -24px var(--dark-shadow-20), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
75% {
box-shadow: -6px 10px 38px -6px var(--primary-color-16), 0 22px 60px -18px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
100% {
box-shadow: 0 6px 24px -2px var(--glass-shadow), 0 18px 48px -12px var(--dark-shadow-15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
}
.content {
color: var(--text-color);
background: rgba(0, 0, 0, 0.10);
backdrop-filter: blur(32px) saturate(180%) brightness(1.1);
-webkit-backdrop-filter: blur(32px) saturate(180%) brightness(1.1);
border-radius: var(--border-radius-large);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
padding: 32px 24px;
transition: background 0.3s, box-shadow 0.3s;
min-width: 26rem;
max-width: 26rem;
}
/* Mobile responsive content */
@media (max-width: 1024px) {
.content {
min-width: unset;
max-width: unset;
width: 100%;
padding: 24px 20px;
}
.main-container {
position: relative;
top: auto;
left: auto;
transform: none;
padding: 20px 15px;
min-height: 100vh;
display: flex;
align-items: flex-start;
padding-top: 40px;
padding-bottom: 40px;
}
}
@media (max-width: 480px) {
body {
font-size: 14px;
}
.main-container {
padding: 15px 10px;
padding-top: 30px;
padding-bottom: 30px;
}
.content {
padding: 20px 16px;
min-width: unset;
max-width: unset;
width: 100%;
}
}
/* Accessibility: disable animated shadows for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
.glass {
animation: none !important;
}
}
/* High DPI display optimizations */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min--moz-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2/1),
only screen and (min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dpi),
only screen and (min-resolution: 2dppx) {
.glass {
/* Enhanced blur for high DPI screens */
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}
.content {
backdrop-filter: blur(40px) saturate(180%) brightness(1.1);
-webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.1);
}
}