/* ?This is where reusable styling of this template will be. 
   !Will contain things like:
   * Button styling
   * Background color styling
   * padding and margin
*/

.container {
  max-width: var(--width-medium);
  margin: 0 auto;
  padding: 1rem 2rem;
}

h1::selection,
h2::selection {
  color: #111;
  background: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.9rem;
  border-radius: 30px;
  text-transform: uppercase;
  font-size: 0.82rem;
  transition: 0.3s;
}

.btn-primary {
  background: var(--primary-color);
  color: #000000;
}

.btn-secondary {
  margin: 5px 0;
  background-color: var(--bg-secondary);
  color: var(--bg-primary);
}



/* Dark mode toggle */
#switch {
  display: none;
}

.toggle-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.toggle-icons > img {
  transition: 0.4s ease-in-out;
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 5px;
}

.moon {
  opacity: 0.3;
  transform: scale(0.8);
}

.sun {
  opacity: 1;
  transform: scale(1.1);
}

#switch:checked + .toggle-icons .moon {
  opacity: 1;
  transform: scale(1.1);
}

#switch:checked + .toggle-icons .sun {
  opacity: 0.3;
  transform: scale(0.8);
}

/* Header Container */
.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 8rem;
  padding: 1rem;
}

.header-container > div {
  margin-top: 1rem;
}

.content-text {
  text-align: center;
  margin: 1.5rem 0;
}

.content-text h2 {
  font-size: 3rem;
  line-height: 1.2;
  transition: 0.2s ease-in-out;
}

.content-text p {
  padding: 0.5rem;
  margin: 0 auto;
  max-width: 700px;
}

/* Project cards */
.card {
  padding: 1.5rem;
  background: var(--card-background);
  color: #ffffff;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow);
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: inherit;
  transition: transform 0.5s ease;
  z-index: -1;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
  transform: scale(1.1);
}

.project-info {
  position: relative;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease-in-out;
}

.card:hover .project-info {
  opacity: 1;
  transform: translateY(0);
}

.card a {
  color: #ffffff;
  transition: 0.25s ease-in-out;
  font-size: 1.3rem;
}

.card a:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

/* Project Images */

/* project 1 */
.card:nth-child(1) {
  background: url(../assets/project/1.jpeg) center center/cover;
}

/* Project 2 */
.card:nth-child(2) {
  background: url(../assets/project/2.jpg) center center/cover;
}

/* Project 3 */
.card:nth-child(3) {
  background: url(../assets/project/3.jpg) center center/cover;
}

/* Project 4 */
.card:nth-child(4) {
  background: url(../assets/project/4.jpg) center center/cover;
}

/* Project 5 */
.card:nth-child(5) {
  background: url(../assets/project/5.png) center center/cover;
}

/* Project 6 */
.card:nth-child(6) {
  background: url(../assets/project/6.jpg) center center/cover;
}

/* Media Queries */
@media (max-width: 768px) {
  .header-container {
    margin-top: 7rem;
    text-align: center;
  }

  .content-text h2 {
    font-size: 2.5rem;
  }
}
