Files
portfolio-web/main.css

159 lines
3.8 KiB
CSS
Raw Normal View History

2026-05-08 23:21:05 +02:00
/* @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap"); */
@font-face { font-family:Inter; font-style:normal; font-weight:400; font-display:swap; src:url("font/Inter-Regular.woff2?v=4.1") format("woff2"); }
@font-face { font-family:Inter; font-style:italic; font-weight:400; font-display:swap; src:url("font/Inter-Italic.woff2?v=4.1") format("woff2"); }
@font-face { font-family:Inter; font-style:normal; font-weight:700; font-display:swap; src:url("font/Inter-Bold.woff2?v=4.1") format("woff2"); }
@font-face { font-family:Inter; font-style:italic; font-weight:700; font-display:swap; src:url("font/Inter-BoldItalic.woff2?v=4.1") format("woff2"); }
@font-face { font-family:Space Grotesk; font-style:normal; font-weight:700; font-display:swap; src:url("font/SpaceGrotesk-Bold.woff2?v=4.1") format("woff2"); }
2026-05-08 15:28:57 +02:00
body {
font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
margin: 0;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Space Grotesk", system-ui, sans-serif;
}
.blocks {
display: flex;
/*gap: 20px;*/
2026-05-08 15:28:57 +02:00
padding-top: 5.78vw; /* hor spacing from line to heading top */
2026-05-08 15:34:20 +02:00
margin-top: 2.25vw;
2026-05-08 22:28:16 +02:00
margin-bottom: 0;
2026-05-08 15:34:20 +02:00
2026-05-08 23:21:05 +02:00
background-image: url("img/hero_bg_2_plain.svg");
background-repeat: no-repeat;
background-position: center top;
background-size: 100% auto;
}
/* Gap between block 1 and 2 */
.block:nth-child(1) {
margin-right: 11.3vw;
/* margin-top */
margin-left: 12.85vw;
}
/* Gap between block 2 and 3 */
.block:nth-child(2) {
margin-right: 6.01vw;
margin-top: 10.16vw;
}
.block:nth-child(3) {
/* margin-right */
margin-top: 5.26vw;
margin-right: 13.05vw;
}
.block {
flex: 1;
2026-05-08 15:28:57 +02:00
/*background: #e5e7eb;
border: 1px solid #ccc;*/
display: flex;
/*align-items: center;
justify-content: center;*/
2026-05-08 15:28:57 +02:00
flex-direction: column;
2026-05-08 22:28:16 +02:00
margin-bottom: 2.25vw; /* bottom distance to cta, in regular mode */
2026-05-08 15:28:57 +02:00
}
.block h2 {
margin-top: 0px;
margin-bottom: 0.5rem;
font-size: 1.5rem;
}
.block ul {
margin-top: 0;
padding-left: 1.25rem;
}
2026-05-08 16:13:39 +02:00
.block p:first-of-type {
margin-top: 0.5rem;
}
2026-05-08 23:21:05 +02:00
.cta {
padding-left: 13vw; /* for regular screen only */
}
/* Small screens */
2026-05-08 15:28:57 +02:00
@media (max-width: 960px) {
.blocks {
flex-direction: column;
2026-05-08 15:34:20 +02:00
padding-top: 19.29vw;
2026-05-08 15:28:57 +02:00
margin-top: 2.25vw;
2026-05-08 22:28:16 +02:00
margin-bottom: 0;
width: max(100%, calc(15em + 2 * 12.85vw));
}
.block {
2026-05-08 15:28:57 +02:00
width: min(100%, 15em);
padding-left: 5.72vw;
}
.block:nth-child(1), .block:nth-child(2), .block:nth-child(3) {
margin-top: 0;
margin-bottom: 2.25vw;
2026-05-08 15:28:57 +02:00
/* horizontal centering blocks */
margin-left: auto;
margin-right: auto;
}
.block:nth-child(1) {
2026-05-08 22:28:16 +02:00
margin-top: 0;
}
.block:nth-child(3) {
margin-bottom: 4.5vw; /* bottom 2.25vw + distance to cta, in responsive mode */
}
2026-05-08 23:21:05 +02:00
.cta {
padding-left: 15.25vw; /* for small screen only */
}
2026-05-08 15:46:14 +02:00
}
2026-05-08 22:28:16 +02:00
.cta {
margin-left: 0;
margin-top: -0.3vw;
}
div.cta {
/*width: 100%;*/
min-height: 5.95vw;
2026-05-08 23:21:05 +02:00
background-image: url("img/cta.svg");
2026-05-08 22:28:16 +02:00
background-repeat: no-repeat;
background-position: left top;
background-size: auto 5.95vw;
}
div.footer {
2026-05-08 15:46:14 +02:00
margin-left: 7.14vw;
margin-right: 7.14vw;
}
2026-05-08 22:28:16 +02:00
div.cta {
margin-right: 7.14vw;
}
.cta {
/* set variables */
--circle-center-y: 2.905vw;
--cta-heading-size: 1.5rem;
--cta-heading-line-height: 1.2;
}
.cta h2 {
margin-top: 0px;
margin-bottom: 0.5rem; /* sensitive to .cta h2 font-size */
font-size: var(--cta-heading-size);
line-height: var(--cta-heading-line-height);
}
.cta p:first-of-type {
margin-top: 0.5rem;
}
div.cta-content {
padding-top: calc(
var(--circle-center-y) -
((var(--cta-heading-size) * var(--cta-heading-line-height)) * 0.5)
);
margin-left: 2.25vw;
}
2026-05-08 15:46:14 +02:00
div.footer {
2026-05-08 16:13:39 +02:00
margin-top: 7.14vw;
2026-05-08 15:46:14 +02:00
margin-bottom: 7.14vw;
text-align: center;
}