Career card
Minimal CSS card for a portfolio or resume: company, role and years on one muted line, one sentence below. Lifts on hover.
A fixed-width article in a flex column with a 0.75rem gap. Three custom properties (--crc-bg, --crc-ink, --crc-muted) hold the colors, so a new theme is three lines. On hover the card moves up 3px with translateY and swaps to a larger, softer box-shadow, both on one 0.25s transition. The role and date sit in a flex row with space-between, and prefers-reduced-motion removes the lift.
snippet.html31 lines
<article class="crc">
<p class="crc__co"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="2.5"/><circle cx="12" cy="12" r="3.5" fill="currentColor"/></svg>Tidewell</p>
<p class="crc__meta"><span>Design Lead</span><span>Now</span></p>
<p class="crc__desc">Rebuilding the booking tools that small clinics use every day.</p>
</article>
<style>
.crc {
--crc-bg: #fafafa;
--crc-ink: #0a0a0a;
--crc-muted: #666666;
box-sizing: border-box;
display: flex; flex-direction: column; gap: 0.75rem;
width: min(100%, 280px);
padding: 1.25rem;
border-radius: 12px;
background: var(--crc-bg);
color: var(--crc-ink);
box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 0 0 1px rgb(0 0 0 / 0.03);
font-family: "Avenir Next", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.crc *, .crc *::before, .crc *::after { box-sizing: border-box; }
.crc:hover { transform: translateY(-3px); box-shadow: 0 14px 26px -16px rgb(0 0 0 / 0.3), 0 0 0 1px rgb(0 0 0 / 0.04); }
.crc p { margin: 0; }
.crc__co { display: flex; align-items: center; gap: 0.4rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.crc__co svg { width: 20px; height: 20px; }
.crc__meta { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.9375rem; line-height: 1.3; color: var(--crc-muted); }
.crc__desc { font-size: 1.05rem; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .crc { transition: none; } .crc:hover { transform: none; } }
</style>