332 lines
7.4 KiB
CSS
332 lines
7.4 KiB
CSS
.profile-container {
|
|
position: relative;
|
|
}
|
|
|
|
.avatar {
|
|
width: 160px;
|
|
height: 160px;
|
|
border-radius: var(--border-radius-large);
|
|
background: linear-gradient(135deg, var(--secondary-500) 0%, var(--tertiary-500) 100%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text-color);
|
|
position: relative;
|
|
border: 1px solid var(--glass-border-strong);
|
|
box-shadow:
|
|
var(--shadow-md),
|
|
0 0 0 1px rgba(255, 255, 255, 0.04) inset;
|
|
isolation: isolate;
|
|
}
|
|
|
|
/* Idle glow ring — slow, low amplitude, "alive" feel */
|
|
.avatar::after {
|
|
content: "";
|
|
position: absolute;
|
|
inset: -1px;
|
|
border-radius: inherit;
|
|
background: conic-gradient(from 0deg,
|
|
var(--primary-500),
|
|
var(--secondary-500),
|
|
var(--tertiary-400),
|
|
var(--primary-500));
|
|
filter: blur(8px) saturate(120%);
|
|
opacity: 0.09;
|
|
z-index: -1;
|
|
animation: avatar-glow 12s linear infinite;
|
|
}
|
|
|
|
.avatar img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: var(--border-radius-large);
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Real glitch on hover */
|
|
/* Two pseudo-layered clones (R + B channel shift + sliced clip-path) */
|
|
/* are generated via JS on .avatar; styles here control the animation.*/
|
|
/* ------------------------------------------------------------------ */
|
|
.avatar .glitch-layer {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: var(--border-radius-large);
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
z-index: 3;
|
|
mix-blend-mode: screen;
|
|
transition: opacity 0.05s ease;
|
|
}
|
|
|
|
.avatar:hover .glitch-layer {
|
|
opacity: 1;
|
|
}
|
|
|
|
.avatar .glitch-layer.r {
|
|
filter: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter%20id='red'%3E%3CfeColorMatrix%20type='matrix'%20values='1%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%201%200'/%3E%3C/filter%3E%3C/svg%3E%23red");
|
|
}
|
|
|
|
.avatar:hover .glitch-layer.r {
|
|
animation: glitch-anim-r 0.6s linear infinite;
|
|
}
|
|
|
|
.avatar .glitch-layer.b {
|
|
filter: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter%20id='cyan'%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%201%200%200%200%200%200%201%200%200%200%200%200%201%200'/%3E%3C/filter%3E%3C/svg%3E%23cyan");
|
|
}
|
|
|
|
.avatar:hover .glitch-layer.b {
|
|
animation: glitch-anim-b 0.45s linear infinite;
|
|
}
|
|
|
|
@keyframes glitch-anim-r {
|
|
0% {
|
|
clip-path: inset(20% 0 60% 0);
|
|
transform: translate(-4px, -2px) skewX(-2deg);
|
|
}
|
|
|
|
10% {
|
|
clip-path: inset(65% 0 10% 0);
|
|
transform: translate(3px, 2px) skewX(4deg);
|
|
}
|
|
|
|
20% {
|
|
clip-path: inset(5% 0 85% 0);
|
|
transform: translate(-2px, -3px) skewX(-1deg);
|
|
}
|
|
|
|
30% {
|
|
clip-path: inset(80% 0 5% 0);
|
|
transform: translate(4px, 1px) skewX(2deg);
|
|
}
|
|
|
|
40% {
|
|
clip-path: inset(45% 0 45% 0);
|
|
transform: translate(-3px, 3px) skewX(-4deg);
|
|
}
|
|
|
|
50% {
|
|
clip-path: inset(12% 0 75% 0);
|
|
transform: translate(2px, -1px) skewX(1deg);
|
|
}
|
|
|
|
60% {
|
|
clip-path: inset(90% 0 2% 0);
|
|
transform: translate(-5px, 2px) skewX(-3deg);
|
|
}
|
|
|
|
70% {
|
|
clip-path: inset(30% 0 55% 0);
|
|
transform: translate(3px, -2px) skewX(5deg);
|
|
}
|
|
|
|
80% {
|
|
clip-path: inset(72% 0 18% 0);
|
|
transform: translate(-1px, 4px) skewX(-2deg);
|
|
}
|
|
|
|
90% {
|
|
clip-path: inset(50% 0 35% 0);
|
|
transform: translate(5px, -1px) skewX(3deg);
|
|
}
|
|
|
|
100% {
|
|
clip-path: inset(20% 0 60% 0);
|
|
transform: translate(-4px, -2px) skewX(-2deg);
|
|
}
|
|
}
|
|
|
|
@keyframes glitch-anim-b {
|
|
0% {
|
|
clip-path: inset(50% 0 30% 0);
|
|
transform: translate(4px, 2px) skewX(3deg);
|
|
}
|
|
|
|
10% {
|
|
clip-path: inset(15% 0 75% 0);
|
|
transform: translate(-3px, -2px) skewX(-2deg);
|
|
}
|
|
|
|
20% {
|
|
clip-path: inset(85% 0 5% 0);
|
|
transform: translate(2px, 3px) skewX(4deg);
|
|
}
|
|
|
|
30% {
|
|
clip-path: inset(35% 0 55% 0);
|
|
transform: translate(-4px, -1px) skewX(-1deg);
|
|
}
|
|
|
|
40% {
|
|
clip-path: inset(70% 0 15% 0);
|
|
transform: translate(3px, -3px) skewX(2deg);
|
|
}
|
|
|
|
50% {
|
|
clip-path: inset(5% 0 90% 0);
|
|
transform: translate(-2px, 2px) skewX(-4deg);
|
|
}
|
|
|
|
60% {
|
|
clip-path: inset(40% 0 45% 0);
|
|
transform: translate(5px, -2px) skewX(1deg);
|
|
}
|
|
|
|
70% {
|
|
clip-path: inset(60% 0 25% 0);
|
|
transform: translate(-3px, 4px) skewX(-3deg);
|
|
}
|
|
|
|
80% {
|
|
clip-path: inset(22% 0 68% 0);
|
|
transform: translate(1px, -4px) skewX(5deg);
|
|
}
|
|
|
|
90% {
|
|
clip-path: inset(95% 0 1% 0);
|
|
transform: translate(-5px, 1px) skewX(-2deg);
|
|
}
|
|
|
|
100% {
|
|
clip-path: inset(50% 0 30% 0);
|
|
transform: translate(4px, 2px) skewX(3deg);
|
|
}
|
|
}
|
|
|
|
@keyframes avatar-glow {
|
|
0% {
|
|
transform: rotate(0deg);
|
|
}
|
|
|
|
100% {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* Remove leftover unused label rule; color: #222 was invisible on black */
|
|
.profile-info {
|
|
margin-top: var(--space-md);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.profile-info-item {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
font-size: var(--text-sm);
|
|
background: none;
|
|
border-radius: 0;
|
|
padding: 0;
|
|
box-shadow: none;
|
|
transition: none;
|
|
}
|
|
|
|
.profile-info-item i {
|
|
font-size: 1.3rem;
|
|
color: var(--primary-500);
|
|
margin-right: var(--space-2xs);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.profile-info-value {
|
|
color: var(--text-color-mid);
|
|
font-weight: 400;
|
|
display: flex;
|
|
flex-direction: column;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.profile-info-value span {
|
|
display: block;
|
|
}
|
|
|
|
.profile-info-value span:first-child {
|
|
color: var(--text-color-light);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.profile-info-value span:last-child {
|
|
color: var(--text-color-mid);
|
|
font-size: var(--text-xs);
|
|
}
|
|
|
|
/* ------------------------------------------------------------------ */
|
|
/* Responsive */
|
|
/* ------------------------------------------------------------------ */
|
|
@media (max-width: 1024px) {
|
|
.profile-info {
|
|
align-items: center;
|
|
margin-top: var(--space-lg);
|
|
}
|
|
|
|
.avatar {
|
|
width: 140px;
|
|
height: 140px;
|
|
margin: 0 auto;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.profile-container {
|
|
text-align: center;
|
|
}
|
|
|
|
.profile-info {
|
|
align-items: center;
|
|
margin-top: var(--space-lg);
|
|
}
|
|
|
|
.profile-info-item {
|
|
justify-content: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.avatar {
|
|
width: 140px;
|
|
height: 140px;
|
|
margin: 0 auto;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.profile-info {
|
|
gap: var(--space-sm);
|
|
margin-top: var(--space-md);
|
|
}
|
|
|
|
.profile-info-item {
|
|
font-size: var(--text-xs);
|
|
flex-direction: row;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.profile-info-item i {
|
|
font-size: 1.2rem;
|
|
margin-right: var(--space-2xs);
|
|
}
|
|
|
|
.avatar {
|
|
width: 120px;
|
|
height: 120px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 380px) {
|
|
.avatar {
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
|
|
.profile-info-item {
|
|
font-size: var(--text-xs);
|
|
}
|
|
} |