chore: add global and responsive styles

This commit is contained in:
2026-08-25 10:44:06 +00:00
parent 16f02d7dd7
commit 05df22dc4b
+138
View File
@@ -0,0 +1,138 @@
/* style.css — global + responsive styles for the personal blog */
:root {
--text: #1f2933;
--muted: #52606d;
--accent: #205081;
--border: #d9e2ec;
--bg: #ffffff;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
line-height: 1.6;
color: var(--text);
background: var(--bg);
}
/* --- Site header / navigation (desktop + mobile) --- */
.site-header {
border-bottom: 1px solid var(--border);
}
.site-nav {
max-width: 60rem;
margin: 0 auto;
padding: 0.75rem 1rem;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.5rem 1rem;
}
.brand {
font-weight: 700;
font-size: 1.1rem;
text-decoration: none;
color: var(--text);
}
.nav-links {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin: 0;
padding: 0;
list-style: none;
}
.nav-links a {
color: var(--muted);
text-decoration: none;
}
.nav-links a:hover,
.nav-links a:focus {
color: var(--accent);
}
.nav-links a[aria-current="page"] {
color: var(--accent);
font-weight: 600;
}
/* --- Main content --- */
main {
max-width: 60rem;
margin: 0 auto;
padding: 2rem 1rem;
}
/* --- Contact form --- */
.contact-form {
max-width: 36rem;
display: grid;
gap: 1rem;
}
.form-field {
display: grid;
gap: 0.35rem;
}
.form-field label {
font-weight: 600;
}
.form-field input,
.form-field textarea {
font: inherit;
padding: 0.5rem 0.65rem;
border: 1px solid var(--border);
border-radius: 6px;
width: 100%;
}
.form-field input:focus,
.form-field textarea:focus {
outline: 2px solid var(--accent);
outline-offset: 1px;
border-color: var(--accent);
}
button[type="submit"] {
font: inherit;
font-weight: 600;
padding: 0.55rem 1.25rem;
border: none;
border-radius: 6px;
background: var(--accent);
color: #ffffff;
cursor: pointer;
}
button[type="submit"]:hover {
filter: brightness(1.1);
}
/* --- Footer --- */
.site-footer {
border-top: 1px solid var(--border);
margin-top: 3rem;
padding: 1rem;
text-align: center;
color: var(--muted);
font-size: 0.9rem;
}
/* --- Mobile: nav links stack under the brand --- */
@media (max-width: 30rem) {
.site-nav {
justify-content: flex-start;
}
}