/* ***** Body Style ***** */
body {
  background-color: #f9f4f7;
  font-family: "Poppins", Arial, sans-serif;
  margin: 0;
  padding-top: 100px; /* adjust to match header height */
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* full viewport height */
}

main {
  flex: 1;
}

/* ***** Header Style ***** */
header {
  position: fixed; /* fixed at the top of the page */
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem; /* padding inside header */
  background-color: #fff;
  border-radius: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between; /* logo on left, nav on right */
  align-items: center;
  z-index: 1000; /* stay on top of other content */
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Logo */
header #left h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: #e8678f;
}

/* Navigation list horizontally */
header nav ul {
  display: flex; /* horizontal layout */
  gap: 2rem; /* space between links */
  list-style: none; /* remove default bullets */
  margin: 0;
  margin-right: 4rem; /* space from the right edge */
  padding: 0;
}

/* Links style */
header nav ul li a {
  text-decoration: none; /* remove underline */
  color: #e8678f;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem; /* clickable area */
  border-radius: 8px; /* rounded link corners */
  transition: background-color 0.3s ease, color 0.3s ease; /* smooth hover */
}

/* Hover effect */
header nav ul li a:hover {
  color: #fff;
  background: linear-gradient(135deg, #e8678f, #f7a1c4);
  transform: translateY(-2px);
}

/* ***** Hero Style ***** */
#hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(
    160deg,
    #fff 70%,
    #f9f4f7 100%
  ); /* soft gradient */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  max-width: 1200px;
  margin: 4rem auto 0 auto;
  padding: 2rem;
  border-radius: 40px;
  gap: 2rem;
  opacity: 0;
  position: relative;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease; /* smooth transition */
}

#hero.show {
  opacity: 1;
  transform: translateY(0); /* move to original position */
}

.hero-text h1 {
  margin: 0 0 0.5rem 0;
  font-size: 3rem;
  color: #e8678f;
}

.hero-text h2 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  color: #555;
  max-width: 450px;
}

.hero-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 3rem;
  color: #e8678f;
}

.hero-text p {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
}

.img-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-width: 400px;
  min-height: 400px;
  border-radius: 30px;
  overflow: hidden;
}

.img-container::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at 30% 30%, #f7a1c4, #e8678f);
  border-radius: 60% 40% 50% 50%; /* irregular blob shape */
  top: -100px;
  left: -100px;
  z-index: 1;
  opacity: 0.3;
  filter: blur(80px);
  transform: rotate(-20deg);
}

.img-container img {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: transform 0.5s ease;
  z-index: 1;
  align-self: flex-start;
  object-fit: cover;
  transform: scale(1.05) rotate(1deg);
}

.img-container img:hover {
  transform: scale(1.15) rotate(2deg);
}

.social-links {
  display: flex;
  gap: 1rem; /* space between icons if you add more */
}

.social-links a {
  display: inline-block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-3px) scale(1.1); /* slight lift and grow on hover */
  filter: brightness(1.2); /* makes it pop */
}

.social-links img {
  width: 45px; /* size of the icon */
  height: 45px;
}
/* ***** Skills Style ***** */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

/* Individual skill */
.skills li {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  background: #fff;
  padding: 0.6rem 1rem;
  border-radius: 20px;

  font-size: 0.9rem;
  font-weight: 500;

  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect */
.skills li:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* Icon size */
.skills img {
  width: 20px;
  height: 20px;
}
/* ***** Project Style ***** */
#intro-projects {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(160deg, #fff 70%, #f9f4f7 100%);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  max-width: 1200px;
  margin: 4rem auto;
  padding: 3rem 2rem;
  border-radius: 40px;
  gap: 1rem;
  opacity: 0;
}

.project-a {
  grid-row: span 2; /* 2 rows */
}

.project-b {
  grid-column: 2;
  grid-row: 1;
}

.project-c {
  grid-column: 2;
  grid-row: 2;
}

.project-d {
  grid-row: 3;
  grid-column: span 2;
}

#intro-projects.show {
  opacity: 1;
  transform: translateY(0); /* move to original position */
}

#intro-projects h1 {
  font-size: 2.8rem;
  color: #e8678f;
  margin-bottom: 0.5rem;
}

#intro-projects p {
  font-size: 1.2rem;
  color: #555;
  text-align: center;
}

/* Grid layout for projects */
#intro-projects .projects-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; /* vänster större */
  grid-template-rows: auto auto;
  gap: 2rem;
}

/* Individual project cards */
#intro-projects .project {
  border-radius: 30px;
  background-color: #fff;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
  align-items: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
}

#intro-projects .project:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

#intro-projects .project h2 {
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: #e8678f;
  margin-top: 1rem;
  transition: color 0.3s ease;
}

#intro-projects img {
  margin-top: 1rem;
  width: 100%;
  border-radius: 30px;
}

#intro-projects .project a:hover {
  color: #f7a1c4;
}

#intro-projects .project p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin: 0.5rem 0 1rem 0;
  text-align: center;
  transition: color 0.3s ease;
}

/* Video styling */
.video-wrapper {
  width: 300px;
  max-width: 90%;
  margin: 0 auto;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  border: 10px solid #fff;
}

.video-wrapper video {
  width: 100%;
  height: 600px;
  display: block;
  object-fit: cover;
}

.slider {
  position: relative;
  overflow: hidden;
  max-width: 95%;
}

.slider-track {
  display: flex;
  transition: transform 0.4s ease;
}

.slider img {
  width: 100%;
  height: auto;
  flex-shrink: 0;
  border-radius: 10px;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.prev {
  left: 10px;
}
.next {
  right: 10px;
}

iframe {
  border-radius: 30px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background-color: #fff;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.course-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.course-list li {
  background-color: #fafaf9;
  border-left: 4px solid #e8678f;
  padding: 1rem 1.2rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease-in-out;
}

.course-list li:hover {
  transform: translateY(-2px);
}

.course-list span:first-child {
  font-size: 0.95rem;
  color: #333333;
  line-height: 1.4;
}

.course-list .credits {
  font-weight: 600;
  color: #55705e;
  font-size: 0.85rem;
  white-space: nowrap;
  margin-left: 1rem;
}
/* ***** Smaller Screens Style ***** */
@media (max-width: 768px) {
  header nav ul {
    gap: 0.5rem;
    margin-right: 2rem;
    font-size: 0.9rem;
  }

  #hero {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .img-container {
    min-width: auto;
    width: 100%;
    min-height: 300px;
  }

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

  .hero-text h2 {
    font-size: 1.2rem;
    max-width: none;
  }

  .projects-grid {
    grid-template-columns: 1fr; /* single column */
    gap: 2rem;
  }

  .project {
    grid-row: auto;
    grid-column: auto;
  }

  .project-content {
    flex-direction: column;
    align-items: center;
  }

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

  .video-wrapper {
    width: 220px;
  }

  #intro-projects .projects-grid {
    grid-template-columns: 1fr;
  }

  .course-list {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}