Files
petruspistor.com/resources/css/index.css

95 lines
2.2 KiB
CSS
Executable File

/* Basic reset & layout */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
color: #efefef;
background: #2c2c2c;
line-height: 1.5;
}
/* Accessibility: visible focus */
:focus-visible { outline: 3px solid #7dd3fc; outline-offset: 2px; }
.skip-link {
position: absolute; left: -9999px; top: -9999px;
}
.skip-link:focus { left: 1rem; top: 1rem; background:#111; color:#fff; padding:.5rem .75rem; border-radius:.5rem; }
/* Header with centered image at the very top */
.site-header {
display: grid;
place-items: center;
padding: 3rem 1rem 2rem;
gap: .5rem;
background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0));
}
.site-header .avatar {
display: block;
border-radius: 50%;
border: 4px solid rgba(255,255,255,.15);
max-width: 40vw; /* keeps it reasonable on mobile */
height: auto;
}
.site-title {
margin: .25rem 0 0;
font-size: clamp(1.5rem, 2.5vw + 1rem, 2.5rem);
letter-spacing: .5px;
}
.site-tagline {
margin: 0;
color: #cfcfcf;
font-size: clamp(.95rem, .5vw + .8rem, 1.1rem);
}
/* Horizontal nav under header */
.site-nav {
position: sticky; /* optional: keeps it visible on scroll */
top: 0;
backdrop-filter: blur(6px);
background: rgba(20,20,20,.7);
border-top: 1px solid rgba(255,255,255,.07);
border-bottom: 1px solid rgba(255,255,255,.07);
}
.site-nav ul {
margin: 0 auto;
padding: .5rem 1rem;
list-style: none;
display: flex;
gap: 1rem;
justify-content: center;
max-width: 900px;
}
.site-nav a {
display: inline-block;
padding: .5rem .75rem;
border-radius: .5rem;
color: #efefef;
text-decoration: none;
}
.site-nav a:hover,
.site-nav a:focus-visible {
background: rgba(255,255,255,.08);
}
/* Content */
.content {
max-width: 900px;
margin: 2rem auto;
padding: 0 1rem 3rem;
}
.content h2 { margin-top: 2rem; font-size: 1.35rem; }
/* Footer */
.site-footer {
border-top: 1px solid rgba(255,255,255,.07);
color: #bdbdbd;
padding: 1.5rem 1rem 3rem;
text-align: center;
}
/* Responsive tweaks */
@media (min-width: 768px) {
.site-header { padding: 4rem 1rem 2.25rem; }
.site-nav ul { gap: 1.25rem; }
}