body {
  overflow-x: hidden; /* Prevents horizontal scrolling */
}

.project-card {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 30px; /* Rounded corners */
  overflow: visible; /* Prevents text from being cut */
  width: 80%;
  gap: 10%;
  transition: transform 0.3s, box-shadow 0.3s; /* Hover effect */
  margin: 0 auto; /* ← centrerar kortet */
  padding: 2%;
  font-family: "Raleway", sans-serif;
}

.project-card:nth-child(odd) {
  flex-direction: row;
  background: linear-gradient(90deg, #dee8ff 0%, #f9faff 50%, #ffffff 100%);
}

.project-card:nth-child(even) {
  flex-direction: row-reverse;
  background: linear-gradient(90deg, #ffffff 0%, #f9faff 50%, #dee8ff 100%);
}

.project-image {
  width: 40%;
  height: 30%;
  border-radius: 30px; /* Top-left, top-right, bottom-right, bottom-left */
}

.project-content {
  flex: 1; /* Allow content to grow and fill available space */
  padding: 0;
  margin-left: 10px;
  margin-top: 15px;
  cursor: pointer; /* Indicate the element is clickable */
  min-height: auto; /* Allow it to grow */
}

.project-title {
  font-size: 22px;
  font-weight: bold;
  color: #343d8a;
  margin-bottom: 30px;
  margin-top: 10%;
}

.project-languages {
  font-size: 16px;
  color: black;
  margin-bottom: 20px;
  font-weight: 400;
}

.project-description {
  font-size: 16px;
  color: black;
  margin-bottom: 40px;
  line-height: 1.8;
  transition: all 0.3s ease; /* Smooth transition for height changes */
  transition: max-height 0.3s ease, white-space 0.3s ease; /* Smooth expansion */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Show only 3 lines */
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: max-height 0.3s ease-in-out;
  font-weight: 400;
}

.project-description.expanded {
  display: block;
  max-height: 1000px;
  white-space: normal;
}

.project-link {
  position: relative;
  width: 35%;
  padding: 3.5%;
  border-radius: 20px;
  display: flex;
  justify-content: center; /* horisontellt */
  align-items: center; /* vertikalt */
  cursor: pointer;
  margin-top: 5%;
  background: #fff;
  z-index: 1;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.project-link-text {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  color: #343d8a;
}

.project-link:hover {
  transform: scale(1.1);
}

/* Animated border */
.project-link::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px; /* tjocklek på ramen */
  border-radius: inherit;
  background: linear-gradient(270deg, #b068cf, #a2defa, #b068cf);
  background-size: 300% 300%;
  animation: moveBorder 4s linear infinite;

  /* mask för att bara visa border och inte fylla mitten */
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  z-index: -1;
}
.coding-text {
  color: #343d8a;
  margin-bottom: 50%;
  margin-top: 50%;
  font-size: 30px;
}

.project-view {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-bottom: 5%;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding-bottom: 5%;
}
.footer {
  width: 100%;
  height: 100px;
  position: "fixed";
  bottom: 0;
  text-align: center;
  color: #343d8a;
  background-color: transparent;
  display: flex; /* Ensures content inside is aligned */
  justify-content: center; /* Centers content horizontally */
  align-items: center; /* Centers content vertically */
  font-family: "Raleway", sans-serif;
  font-size: 15px;
}

@media (max-width: 390px) {
  .footer {
    font-size: 10px;
  }
}

@media (max-width: 412px) {
  .footer {
    font-size: 10px;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Raleway", sans-serif;
  color: var(--text);
}

.about-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fff 0%, #f7f9ff 40%, #e9f3ff 100%);
}

/* ===== Hero ===== */
.about-hero {
  max-width: 1100px;
  margin: 50px auto 0; /* lämna plats för ev. fixed header */
  padding: 56px 24px;
  display: grid;
  gap: 48px;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

.about-text h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 2;
  margin: 0 0 16px;
  font-weight: 600;
}

.lead-1 {
  font-size: 16px;
  line-height: 2;
  color: black;
  max-width: 60ch;
  margin: 0;
}

.lead-wrapper-1 {
  display: flex;
}

.line {
  width: 50px;
  height: 3px;
  display: block; /* removes inline whitespace */
  margin-top: 2%;
  margin-right: 5%;
}

/* markerad fras */
.text-highlight {
  background: linear-gradient(90deg, #dee8ff 80%, #ffffff 100%);
  color: black; /* behåller texten svart */
  padding: 0.4em 0.25em; /* lite luft runt texten */
  border-radius: 4px; /* rundade hörn, valfritt */
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* foto-kort i “polaroid”-stil */
.about-photo {
  position: relative;
  justify-self: end;
  display: flex;
}

.scribble {
  height: 50%;
}

.polaroid-1 {
  position: relative;
  padding: 14px 14px 24px;
  background: #fff;
  border: 2px solid #222;
  box-shadow: 10px 12px 0 #222; /* offset-ram */
  transform: rotate(1deg);
}

.polaroid-1::after {
  content: "";
  position: absolute;
  inset: 8px -14px -8px 14px;
  border: 2px solid #222;
  pointer-events: none;
}

.polaroid-1 img {
  display: block;
  width: 230px;
  height: auto;
  cursor: pointer;
}

.polaroid-1 img:hover {
  transform: scale(1.1);
}

.lead-wrapper-2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5%;
  margin-top: 5%;
}

.lead-2 {
  font-size: 16px;
  line-height: 2;
  color: black;
  max-width: 50ch;
}

.polaroid-2 {
  position: relative;
  padding: 14px 14px 24px;
  background: #fff;
  border: 2px solid #222;
  box-shadow: 10px 12px 0 #222; /* offset-ram */
  z-index: 1;
}

.polaroid-2::after {
  content: "";
  position: absolute;
  inset: 8px -14px -8px 14px;
  border: 2px solid #222;
  pointer-events: none;
}

.polaroid-2 img {
  display: block;
  width: 280px;
  height: auto;
  cursor: pointer;
}

.polaroid-2 img:hover {
  transform: scale(1.1);
}

/* ===== CTA ===== */

.cta {
  justify-content: center;
  margin-top: 10%;
  padding-bottom: 10%;
  text-align: center;
  background: linear-gradient(180deg, transparent 0, #eef5ff 30%, #dfeeff 100%);
}
.cta h2 {
  font-family: "Audiowide", cursive;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* gradient-outline-knapp */
.btn-gradient {
  position: relative;
  width: 15%;
  padding: 1.8%;
  border-radius: 20px;
  display: flex;
  justify-content: center; /* horisontellt */
  align-items: center; /* vertikalt */
  cursor: pointer;
  background: #fff;
  z-index: 1;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-gradient:hover {
  transform: scale(1.1);
}

/* Animated border */
.btn-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px; /* tjocklek på ramen */
  border-radius: inherit;
  background: linear-gradient(270deg, #b068cf, #a2defa, #b068cf);
  background-size: 300% 300%;
  animation: moveBorder 4s linear infinite;

  /* mask för att bara visa border och inte fylla mitten */
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  z-index: -1;
}
.btn-text {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  color: #343d8a;
}

.contact-me-icon {
  font-size: 20px;
  margin-right: 8px;
  color: #343d8a;
  vertical-align: middle;
}

@keyframes borderFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* så de bryter fint på mobil */
  margin-top: 3%;
  gap: 3%;
}

.github-icon {
  font-size: 45px;
  color: black;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s; /* Smooth hover effect */
}

.mail-icon {
  font-size: 45px;
  color: #d93025;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s; /* Smooth hover effect */
  padding: 10px;
}

.linkedin-icon {
  font-size: 45px;
  color: #0077b5;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s; /* Smooth hover effect */
  padding: 10px;
}

.contact-icons a:hover {
  transform: translateY(-2px);
}

.footer {
  margin-top: 5%;
  margin-bottom: -5%;
}

/* ===== Responsiv ===== */
@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: 1fr;
  }
  .about-photo {
    justify-self: start;
  }
}
.resume {
  max-width: 900px;
  margin: 100px auto 40px;
  padding: 24px;
  background: #fff;
  color: #0f1226;
  font-family: "Raleway", sans-serif;
}

.resume-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eaeaea;
}

.resume-title h1 {
  margin: 0 0 5%;
  font-size: 30px;
}
.resume-title p {
  margin: 2% 0;
  color: black;
}

.resume-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
  border: 2px solid #343d8a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.resume-photo:hover {
  transform: scale(1.1);
}

.cv-wrap {
  display: flex;
  justify-content: center;
  padding: 0;
  margin-top: 1%;
}

.cv-card {
  width: min(96vw, 1100px); /* upp från t.ex. 820px */
  margin: clamp(16px, 2vw, 32px) auto;
  padding: clamp(16px, 2vw, 28px);
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background: #fff;
  overflow: hidden;
}

.cv-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.cv-image {
  display: block; /* inga extra “inline”-marginaler */
  height: auto;
  object-fit: contain; /* behåll hela CV:t */
  background: #fff; /* vit bakgrund bakom ev. transparent PNG */
  margin: 0;
  padding: 0;
  -webkit-user-drag: none; /* ingen oavsiktlig drag */
  user-select: none;
  width: calc(100% - 48px); /* 24px på varje sida */
  margin: 24px; /* skapar vit yta (kortets bakgrund syns) */
}

.button {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.rectangle {
  width: 25%;
  padding: 3%;
  background-color: #343d8a;
  border: 2px solid transparent;
  border-radius: 20px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center; /*horizontally center the text*/
  align-items: center; /*vertically center the text*/
  cursor: pointer;
  margin-top: 5%;
}

.rectangle:hover {
  transform: scale(1.1);
}

.rectangle-text {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  color: white;
}

.download-icon-2 {
  font-size: 20px;
  margin-right: 8px;
  color: white;
  vertical-align: middle; /* justerar mot texten */
}

/* (valfritt) mörkt tema kantlinje svagare */
@media (prefers-color-scheme: dark) {
  .cv-card {
    border-color: rgba(255, 255, 255, 0.12);
  }
}
html {
  scroll-behavior: smooth;
}

.home-page {
  background-color: white;
  background-size: 50px 50px; /* Adjust grid size */
}

.home {
  display: flex;
  flex-direction: row;
  justify-content: center; /* Centers vertically */
  overflow: hidden;
  width: 100%;
  min-height: 100%; /* full viewport */
  height: auto;
  position: relative;
}

.home-content {
  max-width: 50%;
  margin-bottom: 1%;
  z-index: 1;
}

.home-title {
  color: #343d8a;
  font-size: 400%;
  margin-top: 10%;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  position: relative; /* Needed for the underline */
  font-family: "Raleway", sans-serif;
}

.gradient-text {
  background: linear-gradient(
    90deg,
    #b068cf,
    #dbdaff,
    #a2defa,
    #96affb,
    #b068cf
  );
  background-size: 300% 300%; /* större än elementet */
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientMove 5s linear infinite; /* animation */
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.home-description {
  color: #343d8a;
  font-weight: 400;
  margin-top: -3%;
  font-size: 125%;
  line-height: 1.7;
  font-family: "Raleway", sans-serif;
}

.home-description1 {
  font-style: italic;
  margin-top: 5%;
}

.home-description-group {
  margin-top: 10%;
}

.home-background {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

.home-description2,
.home-description3,
.home-description4 {
  display: flex;
  align-items: center; /* centrerar ikon + text vertikalt */
  gap: 3%; /* lite avstånd mellan ikon och text */
}

.icon {
  font-size: 150%;
  color: #343d8a;
}

.robot-wrapper {
  position: relative; /* gör så att cirklar kan placeras relativt till wrappern */
  display: inline-block;
}

.circle {
  width: 80%;
  height: 60%;
  position: absolute;
  margin-top: 10%;
  margin-left: 20%;
}

.robot {
  width: 60%;
  height: 70%;
  margin-top: 20%;
  margin-left: 30%;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: robot-slide-in 800ms ease-out 200ms forwards;
}
/* Keyframes */
@keyframes robot-slide-in {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Respekt för användare som valt reduced motion */
@media (prefers-reduced-motion: reduce) {
  .robot {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.buttons {
  display: flex;
  flex-direction: row;
  gap: 3%;
}

.rectangle_1 {
  position: relative;
  width: 35%;
  padding: 3.5%;
  border-radius: 20px;
  display: flex;
  justify-content: center; /* horisontellt */
  align-items: center; /* vertikalt */
  cursor: pointer;
  margin-top: 5%;
  background: #fff;
  z-index: 1;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Animated border */
.rectangle_1::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px; /* tjocklek på ramen */
  border-radius: inherit;
  background: linear-gradient(270deg, #b068cf, #a2defa, #b068cf);
  background-size: 300% 300%;
  animation: moveBorder 4s linear infinite;

  /* mask för att bara visa border och inte fylla mitten */
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  z-index: -1;
}

@keyframes moveBorder {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.rectangle_2 {
  width: 35%;
  padding: 3.5%;
  background-color: #343d8a;
  border: 2px solid transparent;
  border-radius: 20px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center; /*horizontally center the text*/
  align-items: center; /*vertically center the text*/
  cursor: pointer;
  margin-top: 5%;
}

.rectangle_1:hover {
  transform: scale(1.1);
}

.rectangle_2:hover {
  transform: scale(1.1);
}

.rectangle-text_1 {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  color: #343d8a;
}

.nav-link {
  text-decoration: none;
}

.nav-link:hover {
  text-decoration: none;
}

.download-icon-1 {
  font-size: 20px;
  margin-right: 8px;
  color: #343d8a;
  vertical-align: middle; /* justerar mot texten */
}

.contact-icon {
  font-size: 20px;
  margin-right: 8px;
  color: white;
  vertical-align: middle;
}

.rectangle-text_2 {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  color: white;
}
body,
html {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Consistent box model */
}

.header {
  display: flex;
  align-items: center; /*vertically center items*/
  justify-content: space-between;
  border-bottom: 0.1px solid rgba(255, 255, 255, 0.5); /* 50% transparent white */
  width: 100%;
  height: 10%;
  padding: 0 5%;
  box-sizing: border-box;
  background: white;
  z-index: 1000; /*keep it above other elements*/
  font-family: "Raleway", sans-serif;
  white-space: nowrap; /* Prevents text from wrapping */
  overflow: hidden; /* Ensures elements don't overflow */
  transition: 0.3s ease; /* Mjuk övergång vid sidbyte */
  border-bottom: 1px solid #e6eeff;
  box-shadow: 0 2px 8px rgba(52, 61, 138, 0.08);
}

.logo {
  display: flex;
  align-items: center;
  flex: 1;
}

.logo-image {
  height: 50px; /* styr höjd */
  width: auto; /* behåll proportioner */
  display: block;
  transition: transform 0.3s;
  cursor: pointer;
}
.logo-image:hover {
  transform: scale(1.1);
}

.nav {
  display: flex;
  flex: 2;
  align-items: center;
  gap: 28%;
  left: 50%;
  transform: translateX(-50%);
  align-items: stretch; /* gör så att alla länkar fyller nav-höjden */
  height: 60px; /* öka navbar-höjden */
}

.nav-link {
  display: flex;
  align-items: center; /* centrera text vertikalt */
  text-decoration: none; /*remove underline*/
  color: #343d8a;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s;
  padding: 0 15px; /* gör boxen bredare */
}

.nav-link.active {
  background-color: #343d8a;
  color: #fff;
  font-weight: 600;
}

.nav-link:hover {
  transform: scale(1.05);
  font-weight: 600;
}

.contact-icons {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 3%;
}

.github-icon {
  font-size: 45px;
  color: black;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s; /* Smooth hover effect */
  padding: 10px;
}

.github-icon:hover {
  transform: scale(1.2);
}

.mail-icon {
  font-size: 45px;
  color: #d93025;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s; /* Smooth hover effect */
  padding: 10px;
}

.mail-icon:hover {
  transform: scale(1.2);
}

.linkedin-icon {
  font-size: 45px;
  color: #0077b5;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s; /* Smooth hover effect */
  padding: 10px;
}

.linkedin-icon:hover {
  transform: scale(1.2);
}

@media (max-width: 600px) {
  .header {
    height: 72px;
    padding: 0 16px;
  }
  .logo-image {
    height: 40px;
  }
  .nav {
    gap: 20px;
  }
  .nav-link {
    font-size: 14px;
  }
}
