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

.project-card {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  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: "Source Code Pro", monospace;
}

.project-card.image-left {
  flex-direction: row;
  background: transparent;
}

.project-card.image-right {
  flex-direction: row-reverse;
  background: transparent;
}

.project-image {
  width: 40%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 30px; /* Top-left, top-right, bottom-right, bottom-left */
  align-self: center;
}

.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: #111111;
  margin-bottom: 30px;
  margin-top: 10%;
}

.project-languages {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 16px;
  color: #111111;
  margin-bottom: 20px;
  font-weight: 400;
}

.project-languages-label {
  padding-top: 4px;
  font-weight: 700;
}

.project-technology-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.project-technology {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.project-technology-icon {
  flex-shrink: 0;
  font-size: 19px;
}

.technology-icon-react {
  color: #149eca;
}

.technology-icon-typescript {
  color: #3178c6;
}

.technology-icon-threejs {
  color: #111111;
}

.technology-icon-blender {
  color: #e87d0d;
}

.technology-icon-firebase {
  color: #ff9100;
}

.technology-icon-javascript {
  color: #d6b900;
}

.technology-icon-tailwind {
  color: #06b6d4;
}

.technology-icon-supabase {
  color: #3ecf8e;
}

.technology-icon-java {
  color: #e76f00;
}

.technology-icon-docker {
  color: #2496ed;
}

.technology-figma-icon {
  display: grid;
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(3, 6px);
  flex-shrink: 0;
  width: 12px;
  height: 18px;
}

.technology-figma-shape {
  display: block;
  width: 6px;
  height: 6px;
}

.technology-figma-red {
  border-radius: 3px 0 0 3px;
  background: #f24e1e;
}

.technology-figma-orange {
  border-radius: 0 3px 3px 0;
  background: #ff7262;
}

.technology-figma-purple {
  border-radius: 3px 0 0 3px;
  background: #a259ff;
}

.technology-figma-blue {
  border-radius: 50%;
  background: #1abcfe;
}

.technology-figma-green {
  grid-column: 1;
  border-radius: 3px 0 3px 3px;
  background: #0acf83;
}

.project-description {
  font-size: 16px;
  color: #111111;
  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;
  min-width: 0;
  width: fit-content;
  padding: 12px 18px;
  border-radius: 20px;
  display: flex;
  justify-content: center; /* horisontellt */
  align-items: center; /* vertikalt */
  cursor: pointer;
  margin-top: 5%;
  background: #f5f5f5;
  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: #111111;
}

.project-link-icon {
  flex-shrink: 0;
  margin-right: 8px;
  color: #111111;
  font-size: 18px;
}

@media (hover: hover) and (pointer: fine) {
  .project-link:hover {
    transform: scale(1.05);
  }
}

/* Animated border */
.project-link::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px; /* tjocklek på ramen */
  border-radius: inherit;
  background: linear-gradient(270deg, #111111, #777777, #111111);
  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;
}

@media (max-width: 900px) {
  .project-card,
  .project-card.image-left,
  .project-card.image-right {
    width: min(92%, 760px);
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .project-image {
    width: 100%;
    max-width: 460px;
    height: auto;
  }

  .project-content {
    margin: 0;
  }

  .project-title {
    margin-top: 0;
    margin-bottom: 14px;
  }

  .project-description {
    margin-bottom: 20px;
    line-height: 1.6;
  }

  .project-link {
    margin-top: 0;
    width: fit-content;
    min-height: 54px;
    padding: 14px 18px;
  }
}

@media (max-width: 640px) {
  .project-card,
  .project-card.image-left,
  .project-card.image-right {
    width: 100%;
    gap: 18px;
    padding: 0 20px;
  }

  .project-image {
    max-width: 100%;
    border-radius: 18px;
  }

  .project-title {
    font-size: 20px;
  }

  .project-languages,
  .project-description,
  .project-link-text {
    font-size: 14px;
  }

  .project-languages {
    flex-direction: column;
    gap: 8px;
  }

  .project-languages-label {
    padding-top: 0;
  }

  .project-description {
    margin-bottom: 18px;
  }

  .project-link {
    width: 100%;
    margin-top: 0;
    transform: none;
  }
}
.project-snap-carousel {
  width: 100%;
  height: min(78vh, 860px);
  min-height: 620px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  /* allow scrolling to propagate to parent (so user can scroll past first/last snap to header/footer) */
  overscroll-behavior-y: auto;
  scrollbar-width: none;
}

.project-snap-carousel::-webkit-scrollbar {
  display: none;
}

.project-snap-carousel:focus-visible {
  outline: 2px solid #343d8a;
  outline-offset: -2px;
}

.project-snap-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 72%;
  padding: 40px 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  opacity: 0.62;
  transform: scale(0.86);
  transform-origin: center;
  transition:
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.7s ease;
}

.project-snap-item:first-child {
  margin-top: 14%;
}

.project-snap-item:last-child {
  margin-bottom: 14%;
}

.project-snap-item.active {
  opacity: 1;
  transform: scale(1);
}

.project-snap-footer {
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 160px;
  scroll-snap-align: end;
}

.project-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(17, 17, 17, 0.25);
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(17, 17, 17, 0.24);
  animation: project-back-to-top-jump 3s ease-in-out infinite;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

@keyframes project-back-to-top-jump {
  0%,
  82%,
  100% {
    transform: translateY(0);
  }
  88% {
    transform: translateY(-7px);
  }
  94% {
    transform: translateY(-2px);
  }
}

.project-back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.3);
}

.project-back-to-top:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.3);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .project-snap-carousel {
    height: min(80vh, 920px);
    min-height: 680px;
  }

  .project-snap-item {
    min-height: 82%;
    padding: 28px 0;
    transform: scale(0.9);
  }

  .project-snap-item:first-child {
    margin-top: 9%;
  }

  .project-snap-item:last-child {
    margin-bottom: 9%;
  }
}

@media (max-width: 760px) {
  .project-snap-carousel {
    height: auto;
    min-height: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .project-snap-item {
    min-height: 0;
    padding: 28px 0;
    opacity: 1;
    transform: none;
    scroll-snap-align: none;
  }

  .project-snap-item:first-child {
    margin-top: 0;
  }

  .project-snap-item:last-child {
    margin-bottom: 24px;
  }

  .project-snap-footer {
    min-height: 72px;
    scroll-snap-align: none;
  }

  .project-back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-snap-carousel {
    scroll-behavior: auto;
  }

  .project-snap-item {
    transition: none;
  }

  .project-back-to-top {
    animation: none;
    transition: none;
  }
}
.coding-text {
  color: #111111;
  margin: 24px 0 8px;
  font-size: clamp(22px, 3vw, 32px);
  text-align: center;
  margin-top: 50px;
  margin-bottom: 8px;
}

.project-view {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  min-height: calc(100vh - 72px);
  padding-bottom: 5%;
}

.project-view > .footer {
  margin-top: auto;
}

.project-view .project-snap-item:first-child {
  margin-top: 4%;
}

@media (max-width: 760px) {
  .coding-text {
    margin: 32px 16px 8px;
    font-size: 24px;
  }

  .project-view {
    min-height: calc(100svh - 64px);
    padding-bottom: 0;
  }

  .project-view .project-snap-item:first-child {
    margin-top: 0;
  }
}
.footer {
  width: 100%;
  min-height: 72px;
  text-align: center;
  color: #000000;
  background-color: none;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Source Code Pro", monospace;
  font-size: 15px;
  padding: 12px 16px;
  font-weight: 300;
}

.footer p {
  width: 100%;
  margin: 0;
  text-align: center;
  font-weight: 300;
}

@media (max-width: 640px) {
  .footer {
    font-size: 12px;
    min-height: 60px;
    padding: 12px 20px;
    line-height: 1.5;
  }
}
.design-card {
  /* Change these values to control the design prototype card size. */
  --design-card-width: 80%;
  --design-card-image-width: 46%;
  --design-card-padding: 2%;
  --design-card-gap: 10%;
  --design-slideshow-background: transparent;

  display: flex;
  align-items: flex-start;
  width: var(--design-card-width);
  gap: var(--design-card-gap);
  margin: 0 auto;
  padding: var(--design-card-padding);
  border-radius: 30px;
  overflow: visible;
  font-family: "Source Code Pro", monospace;
}

.design-card.image-left {
  flex-direction: row;
  background: transparent;
}

.design-card.image-right {
  flex-direction: row-reverse;
  background: transparent;
}

.design-card-gallery {
  align-self: center;
  width: var(--design-card-image-width);
}

.design-card-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 30px;
  overflow: hidden;
  background-color: var(--design-slideshow-background);
}

.design-card-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease-in-out;
}

.design-card-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.design-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.design-card-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #111111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.18);
  transform: translateY(-50%);
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.design-card-arrow:hover {
  background: #111111;
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.design-card-arrow.previous {
  left: 16px;
}

.design-card-arrow.next {
  right: 16px;
}

.design-card-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.design-card-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: #a8a8a8;
  cursor: pointer;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}

.design-card-dot.active {
  width: 24px;
  border-radius: 999px;
  background-color: #111111;
}

.design-card-content {
  flex: 1;
  min-width: 0;
  margin: 15px 0 0 10px;
}

.design-card-title {
  margin: 10% 0 30px;
  color: #111111;
  font-size: 22px;
}

.design-card-languages {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  color: #000000;
  font-size: 16px;
}

.design-card-languages > span:first-child {
  font-weight: 700;
}

.design-card-figma-icon {
  display: grid;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(3, 7px);
  flex-shrink: 0;
  width: 14px;
  height: 21px;
}

.figma-shape {
  display: block;
  width: 7px;
  height: 7px;
}

.figma-red {
  border-radius: 4px 0 0 4px;
  background: #f24e1e;
}

.figma-orange {
  border-radius: 0 4px 4px 0;
  background: #ff7262;
}

.figma-purple {
  border-radius: 4px 0 0 4px;
  background: #a259ff;
}

.figma-blue {
  border-radius: 50%;
  background: #1abcfe;
}

.figma-green {
  grid-column: 1;
  border-radius: 4px 0 4px 4px;
  background: #0acf83;
}

.design-card-description {
  display: -webkit-box;
  margin-bottom: 40px;
  overflow: hidden;
  white-space: pre-line;
  color: #000000;
  font-size: 16px;
  line-height: 1.8;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.design-card-description.expanded {
  display: block;
  max-height: 1000px;
}

.design-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 20px;
  background: #f5f5f5;
  color: #111111;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

.design-card-link-icon {
  flex-shrink: 0;
  margin-right: 8px;
  color: #111111;
  font-size: 18px;
}

@media (hover: hover) and (pointer: fine) {
  .design-card-link:hover {
    transform: scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .design-card-track {
    transition: none;
  }
}

@media (max-width: 900px) {
  .design-card,
  .design-card.image-left,
  .design-card.image-right {
    --design-card-width: min(92%, 760px);
    --design-card-padding: 20px;
    --design-card-gap: 16px;

    flex-direction: column;
  }

  .design-card-gallery {
    width: 100%;
    max-width: 560px;
  }

  .design-card-content {
    margin: 0;
  }

  .design-card-title {
    margin: 0 0 14px;
  }

  .design-card-description {
    margin-bottom: 20px;
    line-height: 1.6;
  }
}

@media (max-width: 640px) {
  .design-card,
  .design-card.image-left,
  .design-card.image-right {
    --design-card-width: 100%;
    --design-card-padding: 0 20px;
    --design-card-gap: 18px;
  }

  .design-card-gallery {
    max-width: 100%;
  }

  .design-card-slideshow {
    border-radius: 18px;
  }

  .design-card-title {
    font-size: 20px;
  }

  .design-card-languages,
  .design-card-description,
  .design-card-link {
    font-size: 14px;
  }

  .design-card-link {
    width: 100%;
    min-height: 54px;
    transform: none;
  }

  .design-card-arrow {
    width: 30px;
    height: 30px;
    font-size: 24px;
  }

  .design-card-arrow.previous {
    left: 8px;
  }

  .design-card-arrow.next {
    right: 8px;
  }
}
.design-prototype-view {
  /* Change these colors to customize the design prototype page. */
  --design-page-background: #ffffff;
  --design-title-color: #111111;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  min-height: calc(100vh - 72px);
  padding-bottom: 5%;
  background-color: var(--design-page-background);
}

.design-prototype-title {
  color: var(--design-title-color);
  margin: 50px 0 8px;
  font-size: clamp(22px, 3vw, 32px);
  text-align: center;
}

.design-prototype-view .project-snap-item:first-child {
  margin-top: 4%;
}

.design-prototype-view > .footer {
  margin-top: auto;
}

@media (max-width: 760px) {
  .design-prototype-title {
    margin: 32px 16px 8px;
    font-size: 24px;
  }

  .design-prototype-view {
    min-height: calc(100svh - 64px);
    padding-bottom: 0;
  }

  .design-prototype-view .project-snap-item:first-child {
    margin-top: 0;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Source Code Pro", monospace;
  color: var(--text);
}

.about-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.about-page-footer {
  width: 100%;
}

.about-mobile-socials {
  display: none;
}

.about-snap-carousel {
  height: min(82vh, 900px);
  min-height: 650px;
}

.about-snap-carousel .project-snap-item {
  min-height: 82%;
}

.about-snap-carousel .project-snap-item > * {
  width: 100%;
}

/* ===== Hero ===== */
.about-hero {
  max-width: 1100px;
  margin: 0 auto;
  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: 1.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;
  align-items: flex-start;
  gap: 14px;
}

.line {
  width: 50px;
  height: 3px;
  display: block; /* removes inline whitespace */
  margin-top: 16px;
  margin-right: 0;
  flex-shrink: 0;
}

/* markerad fras */
.text-highlight {
  color: black; /* behåller texten svart */
  padding: 0.4em 0.25em; /* lite luft runt texten */
  border-radius: 4px; /* rundade hörn, valfritt */
}

.lead-1 .text-highlight {
  background: linear-gradient(90deg, #fff176 0%, #fff8b8 55%, #fffde7 100%);
}

.lead-2 .text-highlight {
  background: linear-gradient(90deg, #f7c9da 0%, #ffe3ed 55%, #fff7fa 100%);
}

@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;
  align-items: flex-start;
  gap: 8px;
}

.scribble {
  width: 200px;
  height: auto;
}

.polaroid-1 {
  position: relative;
  margin: 0;
  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: 32px;
  margin: 0 auto;
  padding: 0 24px;
  width: min(100%, 1000px);
}

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

.polaroid-2 {
  position: relative;
  margin: 0;
  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 {
  width: min(100%, 900px);
  margin: 0 auto;
  justify-content: center;
  padding: 12px 24px 72px;
  text-align: center;
  background: transparent;
}
.cta h2 {
  font-family: "Source Code Pro", monospace;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* gradient-outline-knapp */
.btn-gradient {
  position: relative;
  min-width: 190px;
  padding: 12px 20px;
  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: 16px;
  gap: 16px;
}

.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;
}

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

@media (max-width: 980px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 20px;
  }

  .scribble {
    display: none;
  }

  .about-photo {
    width: 100%;
    justify-content: center;
    justify-self: center;
  }

  .lead-wrapper-2 {
    flex-direction: column;
    margin-top: 20px;
    gap: 24px;
  }

  .lead-2 {
    margin: 0;
    margin-top: 30px;
  }
}

@media (max-width: 760px) {
  .about-mobile-socials {
    display: flex;
    justify-content: center;
    gap: 18px;
    width: 100%;
    padding: 28px 20px 12px;
  }

  .about-mobile-socials a {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(17, 17, 17, 0.18);
    border-radius: 50%;
    background: #ffffff;
    color: #111111;
    font-size: 25px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.12);
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease;
  }

  .about-mobile-socials a:nth-child(2) {
    color: #d93025;
  }

  .about-mobile-socials a:nth-child(3) {
    color: #0077b5;
  }

  .about-mobile-socials a:hover,
  .about-mobile-socials a:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 7px 16px rgba(17, 17, 17, 0.18);
  }

  .about-snap-carousel {
    height: auto;
    min-height: 0;
  }

  .about-snap-carousel .project-snap-item {
    min-height: 0;
  }

  .about-hero {
    margin-top: 0;
    padding: 32px 20px;
    gap: 30px;
  }

  .about-text h1 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .lead-1,
  .lead-2 {
    max-width: none;
    font-size: 14px;
    line-height: 1.8;
  }

  .scribble {
    display: none;
  }

  .lead-wrapper-1 {
    flex-direction: column;
    gap: 10px;
  }

  .lead-wrapper-2 {
    width: 100%;
    margin: 0;
    padding: 32px 20px;
    gap: 24px;
  }

  .lead-2 {
    margin-top: 16px;
  }

  .line {
    margin-top: 0;
    width: 42px;
  }

  .polaroid-1 img {
    width: min(62vw, 220px);
  }

  .polaroid-2 img {
    width: min(68vw, 240px);
  }

  .polaroid-1,
  .polaroid-2 {
    padding: 10px 10px 18px;
    box-shadow: 7px 8px 0 #222;
  }

  .polaroid-1::after,
  .polaroid-2::after {
    inset: 6px -10px -6px 10px;
  }

  .cta h2 {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.2;
  }

  .btn-gradient {
    width: min(90vw, 280px);
    min-height: 54px;
    padding: 14px 20px;
  }

  .contact-icons-extra .github-icon,
  .contact-icons-extra .mail-icon,
  .contact-icons-extra .linkedin-icon {
    font-size: 34px;
    padding: 6px;
  }
}

.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);
}

.about-page > .footer {
  margin-top: auto;
  background: transparent;
}

/* ===== Responsiv ===== */
@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: 1fr;
  }
  .about-photo {
    width: 100%;
    justify-content: center;
    justify-self: center;
  }

  .scribble {
    display: none;
  }
}
.resume {
  max-width: 900px;
  margin: 100px auto 40px;
  padding: 24px;
  background: #fff;
  color: #0f1226;
  font-family: "Source Code Pro", monospace;
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}

.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 #111111;
  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;
}

.resume > .footer {
  margin-top: auto;
}

.rectangle {
  position: relative;
  min-width: 190px;
  padding: 12px 20px;
  background: #f5f5f5;
  border: 0;
  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%;
  text-decoration: none;
  overflow: hidden;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .rectangle:hover {
    transform: scale(1.05);
  }
}

.rectangle::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(270deg, #111111, #777777, #111111);
  background-size: 300% 300%;
  animation: resumeButtonBorder 4s linear infinite;
  -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 resumeButtonBorder {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

.download-icon-2 {
  font-size: 20px;
  margin-right: 8px;
  color: #111111;
  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);
  }
}

@media (max-width: 760px) {
  .resume {
    width: 100%;
    margin: 0 auto;
    padding: 32px 20px 20px;
    min-height: calc(100svh - 64px);
  }

  .resume-header {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
  }

  .resume-title h1 {
    margin-bottom: 10px;
    font-size: 26px;
  }

  .resume-title p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
  }

  .resume-photo {
    width: 104px;
    height: 104px;
  }

  .cv-card {
    width: 100%;
    margin: 20px auto;
    padding: 8px;
  }

  .cv-image {
    width: 100%;
    margin: 0;
  }

  .rectangle {
    width: 100%;
    min-height: 54px;
    padding: 14px 20px;
    transform: none;
  }
}
html {
  scroll-behavior: smooth;
}

.home-page {
  background-color: #fff;
  background-image: url("/home_screen.png");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  height: calc(100svh - 56px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home {
  display: flex;
  flex-direction: row;
  justify-content: center; /* Centers vertically */
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  overflow: hidden;
  width: 100%;
  min-height: 0;
  position: relative;
  padding: clamp(16px, 3vh, 28px) clamp(16px, 4vw, 56px);
  flex: 1;
}

.home-page > .footer {
  flex: 0 0 60px;
  min-height: 60px;
  padding-block: 8px;
}

.home-content {
  width: min(100%, 580px);
  z-index: 1;
  text-align: center;
}

.home-title {
  color: #343d8a;
  font-size: clamp(34px, min(5vw, 8vh), 60px);
  margin: 0 0 clamp(12px, 2vh, 20px);
  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: "Source Code Pro", monospace;
}

.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: 0;
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.5;
  font-family: "Source Code Pro", monospace;
}

.home-description1 {
  margin-top: 0;
  min-height: 1.6em;
  font-family: "Source Code Pro", monospace;
  font-size: clamp(16px, 2vw, 26px);
  font-weight: 600;
}

.code-keyword {
  color: #7c3aed;
}

.code-greeting {
  color: #f59e0b;
}

.code-variable {
  color: #2563eb;
}

.code-function {
  color: #0891b2;
}

.code-string {
  color: #16a34a;
}

.code-number {
  color: #db2777;
}

.code-punctuation {
  color: #475569;
}

.code-comment {
  color: #94a3b8;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  background: #343d8a;
  vertical-align: -0.12em;
  animation: typing-cursor-blink 0.8s steps(1) infinite;
}

@keyframes typing-cursor-blink {
  50% {
    opacity: 0;
  }
}

.home-description-group {
  width: fit-content;
  margin-top: clamp(14px, 3vh, 28px);
  margin-right: auto;
  margin-left: auto;
  font-family: "Source Code Pro", monospace;
  color: #008a3b;
  font-style: italic;
  font-weight: 500;
  text-align: center;
}

.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 */
  justify-content: center;
  gap: 10px; /* lite avstånd mellan ikon och text */
  margin-bottom: 7px;
}

.home-description-group span {
  color: inherit;
}

.icon {
  font-size: 150%;
  color: #008a3b;
}

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

.buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: clamp(40px, 7vh, 72px);
}

.rectangle_2 {
  min-width: 205px;
  padding: 10px 15px;
  border: 1px solid #111111;
  border-radius: 6px;
  display: flex;
  justify-content: center; /* horisontellt */
  align-items: center; /* vertikalt */
  cursor: pointer;
  margin-top: 0;
  background: transparent;
  text-decoration: none;
}

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

.rectangle_1 {
  min-width: 205px;
  padding: 10px 15px;
  background: #111111;
  border: 1px solid #111111;
  border-radius: 6px;
  display: flex;
  justify-content: center; /*horizontally center the text*/
  align-items: center; /*vertically center the text*/
  cursor: pointer;
  margin-top: 0;
  text-decoration: none;
}

.home-button-icon {
  flex-shrink: 0;
  margin-right: 9px;
  font-size: 18px;
}

.rectangle_2 .home-button-icon {
  color: #111111;
}

.rectangle_1 .home-button-icon {
  color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .rectangle_1:hover,
  .rectangle_2:hover {
    transform: scale(1.05);
  }
}

.rectangle-text_2 {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  color: #111111;
}

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

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

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

@media (max-width: 1024px) {
  .home {
    flex-direction: column;
    text-align: center;
    min-height: 0;
    padding-block: 20px;
  }

  .home-content {
    width: min(100%, 760px);
  }

  .home-description2,
  .home-description3,
  .home-description4 {
    justify-content: center;
  }

  .buttons {
    justify-content: center;
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  .home-page {
    min-height: calc(100svh - 64px);
    height: auto;
    overflow: visible;
    background-image: none;
  }

  .home {
    min-height: calc(100svh - 124px);
    padding: 40px 20px 28px;
    gap: 12px;
    overflow: visible;
  }

  .home-content {
    width: 100%;
  }

  .home-title {
    margin-top: 0;
    line-height: 1.1;
  }

  .home-description {
    margin-top: 8px;
    line-height: 1.5;
  }

  .home-description1 {
    min-height: 3.2em;
    font-size: clamp(16px, 5vw, 20px);
    line-height: 1.6;
  }

  .home-description-group {
    width: 100%;
    margin-top: 18px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
  }

  .home-description2,
  .home-description3,
  .home-description4 {
    justify-content: center;
  }

  .buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 44px;
  }

  .rectangle_1,
  .rectangle_2 {
    width: 100%;
    max-width: none;
    min-height: 54px;
    padding: 14px 18px;
    transform: none;
  }

  .rectangle-text_1,
  .rectangle-text_2 {
    font-size: 14px;
  }

  .home-page > .footer {
    flex-basis: auto;
    min-height: 56px;
    padding-block: 6px;
  }
}

@media (max-height: 700px) and (min-width: 641px) {
  .home-title {
    font-size: clamp(32px, 7vh, 48px);
    line-height: 1.08;
  }

  .home-description-group {
    margin-top: 12px;
  }
}
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;
  width: 100%;
  height: 10%;
  padding: 0 5%;
  box-sizing: border-box;
  background: white;
  z-index: 1000; /*keep it above other elements*/
  font-family: "Source Code Pro", monospace;
  white-space: nowrap; /* Prevents text from wrapping */
  transition: 0.3s ease; /* Mjuk övergång vid sidbyte */
  border-bottom: 1px solid rgba(17, 17, 17, 0.2);
  box-shadow: 0 3px 10px rgba(17, 17, 17, 0.14);
}

.nav-menu {
  flex: 2;
  display: flex;
  justify-content: center;
}

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

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #dbe5ff;
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background: #343d8a;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.logo-image {
  height: 13px; /* 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;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.2vw, 24px);
  align-items: stretch; /* gör så att alla länkar fyller nav-höjden */
  height: 56px;
}

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

.nav-link.active {
  border-bottom: 3px solid #111111;
  color: #000000;
  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: 10px;
}

.github-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.github-visit-bubble {
  position: absolute;
  right: 50%;
  top: calc(100% - 4px);
  z-index: 2;
  padding: 6px 9px;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(50%, -5px) scale(0.92);
  transform-origin: top center;
  animation: github-visit-bubble 7s ease-in-out infinite;
}

.github-visit-bubble::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  border: 5px solid transparent;
  border-bottom-color: #111111;
  transform: translateX(-50%);
}

@keyframes github-visit-bubble {
  0%,
  60%,
  100% {
    opacity: 0;
    transform: translate(50%, -5px) scale(0.92);
  }
  66%,
  84% {
    opacity: 1;
    transform: translate(50%, 0) scale(1);
  }
  90% {
    opacity: 0;
    transform: translate(50%, 3px) scale(0.96);
  }
}

.github-link:hover .github-visit-bubble,
.github-link:focus-visible .github-visit-bubble {
  opacity: 1;
  transform: translate(50%, 0) scale(1);
}

.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 (prefers-reduced-motion: reduce) {
  .github-visit-bubble {
    animation: none;
  }
}

@media (max-width: 960px) {
  .header {
    padding: 0 20px;
  }

  .nav-link {
    font-size: 13px;
    padding: 0 10px;
  }

  .github-icon,
  .mail-icon,
  .linkedin-icon {
    font-size: 28px;
    padding: 6px;
  }
}

@media (max-width: 760px) {
  .header {
    height: auto;
    padding: 0 16px;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 0;
    white-space: normal;
    align-items: center;
  }

  .logo {
    flex: 1;
    justify-content: flex-start;
  }

  .logo-image {
    height: 16px;
  }

  .hamburger {
    display: inline-flex;
  }

  .nav-menu {
    flex: 0 0 100%;
    display: none;
    padding: 8px 0 14px;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav {
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
  }

  .nav-link.active {
    border-bottom: 0;
    background: #f2f2f2;
    box-shadow: inset 3px 0 0 #111111;
  }

  .contact-icons {
    display: none;
  }

  .github-icon,
  .mail-icon,
  .linkedin-icon {
    font-size: 24px;
    padding: 4px;
  }
}
