Files
douwco_website/public/assets/css/style.css
T
douwe d745be248d Add mobile responsiveness for phone and landscape mode
- Reduced base font size on mobile (18px vs 25px)
- Made navigation bar responsive: smaller icons, wrapped layout
- Fixed header position on mobile (sticky at top)
- Adjusted scroll_container margin top to account for fixed header
- Disabled scroll-snap on mobile for better UX
- Made home section responsive: smaller title, tagline, images
- Project cards grid: smaller cards and text on mobile
- Apps carousel: responsive icon sizes and spacing
- Games grid: smaller cards and proper spacing
- Footer: centered layout on mobile
- All interactive elements maintain touch targets
2026-09-25 11:38:15 +02:00

1204 lines
22 KiB
CSS

/* ===== Base Styles ===== */
html, body {
height: 100%;
margin: 0;
padding: 0;
font-size: 25px;
}
body {
display: flex;
flex-direction: column;
}
main {
flex: 1;
margin: 20px;
overflow-y: auto;
overflow-x: hidden;
scroll-behavior: smooth;
}
/* Mobile Base Styles */
@media (max-width: 768px) {
html, body {
font-size: 18px;
}
main {
margin: 10px;
margin-top: 70px;
}
}
a {
color: var(--blue-clr)
}
footer {
flex-shrink: 0;
background: var(--background-clr);
width: 100%;
}
footer > div {
justify-content: space-between
}
footer > div > p {
font-size: 16px;
margin: 10px 25px 10px 25px;
}
@media (max-width: 768px) {
footer > div {
flex-direction: column;
align-items: center;
gap: 10px;
}
footer > div > p {
margin: 10px;
text-align: center;
}
}
.flag {
height: 16px;
vertical-align: middle;
}
/* ===== Container Layouts ===== */
header {
background-color: var(--background-clr);
padding: 10px 0;
z-index: 100;
}
@media (max-width: 768px) {
header {
position: fixed;
top: 0;
left: 0;
right: 0;
width: 100%;
padding: 5px 0;
}
}
.vert_container {
display: flex;
}
@media (max-width: 1000px) {
.vert_container.revert {
display: inherit;
}
}
.vert_container.centered {
align-items: center;
justify-content: space-around;
}
.vert_container.start {
align-items: flex-start;
justify-content: space-around;
}
.scroll_container {
overflow-y: auto;
scroll-snap-type: y mandatory;
}
.scroll_section {
min-height: 100vh;
scroll-snap-align: start;
display: flex;
flex-direction: column;
align-items: center;
}
@media (max-width: 768px) {
.scroll_container {
scroll-snap-type: none;
}
.scroll_section {
min-height: auto;
scroll-snap-align: none;
}
}
.scroll_section > h1 {
color: var(--white-clr);
font-size: 48px;
margin: 20px 0;
text-align: center;
width: 100%;
}
/* ===== Navigationbar ===== */
.nav_option {
font-family: 'Montserrat', sans-serif;
font-weight: bold;
color: var(--white-clr);
text-decoration: none;
font-size: 36px;
border: none;
border-radius: 20px;
background-color: transparent;
display: flex;
align-items: center;
margin: 10px;
padding-right: 10px;
}
.nav_option:hover {
background-color: var(--background-accent-clr);
}
.nav_option.active {
background-color: var(--background-accent-clr);
}
.nav_option span {
color: var(--green-clr);
}
/* Mobile Navigation */
@media (max-width: 1100px) {
.nav_option p {
display: none;
}
.nav_option {
font-size: 28px;
padding: 8px;
margin: 8px;
}
.icon.small {
height: 36px;
}
.icon.medium {
height: 60px;
}
}
@media (max-width: 768px) {
.nav_option {
font-size: 24px;
padding: 6px;
margin: 6px;
}
.icon.small {
height: 30px;
}
.icon.medium {
height: 50px;
}
.vert_container.centered {
flex-wrap: wrap;
justify-content: center;
gap: 10px;
}
}
/* ===== Layout ===== */
.panel {
width: 60%;
}
@media (max-width: 1000px) {
.panel {
width: 100%;
}
}
.section-title {
display: flex;
align-items: flex-start;
justify-content: space-around;
}
.text-section {
margin-left: 50px;
}
.title {
font-size: 128px;
margin: 0;
line-height: 1;
text-wrap: balance;
}
@media (max-width: 1200px) {
.title {
font-size: 100px;
}
.tagline {
font-size: 26px;
width: 400px;
}
.icon.large.toggle {
height: 200px;
}
}
@media (max-width: 992px) {
.title {
font-size: 80px;
}
.tagline {
font-size: 22px;
width: 350px;
}
.text-section {
margin-left: 30px;
}
.section-title {
flex-direction: column;
align-items: center;
gap: 20px;
}
}
@media (max-width: 768px) {
.title {
font-size: 50px;
}
.tagline {
font-size: 18px;
width: 100%;
flex-direction: column;
}
.tagline .normal-text {
margin-left: 0;
}
.icon.large.toggle {
height: 120px;
}
.image.large {
width: 60%;
}
.image.small {
width: 40%;
}
.panel {
width: 100%;
}
}
.tagline {
display: flex;
font-size: 36px;
font-weight: bold;
width: 500px;
}
.tagline .green-text {
color: var(--green-clr);
}
.tagline .normal-text {
margin-left: 7px;
}
.content-box {
background-color: var(--background-accent-clr);
margin: 50px 20px 20px;
padding: 20px;
border-radius: 20px;
}
.content-box p {
margin: 0;
}
.content-box .intro-text {
font-weight: bolder;
font-size: 28px;
color: var(--green-clr)
}
@media (max-width: 768px) {
.content-box {
margin: 30px 10px 15px;
padding: 15px;
}
.content-box .intro-text {
font-size: 20px;
}
}
.project-thumb {
width: 150px;
height: 150px;
object-fit: cover;
margin-right: 15px;
border-radius: 75px;
float: left;
}
/* New project card styling - rectangular with image on top */
.project-card-new {
background-color: var(--background-accent-clr);
border-radius: var(--card-border-radius, 25px);
overflow: hidden;
margin: 10px;
max-width: 400px;
min-width: 300px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer;
position: relative;
}
.project-card-new.expanded {
z-index: 10;
transform: scale(1.02);
box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}
.project-card-new .toggle-icon {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
border-radius: 50%;
background-color: var(--green-clr);
color: var(--background-clr);
font-size: 20px;
font-weight: bold;
z-index: 20;
cursor: pointer;
transition: transform 0.2s ease;
}
.project-card-new .toggle-icon:hover {
transform: scale(1.1);
}
.project-card-image-container {
position: relative;
width: 100%;
height: 200px;
overflow: hidden;
transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-card-new.expanded .project-card-image-container {
height: 150px;
}
.project-card-image {
width: 100%;
height: 100%;
object-fit: cover;
background-color: #888; /* Plain grey as fallback */
}
.project-card-title-container {
position: relative;
margin-top: -50px; /* Overlap with image */
padding: 10px 20px;
z-index: 1;
}
.project-card-title-background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--background-accent-clr);
border-radius: var(--card-border-radius, 25px);
opacity: 0.95;
}
.project-card-title {
position: relative;
font-weight: bold;
font-size: 20px;
color: var(--green-clr);
margin: 0;
z-index: 1;
}
.project-card-content {
padding: 0 20px;
color: var(--text-color);
max-height: 0;
overflow: hidden;
transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-card-new.expanded .project-card-content {
max-height: 1000px;
padding: 20px;
}
.project-card-short-desc {
padding: 10px 20px 20px;
color: var(--text-color);
line-height: 1.6;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-card-new.expanded .project-card-short-desc {
display: none;
}
.project-card-content p {
margin: 0;
line-height: 1.6;
}
/* About Me grid layout */
.about-me-projects-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 20px;
width: 100%;
max-width: 1200px;
margin: 20px auto;
}
@media (max-width: 768px) {
.about-me-projects-grid {
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 15px;
}
.project-card-new {
max-width: 100%;
min-width: 250px;
}
.project-card-image-container {
height: 150px;
}
.project-card-new.expanded .project-card-image-container {
height: 120px;
}
.project-card-title {
font-size: 16px;
}
.project-card-short-desc {
padding: 8px 15px 15px;
font-size: 14px;
}
.project-card-content {
max-height: 300px;
}
.project-card-content p {
font-size: 16px;
}
}
/* ===== Apps Section - Full Width Dashboard Carousel ===== */
.apps-container {
width: 100%;
max-width: 1600px;
margin: 0 auto;
padding: 20px;
display: flex;
flex-direction: column;
gap: 30px;
}
.carousel-container-full {
position: relative;
width: 100%;
padding: 40px 60px;
box-sizing: border-box;
}
@media (max-width: 1024px) {
.apps-container {
padding: 15px;
gap: 20px;
}
.carousel-container-full {
padding: 30px 40px;
}
.carousel-track-full {
gap: 15px;
}
.service-icon-large {
width: 70px;
height: 70px;
font-size: 28px;
}
.carousel-item-full[data-selected="true"] .service-icon-large {
width: 110px;
height: 110px;
font-size: 42px;
}
.carousel-item-full:nth-child(1):not([data-selected="true"]) .service-icon-large,
.carousel-item-full:nth-child(5):not([data-selected="true"]) .service-icon-large {
width: 50px;
height: 50px;
font-size: 20px;
}
.carousel-item-full:nth-child(2):not([data-selected="true"]):not(:nth-child(4)) .service-icon-large,
.carousel-item-full:nth-child(4):not([data-selected="true"]):not(:nth-child(2)) .service-icon-large {
width: 60px;
height: 60px;
font-size: 24px;
}
.service-label-large {
font-size: 18px;
}
.carousel-item-full[data-selected="true"] .service-label-large {
font-size: 22px;
}
.service-screenshot-full {
height: 300px;
}
.service-title {
font-size: 32px;
}
.service-description-full {
font-size: 20px;
}
.go-to-app-button {
font-size: 22px;
padding: 14px 30px;
}
}
@media (max-width: 768px) {
.carousel-container-full {
padding: 20px 30px;
}
.carousel-track-full {
gap: 10px;
}
.service-icon-large {
width: 60px;
height: 60px;
font-size: 24px;
}
.carousel-item-full[data-selected="true"] .service-icon-large {
width: 90px;
height: 90px;
font-size: 36px;
}
.carousel-item-full:nth-child(1):not([data-selected="true"]) .service-icon-large,
.carousel-item-full:nth-child(5):not([data-selected="true"]) .service-icon-large {
width: 45px;
height: 45px;
font-size: 18px;
}
.carousel-item-full:nth-child(2):not([data-selected="true"]):not(:nth-child(4)) .service-icon-large,
.carousel-item-full:nth-child(4):not([data-selected="true"]):not(:nth-child(2)) .service-icon-large {
width: 55px;
height: 55px;
font-size: 22px;
}
.service-screenshot-full {
height: 250px;
}
.service-title {
font-size: 26px;
}
.service-description-full {
font-size: 18px;
}
.go-to-app-button {
font-size: 20px;
padding: 12px 25px;
}
.carousel-nav-full {
width: 40px;
height: 40px;
font-size: 36px;
}
.carousel-nav-full.prev {
left: 10px;
}
.carousel-nav-full.next {
right: 10px;
}
}
.carousel-track-full {
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
width: 100%;
}
.carousel-item-full {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 1;
min-width: 120px;
}
.carousel-item-full[data-selected="true"] {
z-index: 5;
}
.service-icon-large {
width: 100px;
height: 100px;
border-radius: 50%;
background-color: var(--icon-bg, #888);
display: flex;
align-items: center;
justify-content: center;
color: var(--white-clr);
font-weight: bold;
font-size: 40px;
transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.carousel-item-full[data-selected="true"] .service-icon-large {
width: 150px;
height: 150px;
font-size: 60px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
.carousel-item-full:nth-child(1):not([data-selected="true"]) .service-icon-large,
.carousel-item-full:nth-child(5):not([data-selected="true"]) .service-icon-large {
width: 80px;
height: 80px;
font-size: 32px;
opacity: 0.7;
}
.carousel-item-full:nth-child(2):not([data-selected="true"]):not(:nth-child(4)) .service-icon-large,
.carousel-item-full:nth-child(4):not([data-selected="true"]):not(:nth-child(2)) .service-icon-large {
width: 90px;
height: 90px;
font-size: 36px;
opacity: 0.85;
}
.service-label-large {
color: var(--white-clr);
font-size: 22px;
margin-top: 15px;
opacity: 0.8;
transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
text-align: center;
}
.carousel-item-full[data-selected="true"] .service-label-large {
opacity: 1;
font-size: 28px;
font-weight: bold;
}
.carousel-item-full:nth-child(1):not([data-selected="true"]) .service-label-large,
.carousel-item-full:nth-child(5):not([data-selected="true"]) .service-label-large {
opacity: 0.5;
}
.carousel-nav-full {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.15);
border: none;
color: var(--white-clr);
font-size: 48px;
width: 50px;
height: 50px;
border-radius: 50%;
cursor: pointer;
transition: all 0.3s ease;
z-index: 10;
}
.carousel-nav-full:hover {
background: rgba(255, 255, 255, 0.25);
transform: translateY(-50%) scale(1.1);
}
.carousel-nav-full.prev {
left: 20px;
}
.carousel-nav-full.next {
right: 20px;
}
/* Service detail area - full width */
.service-detail-full {
width: 100%;
background-color: var(--dark-green, #1a3d2e);
border-radius: var(--card-border-radius, 25px);
padding: 40px;
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 30px;
}
.service-screenshot-full {
width: 100%;
height: 400px;
border-radius: 15px;
overflow: hidden;
background-color: #2a2a2a;
transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-screenshot-full img {
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0;
transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-screenshot-full img.active {
opacity: 1;
}
.service-info-full {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
text-align: center;
}
.service-title {
color: var(--green-clr);
font-size: 42px;
margin: 0;
opacity: 0;
transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}
.service-title.active {
opacity: 1;
}
.service-description-full {
color: var(--white-clr);
font-size: 24px;
line-height: 1.6;
max-width: 800px;
opacity: 0;
transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}
.service-description-full.active {
opacity: 1;
}
.service-description-full p {
margin: 0;
}
/* Go to App Button */
.go-to-app-button {
display: inline-block;
background-color: var(--green-clr);
color: var(--background-clr);
padding: 18px 40px;
font-size: 28px;
font-weight: bold;
text-decoration: none;
border-radius: 15px;
border: none;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
margin-top: 20px;
opacity: 0;
transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.go-to-app-button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.go-to-app-button.active {
opacity: 1;
}
/* ===== Games Section ===== */
.games-container {
width: 100%;
max-width: 1600px;
margin: 0 auto;
padding: 20px;
}
.games-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
width: 100%;
}
@media (max-width: 1024px) {
.games-grid {
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 25px;
}
}
@media (max-width: 768px) {
.games-container {
padding: 10px;
}
.games-grid {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
.game-card {
border-radius: 15px;
}
.game-card-image {
height: 150px;
}
.game-card.expanded .game-card-image {
height: 180px;
}
.game-card-content {
padding: 15px;
}
.game-card-title {
font-size: 20px;
}
.game-card-description {
font-size: 16px;
}
.game-card-full-description {
font-size: 16px;
}
.play-button {
font-size: 20px;
padding: 12px 25px;
}
}
.game-card {
background-color: var(--dark-teal, #2c5f5f);
border-radius: var(--card-border-radius, 25px);
overflow: hidden;
cursor: pointer;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
display: flex;
flex-direction: column;
}
.game-card:hover {
transform: translateY(-5px);
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.game-card-image {
width: 100%;
height: 200px;
overflow: hidden;
background-color: #888;
}
.game-card-image img {
width: 100%;
height: 100%;
object-fit: cover;
background-color: #888;
}
.game-card-content {
padding: 20px;
display: flex;
flex-direction: column;
gap: 10px;
}
.game-card-title {
color: var(--white-clr);
font-size: 24px;
font-weight: bold;
margin: 0;
}
.game-card-description {
color: var(--white-clr);
font-size: 18px;
opacity: 0.8;
margin: 0;
line-height: 1.5;
}
.game-year-badge {
display: inline-block;
background-color: var(--orange-clr, #f39c12);
color: var(--background-clr);
padding: 5px 12px;
border-radius: 20px;
font-size: 14px;
font-weight: bold;
align-self: flex-start;
}
.game-card-expanded {
display: none;
padding: 20px;
background-color: rgba(0, 0, 0, 0.2);
flex: 1;
}
.game-card.expanded .game-card-expanded {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.game-card.expanded .game-card-content {
display: none;
}
.game-card.expanded .game-card-image {
height: 250px;
}
.game-card-full-description {
color: var(--white-clr);
font-size: 20px;
line-height: 1.6;
text-align: center;
max-width: 80%;
margin-bottom: 20px;
}
.play-button {
display: inline-block;
background-color: var(--green-clr);
color: var(--background-clr);
padding: 15px 35px;
font-size: 24px;
font-weight: bold;
text-decoration: none;
border-radius: 15px;
border: none;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.play-button:hover {
transform: scale(1.05);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
/* Responsive design for carousel */
@media (max-width: 1024px) {
.apps-container {
padding: 15px;
}
.carousel-container-full {
padding: 30px 40px;
}
.carousel-track-full {
gap: 15px;
}
.service-icon-large {
width: 80px;
height: 80px;
font-size: 32px;
}
.carousel-item-full[data-selected="true"] .service-icon-large {
width: 120px;
height: 120px;
font-size: 48px;
}
.carousel-item-full:nth-child(1):not([data-selected="true"]) .service-icon-large,
.carousel-item-full:nth-child(5):not([data-selected="true"]) .service-icon-large {
width: 60px;
height: 60px;
font-size: 24px;
}
.carousel-item-full:nth-child(2):not([data-selected="true"]):not(:nth-child(4)) .service-icon-large,
.carousel-item-full:nth-child(4):not([data-selected="true"]):not(:nth-child(2)) .service-icon-large {
width: 70px;
height: 70px;
font-size: 28px;
}
.service-screenshot-full {
height: 300px;
}
.service-title {
font-size: 36px;
}
.service-description-full {
font-size: 20px;
}
.service-label-large {
font-size: 18px;
}
.carousel-item-full[data-selected="true"] .service-label-large {
font-size: 24px;
}
.go-to-app-button {
font-size: 24px;
padding: 15px 35px;
}
}
/* Currently working on and However in the past sections */
.about-me-section {
width: 100%;
margin-bottom: 40px;
}
.about-me-section h2 {
font-size: 28px;
color: var(--white-clr);
margin-bottom: 20px;
border-bottom: 2px solid var(--green-clr);
padding-bottom: 10px;
}
.about-me-section h2 .green-text {
color: var(--green-clr);
font-weight: bold;
}
/* ===== Images ===== */
.icon {
vertical-align: middle;
padding: 10px;
}
.icon.small {
height: 45px;
}
.icon.medium {
height: 100px;
}
.icon.large {
height: 250px;
}
@media (max-width: 1200px) {
.icon.large.toggle {
height: 150px;
}
}
.image {
margin: 30px;
}
.image.large {
width: 40%;
}
.image.small {
width: 25%;
}
@media (max-width: 1000px) {
.image.large {
width: 80%;
}
.image.small {
width: 50%;
}
}
.image.stick {
position: sticky;
top: 20px
}