Profile Card
Social profile card with gradient avatar ring using CSS mask-composite trick, stats row, and a lift animation on hover.
Profile Card the 15th of 20 designs in the 20 CSS Cards with Animations collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.
Live preview
The code
<div class="stage-15">
<div class="card-profile">
<div class="profile-avatar">VR</div>
<div class="profile-name">Alex Morgan</div>
<div class="profile-role">Frontend Developer</div>
<div class="profile-stats">
<div class="pstat">
<div class="pstat-num">142</div>
<div class="pstat-label">Projects</div>
</div>
<div class="pstat">
<div class="pstat-num">4.8k</div>
<div class="pstat-label">Stars</div>
</div>
<div class="pstat">
<div class="pstat-num">328</div>
<div class="pstat-label">Followers</div>
</div>
</div>
</div>
</div> .card-profile {
width: 200px;
padding: 22px;
border-radius: 16px;
background: var(--ccg-surface);
border: 1px solid var(--ccg-border2);
text-align: center;
transition: transform 0.3s;
}
.card-profile:hover {
transform: translateY(-4px);
}
.profile-avatar {
width: 56px;
height: 56px;
border-radius: 50%;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
margin: 0 auto 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
font-weight: 800;
color: #fff;
position: relative;
}
.profile-avatar::after {
content: "";
position: absolute;
inset: -3px;
border-radius: 50%;
border: 2px solid transparent;
background: linear-gradient(135deg, #7c6cff, #ff6c8a) border-box;
-webkit-mask:
linear-gradient(#fff 0 0) padding-box,
linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
}
.profile-name {
font-size: 14px;
font-weight: 700;
color: #fff;
margin-bottom: 2px;
}
.profile-role {
font-size: 11px;
color: var(--ccg-muted);
margin-bottom: 14px;
}
.profile-stats {
display: flex;
gap: 0;
border-top: 1px solid var(--ccg-border);
padding-top: 12px;
}
.pstat-num {
font-size: 14px;
font-weight: 700;
color: #fff;
}
.pstat-label {
font-size: 9px;
color: var(--ccg-muted);
font-family: var(--ccg-mono);
letter-spacing: 0.06em;
}
/* parent stage backdrop (so the demo renders standalone) */
[class^="stage-"] {
width: 100%;
min-height: 200px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 2.5rem 1.5rem;
box-sizing: border-box;
}
.stage-15 {
background: #0d0d14;
}
/* gallery vars + keyframes (so the demo renders standalone) */
:root {
--ccg-bg: #0a0a0f;
--ccg-surface: #111118;
--ccg-surface2: #17171f;
--ccg-surface3: #1e1e28;
--ccg-border: rgba(255, 255, 255, 0.15);
--ccg-border2: rgba(255, 255, 255, 0.13);
--ccg-accent: #7c6cff;
--ccg-pink: #ff6c8a;
--ccg-green: #1ed98a;
--ccg-amber: #f5a84a;
--ccg-cyan: #3de8f5;
--ccg-text: #f0eeff;
--ccg-muted: #6b6987;
--ccg-label: #9896b8;
--ccg-mono: "DM Mono", "Fira Code", monospace;
--ccg-sans: "Syne", sans-serif;
}
/* missing class rules (merged from gallery) */
.pstat {
flex: 1;
text-align: center;
}
.pstat + .pstat {
border-left: 1px solid var(--ccg-border);
}