/* ?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);
}

/* add hover to resume button */
.btn-primary:hover {
  background: var(--secondary-color);
}

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

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

.toggle-icons > img {
  transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  width: 30px;
}

.moon {
  transform: rotate(10deg);
}

#switch:checked + .toggle-icons .moon {
  transform: rotate(250deg);
}

#switch:checked + .toggle-icons .sun {
  transform: rotate(100deg);
}

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

.header-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  width: 100%;
  max-width: var(--width-medium);
}

.header-content .profile-image {
  order: 2;
  flex-shrink: 0;
}

.content-text {
  text-align: left;
  margin: 1.5rem 0;
  flex: 1;
}

.content-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

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

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

/* Project cards */
.card {
  padding: 0;
  background: var(--card-background);
  border-radius: 8px;
  transition: 0.4s ease-in-out;
  cursor: pointer;
  min-height: 250px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.card .project-image {
  width: 40%;
  min-height: 250px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
  flex-shrink: 0;
}

.card .project-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  opacity: 1;
}

.card .project-bio {
  flex: 1;
}

.card .project-bio h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.card .tech-stack {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 0.8rem;
  font-weight: var(--weight-semibold);
  color: var(--text-color);
}

.card .project-description {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  opacity: 0.9;
}

.card .project-link {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.card a {
  color: var(--text-color);
  transition: 0.25s ease-in-out;
  font-size: 1.3rem;
}

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

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

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

  .header-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }

  .header-content .profile-image {
    order: 1;
  }

  .content-text {
    text-align: center;
  }

  .content-text h1 {
    font-size: 2rem;
  }

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

  .content-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .card {
    flex-direction: column;
  }

  .card .project-image {
    width: 100%;
    min-height: 200px;
  }

  .card .project-info {
    padding: 1.5rem;
  }
}
