.projects { display: flex; flex-direction: column; align-items: center; gap: 1rem; } .projects img { max-width: 100%; display: block; } .card { display: flex; border: 1px solid red; width: min(40rem, calc(100% - 1rem)); } .card .card_text > * { margin: 1rem; } .card > * { flex-basis: 100%; } .card .card_left { border: 1px solid green; } .card .card_right { border: 1px solid yellow; }