@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins/poppins-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins/poppins-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins/poppins-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins/poppins-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/fonts/lexend/lexend-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/fonts/lexend/lexend-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/fonts/lexend/lexend-semiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/fonts/lexend/lexend-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #1f3b4d;
  --secondary: #5eaee0;
  --white: #f1f1f1;
  --dark: #1a1a1a;
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--primary);
}

h1,
h2,
h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

body,
p,
li {
    font-family: 'Lexend', sans-serif;
    font-weight: 400;
}

#toTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    background-color: var(--secondary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 35px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#toTop:hover {
    background-color: #3079a7;
    transform: scale(1.1);
}

/*------------*/
/* Navigation */
/*------------*/

/* Mobil - 480px */
@media only screen and (min-width: 0rem) {
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--primary);
    box-shadow: none;
  }
  .logo img {
    height: 80px;
    width: 130px;
  }
  .nav-links {
    position: absolute;
    top: 12%;
    right: 0;
    background: transparent;
    flex-direction: column;
    width: 100%;
    text-align: center;
    margin: 0 auto;
    padding: 20px;
    display: none;
    list-style: none;
    transition: 0.5s ease-in-out;
    box-shadow: none;
  }
  .nav-links li {
    margin-bottom: 10px;
  }
  .nav-links li a {
    position: relative;
    text-decoration: none;
    color: var(--white);
    transition: color 0.3s ease;
  }
  .nav-links li a::after {
    content: "";
    position: absolute;
    left: 10%;
    bottom: -4px;
    width: 80%;
    height: 2px;
    background-color: var(--white);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
  }
  .nav-links li a:hover {
    color: #e0e0e0;
  }
  .nav-links li a:hover::after {
    transform: scaleX(1);
  }
  .nav-links.active {
    display: flex;
    background: var(--primary);

  }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 1.5rem;
    cursor: pointer;
  }
  .hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: 0.3s;
  }
  .hamburger.toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.toggle span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

@media only screen and (min-width: 48rem) {
  .nav-links {
    top: 8%;
  }
}

/* Dekstop - 1024px */
@media only screen and (min-width: 64.1rem) {
  header {
    padding: 0 3rem;
  }
  .logo img {
    height: 120px;
    width: 200px;
  }
  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    box-shadow: none;
    width: auto;
    padding: 0;
  }
  .nav-links li {
    margin: 0 20px;
  }
  .nav-links li a {
    font-size: 1.1rem;
  }
  .hamburger {
    display: none;
  }
}

/*--------------*/
/*    Om mig    */
/*--------------*/

/* Mobil - 480px */
@media only screen and (min-width: 0rem){
  .about {
    padding: 4rem 2rem;
    background: var(--white);
  }
  .about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
  }
  .about-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }
  .about-text {
    text-align: left;
  }
  .about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--dark);
  }
  .about-text p {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
  }
}

/* Tablet - 768px */
@media only screen and (min-width: 47.99rem) {
  .about-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .about-image img {
    width: 300px;
    height: 300px;
  }
  .about-text {
    flex: 1;
    padding-left: 2rem;
  }
}

/* Dekstop - 1024px */
@media only screen and (min-width: 63.99rem) {
  .about {
    padding: 8rem 2rem;
  }
  .about-text h2 {
    font-size: 2.5rem;
  }
  .about-text p {
    font-size: 1.1rem;
    text-align: center;
  }
}

/*---------------------*/
/*     Färdigheter     */
/*---------------------*/

/* Mobil - 480px */
@media only screen and (min-width: 0rem) {
  .skills {
    padding: 4rem 1rem;
  }
  .skills-header {
    max-width: 1000px;
    margin: 0 auto 3rem;
    text-align: center;
  }
  .skills-header h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 0.5rem;
  }
  .skills-header p {
    color: var(--white);
    font-size: 1rem;
  }
  .skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  .skill-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .skill-icon {
    margin-bottom: 1rem;
  }
  .skill-icon img {
    width: 48px;
    height: 48px;
  }
  .skill-card h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
  }
  .skill-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
  }
}

/* Tablet - 768px */
@media only screen and (min-width: 47.99rem) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop - 1024px */
@media only screen and (min-width: 63.99rem) {
  .skills-header h2 {
    font-size: 2.5rem;
  }
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/*-------------------*/
/*     Portfolio     */
/*-------------------*/
@media only screen and (min-width: 0rem) {
  .portfolio {
    padding: 5rem 2rem;
    background: var(--white);
  }
  .portfolio-header {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
  }
  .portfolio-header h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
  }
  .portfolio-header p {
    font-size: 1rem;
    color: #555;
  }
  .portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  .portfolio-item {
    background: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
  }
  .portfolio-image-link {
    display: block;
  }
  .portfolio-main-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
  }
  .portfolio-item:hover .portfolio-main-image {
    transform: scale(1.05);
  }
  .portfolio-content {
    padding: 1.5rem;
    text-align: center;
  }
  .portfolio-content h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
  }
  .portfolio-content p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.5;
    text-align: left;
  }
  .portfolio-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .portfolio-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .portfolio-tech img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }
  .btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--dark);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: background 0.3s ease;
  }
  .btn:hover {
    background: #565656;
  }
}

/* Tablet - 768px */
@media only screen and (min-width: 47.99rem) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-main-image {
    height: 250px;
  }
}

/* Desktop - 1024px */
@media only screen and (min-width: 63.99rem) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1300px;
  }
  .portfolio-header h2 {
    font-size: 2.5rem;
  }
  .portfolio-content p {
    text-align: center;
  }
  .portfolio-main-image {
    height: 300px;
  }
}

/*-------------------*/
/*       Footer      */
/*-------------------*/

/* Mobil - 480px */
@media only screen and (min-width: 0rem) {
  .footer {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 2rem 1rem;
  }
  .footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
  }
  .footer-info h3,
  .footer-links h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }
  .footer-info p,
  .footer-info a {
    color: var(--white);
    font-size: 1rem;
    margin: 0.2rem 0;
    text-decoration: none;
  }
  .footer-info a:hover {
    color: #bebebe;
  }
  .social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
  }
  .social-icons img {
    width: 45px;
    height: 45px;
    transition: transform 0.3s ease;
  }
  .social-icons a:hover img {
    transform: scale(1.1);
  }
  .footer-bottom {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
  }
  .footer-bottom p {
    font-size: 0.9rem;
    color: var(--white);
  }
}

/* Tablet & Desktop */
@media only screen and (min-width: 47.99rem) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}