/*
 * Copyright (c) 2025 Erik Jonsson
 *
 * Permission is granted to download, view, and use this code solely for educational and non-commercial purposes.
 *
 * You MAY NOT:
 * - Claim this code, in whole or in part, as your own work.
 * - Use, copy, modify, or distribute this code for commercial purposes without prior written consent.
 * - Remove or alter any copyright notices or licensing terms in this code.
 *
 * All copies or derivative works must retain this copyright notice and the license terms.
 *
 * THIS CODE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
 *
 * By using this code, you agree to abide by these terms.
 */




*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 1.5rem;
  font-family: 'Inter', sans-serif;
  background-color: #00182c;
  color: #373737;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}




.sidebar {
  position: fixed;
  top: 2.5rem;
  left: 2.5rem;
  width: calc(40vw - 1.5rem);
  height: calc(100vh - 3rem);
  background-color: #00182c;
  padding: 2rem 6rem;
  border-radius: 12px;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}



.sidebar .hero {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e9f5ff;
}

.hero-title,
.sidebar .hero-title {
  font-size: 2.5rem;
  color: #e9f5ff;
  margin-bottom: 0.25rem;
}

.hero-subtitle,
.sidebar .hero-subtitle {
  font-size: 1.1rem;
  color: #c1d3e2;
  margin-bottom: 1rem;
}

.hero-desc,
.sidebar .hero-desc {
  font-size: 1.1rem;
  color: #e9f5ff;
  margin-bottom: 1.5rem;
}

.sidebar .btn-primary {
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  background-color: transparent;
  border: 1px solid #276db7;
  color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar .btn-primary:hover {
  background-color: #064663;
  color: #edf2ff;
}


.nav-links li + li {
  margin-top: 3rem;
}

.nav-links a {
  position: relative;
  color: #777777;
  font-weight: 100;
  font-size: 1rem;
  padding-left: 0.25rem;
  display: inline-block;
  transition: color 0.3s ease;
}

.nav-links a:not(.view-all-link-item)::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #fbfdff;
  transition: width 0.4s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}


.sidebar-footer {
  margin-top: auto;
  font-size: 2rem;
  color: #b0b0b0;
  text-align: center;
}

.sidebar-footer p {
  margin-top: auto;
  font-size: 0.8rem;
  color: #919191;
  text-align: center;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.social-icons a {
  color: #b0b0b0;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #e9f5ff;
}



main {
  margin-left: calc(40vw + 1.5rem);
  padding: 4rem 4rem 8rem;
  background-color: #00182c;
  min-height: 100vh;
  color: #d9dfe4bc;
  padding-bottom: 0vh;
}



.hero {
  max-width: 600px;
  margin-bottom: 5rem;
}

.intro {
  font-family: 'Fira Code', monospace;
  font-weight: 400;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 2.25rem;
  font-weight: 400;
  margin-bottom: 2rem;
}

.hero-desc {
  font-size: 1.125rem;
  margin-bottom: 3rem;
  max-width: 600px;
  line-height: 1.5;
}



.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: transparent;
  color: #064663;
  border: 1px solid #064663;
}

.btn-primary:hover {
  background-color: #f0f0f0;
}

.btn-secondary {
  background-color: #c5c5c5;
  color: #3b3b3b;
}

.btn-secondary:hover {
  background-color: #01203a;
  color: #ebebeb;
}



.section {
  scroll-margin-top: 95px;
  margin-top: 6rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.25rem;
  color: #e9f5ff;
  max-width: max-content;
}

.section h2 i {
  margin-right: 2rem;
  color: #e9f5ff;
}



.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-card {
    background-color: #00182c;
    backdrop-filter: blur(0.8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.5rem 0rem;
    border-bottom: 1px solid #e9f5ff;
    color: #276db7;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1.5rem;
    cursor: default;
    transition: filter 0.3s ease, transform 0.3s ease;
  }
  
  .project-card.blur {
    filter: blur(0.8px);
  }
  
  .project-card:hover {
    filter: none;
  }

  @media (max-width: 768px) {
    .project-card.blur {
      filter: none !important;
    }
  
    .project-card {
      filter: none !important;
    }
  }

.project-card h3 {
  font-size: 1rem;
  font-weight: 200;
  color: #e9f5ff;
}

.project-card p {
  font-size: 0.85rem;
  color: #bcc5cdbc;
  line-height: 1.4;
  margin-bottom: 2rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: #d2d2d2;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-top: 20px;
  }
  
  .project-link .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
  }
  
  .project-link:hover {
    color: #e9f5ff;
  }
  
  .project-link:hover .arrow {
    transform: translateX(4px);
  }

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 0rem;
}

.tech-list li {
  font-size: 0.7rem;
  font-weight: 200;
  padding: 0.2rem 0.8rem;
  border-radius: 12px;
  color: #f3fffa;
  background-color: #3b6d72;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(6, 68, 99, 0.15);
}

.tech-list li:hover {
    background-color: #4890b4;
    color: #ffffff;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  }

  .view-all-link-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #e9f5ffc3;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
  }
  
  .view-all-link-item .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
  }
  
  .view-all-link-item:hover {
    color: #e9f5ff;
  }
  
  .view-all-link-item:hover .arrow {
    transform: translateX(4px);
  }

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}



.main-footer {
  display: none;
}

@media (max-width: 768px) {
  .main-footer {
    display: block;
    margin-top: 3rem;
    text-align: left;
    font-size: 0.9rem;
    color: #919191;
  }
}


.skills-roadmap {
    position: relative;
    margin: 4rem 0;
    padding-left: 2rem;
    border-left: 2px solid #224059;
  }
  

.roadmap-step {
    position: relative;
    padding-right: 40px;
    margin-bottom: 30px;
  }
 


.lock-icon {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    user-select: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23dddddd" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C9.79 2 8 3.79 8 6v4H6c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2h-2V6c0-2.21-1.79-4-4-4zm-2 4c0-1.1.9-2 2-2s2 .9 2 2v4H10V6zm8 6v8H6v-8h12z"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.95;
}

@media (max-width: 768px) {

    .roadmap-step .content h3 {
      display: inline-block;
      margin: 0;
    }
  

    .lock-icon {
      display: inline-block;
      position: static !important;
      width: 16px;
      height: 16px;
      margin-left: 6px;
      background-position: center;
      opacity: 0.95;
      pointer-events: none;
      user-select: none;
      vertical-align: middle;
      transform: translateY(-1.5px);
    }
  }
  
  .roadmap-step .dot {
    position: absolute;
    left: -11px;
    top: 4px;
    width: 14px;
    height: 14px;
    background-color: #7ab7bd;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 4px rgba(74, 172, 224, 0.2);
  }
  
  .roadmap-step .content {
    margin-left: 1rem;
  }
  
  .roadmap-step h3 {
    margin: 0;
    color: #e9f5ff;
    font-size: 1.1rem;
    font-weight: 500;
  }
  
  .roadmap-step p {
    margin: 0.5rem 0 0;
    color: #b3d7f0;
    font-size: 0.95rem;
  }

  .progress-bar {
    margin-top: 0.5rem;
    height: 8px;
    width: 100%;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
  }
  
  .progress {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3b6d72, #7ab7bd);
    border-radius: 6px 0 0 6px;
    transition: width 0.6s ease-in-out;
  }

  .roadmap-step.inactive {
    opacity: 0.5;
  }
  
  .roadmap-step.inactive .dot {
    background-color: #999;
    box-shadow: none;
    border: 2px solid #ccc;
  }



.highlight {
  color: #e9f5ff;
  font-weight: 500;
}



@media (max-width: 768px) {
  body {
    padding: 0;
    overflow-x: hidden;
  }

  * {
    max-width: 100%;
  }

  .sidebar {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 12px;
    overflow: visible;
    z-index: auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
  }

  main {
    margin-left: 0;
    margin-top: 0;
    padding: 1rem;
    box-sizing: border-box;
  }

  #top {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .nav-links {
    display: none;
  }

  .hero-title,
  .hero-subtitle,
  .hero-desc {
    text-align: left;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .social-icons {
    display: flex;
    justify-content: flex-start !important;
    gap: 1rem;
    padding-left: 0.5rem;
  }

  .social-icons a {
    font-size: 1.5rem !important;
    color: #276db7;
  }

  .sidebar-footer {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    padding-left: 0.5rem;
    flex-direction: row;
    color: #276db7;
  }

  .sidebar-footer p {
    display: none;
  }

  .sidebar .social-icons {
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    padding-top: 1rem;
  }

  .sidebar .social-icons a {
    display: block;
    font-size: 1.5rem !important;
    color: #b0b0b0;
    transition: color 0.3s ease;
  }

  .sidebar .social-icons a:hover {
    color: #e9f5ff;
  }
}

@media (min-width: 769px) {
  .nav-links {
    flex-direction: column;
    align-items: center;
  }
}


/* === MISC === */
i.fa-link {
  display: inline-block !important;
  font-size: 1em;
  visibility: visible;
}

.mouse-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155, 213, 255, 0.078) 0%, transparent 70%);
    pointer-events: none;
    mix-blend-mode: lighten;
    transform: translate(-50%, -50%);
    z-index: 9999;
    filter: blur(60px);
    transition: transform 0.05s ease-out;
  }


  #large-projects {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    margin-bottom: 15px;
  }
  
  .featured-project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
    position: relative;
  }
  
  .featured-project.reverse {
    direction: rtl;
  }
  
  .featured-project.reverse .project-info {
    direction: ltr;
  }
  
  .project-image {
    width: 100%;
    position: relative;
    margin-top: -30px;
  }
  
  .project-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
    display: block;
    height: auto;
  }
  
  .project-image img:hover {
    transform: scale(1.03);
  }
  
  .featured-project.locked .project-image img {
    filter: grayscale(100%) brightness(60%);
    pointer-events: none;
  }
  
  .lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
  }
  
  .lock-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    opacity: 0.9;
  }
  
  .coming-soon-text {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
  }
  
  .coming-soon-link {
    color: #7b7b7b;
    font-size: 0.9rem;
    cursor: default;
  }
  
  .project-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .project-label {
    font-size: 0.9rem;
    color: #e9f5ff;
    font-family: 'Fira Code', monospace;
  }
  
  .project-title {
    font-size: 1rem;
    font-weight: bold;
    color: rgba(240, 252, 255, 0.897);
  }
  
  .project-description {
    background: rgba(100, 224, 255, 0.053);
    padding: 1rem;
    border-radius: 5px;
    font-size: 0.95rem;
  }
  
  
  .project-links a {
    margin-right: 1rem;
    font-size: 0.9rem;
    color: #e9f5ffc3;
    text-decoration: none;
  }
  
  /* 📱 MOBILVY */
  @media (max-width: 768px) {
    .featured-project {
      grid-template-columns: 1fr;
    }
  
    .featured-project.reverse {
      direction: ltr;
    }
  
    .project-image {
        display: flex;
        justify-content: center;
      }
  
    .project-image img {
        width: 80%; /* Ändra till 70% om du vill ha ännu mindre */
        margin: 0 auto;
        display: block;
      }
    
  
    .lock-icon {
      width: 32px;
      height: 32px;
    }

    .lock-overlay {
        width: 80%;
        left: auto;
        right: auto;
      }
  
    .coming-soon-text {
      font-size: 0.9rem;
    }
  }