<div class="container">
  
  <!--  Toggle dark mode button  -->
  <input type="checkbox" id="toggle" name="toggletheme">
  <label for="toggle">
    <span class="dark">Dark</span>
    <span class="light">Light</span>
  </label>
  
  <!--  Card  -->
  <div class="card">
    <div class="columns">
      <img src="https://i.imgur.com/OwYS6tj.jpg" alt="">
      <div class="content">
        <h1>Fig Thyme Shrub Cocktail</h1>
        <div class="columns">
          <div class="column">
            <h3>Ready In</h3>
            <p>15 minutes</p>
          </div>
          <div class="column">
            <h3>Cooking Time</h3>
            <p>15 minutes</p>
          </div>
        </div>
        <div class="columns">
          <div class="column">
            <h3>Ingredients</h3>
          </div>
        </div>
      </div>
    </div>
  </div>
  
</div>
:root {
  --bg-color: #F1E8E8;
  --white: #FFFFFF;
  --black: #282F3C;
  --pink: rgba(255, 98, 98, 1);
  --pink-light: rgba(255, 98, 98, 0.3);
  --pink-lighter: rgba(255, 98, 98, 0.1);
  --gray: #959595;
  --trans: 0.3s ease;
}

body {
  background: var(--bg-color);
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  justify-content: center;
  padding: 5rem 0rem 35rem 0rem;
}

.container {
  position: relative;
}


/* Input checkbox */
input[type="checkbox"] {
  display: none;
}

input[type="checkbox"] + label::before {
  content: "";
  position: absolute;
  display: inline-block;
  width: 1rem;
  height: 1rem;
  top: 10px;
  left: 10px;
  background: var(--pink);
  border-radius: 20rem;
  transition: var(--trans);
  transform: translateX(0px);
}

/* Toggle button */
input[type="checkbox"] + label {
  position: relative;
  cursor: pointer;
  color: var(--pink);
  width: 95px;
  height: 35px;
  margin-left: 11.6rem;
  display: block;
  border-radius: 20rem;
  transition: var(--trans);
  background: var(--pink-lighter);
}

/* Toggle Text */
input[type="checkbox"] + label span {
  position: absolute;
  top: 10px;
  left: 35px;
}

input[type="checkbox"] + label span.light, 
input[type="checkbox"]:checked + label span.dark {
  display: none;
}

input[type="checkbox"]:checked + label span.light {
  display: inline;
}

/* In Dark Mode button */
input[type="checkbox"]:checked + label {
  transition: var(--trans);
  background: var(--pink-lighter);
}

input[type="checkbox"]:checked + label span {
  margin-right: 16px;
  margin-left: -13px;
}

input[type="checkbox"]:checked + label::before {
  transition: var(--trans);
  transform: translateX(59px);
}

input[type="checkbox"]:checked:hover + label,
input[type="checkbox"]:not(:checked):hover + label {
  background: var(--pink-light);
}


/* Card Style */
.card {
  position: absolute;
  background: var(--white);
  top: -30px;
  margin-top: 1rem;
  z-index: -1;
  border-radius: 20px;
}

/* Dark Mode Card Style */
input[type="checkbox"]:checked ~ .card {
  background: var(--black);
  color: var(--white);
}

.content h1 {
  font-size: 28px;
}

.content h3 {
  color: var(--pink);
  margin: 0;
}

.content p {
  color: var(--gray);
  margin: 0;
  margin-top: 0.5rem;
}

.card > .columns {
  width: 260px;
  margin: 4rem 1.2rem 1.5rem 1.2rem;
}

.card > .columns img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
}

.content > .columns {
  display: flex;
  width: 100%;
  margin-bottom: 1rem;
}

.content > .columns > .column {
  width: 50%;
}
// No javascript

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.