/* styles.css */
:root {
  --primary-color: #00ccff; /* Neonblå */
  --secondary-color: #0099ff; /* Ljusblå */
  --accent-color: #6600ff; /* Djuplila/blå accent */
  --text-color: #ffffff; /* Vit text för kontrast */
  --light-color: #040438; /* Mörk marinblå */
  --background-color: #0f1b40; /* Mörk blå bakgrund */
  --section-padding: 5rem 0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(
    15,
    27,
    64,
    0.95
  ); /* Mörkare bakgrund som matchar --background-color */
  box-shadow: 0 2px 10px rgba(0, 204, 255, 0.2); /* Neonblå skugga */
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  height: 70px;
  width: auto;
  display: block;
  padding: 5px;
  background-color: var(--light-color);
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 204, 255, 0.3); /* Neonblå skugga */
  margin-right: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  margin-left: auto;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
  text-shadow: 0 0 8px var(--primary-color); /* Neonglöd vid hover */
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  transition: width 0.3s ease;
  box-shadow: 0 0 5px var(--primary-color); /* Neonglöd för understreck */
}

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

.burger {
  display: none;
  cursor: pointer;
}

.burger div {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--primary-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(
    135deg,
    #040438 0%,
    #0f1b40 100%
  ); /* Gradient som passar temat */
  padding-top: 80px;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-content {
  flex: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.highlight {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px rgba(0, 204, 255, 0.5); /* Neonglöd för texten */
}

.subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: #a9a9ff; /* Lighter color instead of #666 */
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-icons a {
  color: var(--text-color);
  font-size: 2rem;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
  text-shadow: 0 0 10px var(--primary-color); /* Neonglöd för social ikoner */
}

.hero-image {
  flex: 1;
}

.hero-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Section Styles */
section {
  padding: var(--section-padding);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
}

/* About Section */
.about {
  background-color: #081233; /* Lite ljusare än huvudbakgrunden men fortfarande mörk */
}

.about-content {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-color); /* Ensure this is white for good contrast */
}

.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.interest-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #0d1940; /* Mörkblå bakgrund för kort */
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 204, 255, 0.15); /* Subtil neonblå skugga */
  transition: transform 0.3s ease;
  position: relative; /* För att positionera hover-bilden */
}

.interest-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 204, 255, 0.3); /* Starkare neonblå skugga vid hover */
}

.hover-image {
  position: absolute;
  display: none;
  z-index: 100;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.5);
  border: 2px solid var(--primary-color);
}

.hover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.interest-item:hover .hover-image {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

.interest-item i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Projects Section */
.projects {
  background-color: #0a1530; /* Gradvis variation av den mörka bakgrunden */
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #0d1940; /* Mörkblå bakgrund för kort */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 204, 255, 0.15); /* Subtil neonblå skugga */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 204, 255, 0.3); /* Starkare neonblå skugga vid hover */
}

.project-card img {
  width: 20%;
  height: auto;
  margin: 1.5rem auto;
  display: block;
}

.project-card h3 {
  font-size: 1.5rem;
  padding: 1.5rem 1.5rem 0.5rem;
}

.project-card p {
  flex-grow: 1;
  padding: 0 1.5rem 1.5rem;
  color: #b3b3ff; /* Lighter color instead of #666 for better contrast */
}

.project-links {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem 1.5rem;
}

.btn {
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: var(--light-color);
  text-decoration: none;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.5); /* Neonglöd för knappar */
}

.btn:hover {
  background-color: var(--secondary-color);
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.8); /* Förstärkt neonglöd vid hover */
}

/* Technologies Section */
.technologies {
  background-color: #081233; /* Matchar about-sektionen för konsekvens */
}

.tech-intro {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 3rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.tech-item {
  background-color: #0d1940; /* Mörkblå bakgrund för kort */
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 204, 255, 0.15); /* Subtil neonblå skugga */
  transition: transform 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 204, 255, 0.3); /* Starkare neonblå skugga vid hover */
}

.tech-item i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.tech-item h3 {
  margin-bottom: 0.5rem;
}

.tech-item p {
  color: #b3b3ff; /* Better contrast than #666 */
}

/* Footer */
.footer {
  background-color: #030326; /* Mörkast av alla, nästan svart men med blå ton */
  color: var(--text-color);
  padding: 2rem 0;
  text-align: center;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .nav-links {
    position: absolute;
    right: 0;
    height: 92vh;
    top: 8vh;
    background: rgba(15, 27, 64, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50%;
    transform: translateX(100%);
    transition: transform 0.5s ease-in;
    z-index: 999;
  }

  .nav-links li {
    opacity: 0;
  }

  .burger {
    display: block;
  }

  .nav-active {
    transform: translateX(0%);
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-image {
    margin-top: 2rem;
    order: 2;
  }

  .social-icons {
    justify-content: center;
  }

  .about-content {
    flex-direction: column;
  }

  .about-image {
    margin-top: 2rem;
    width: 100%;
  }

  .hero-image img {
    max-width: 250px;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .hero-image img {
    max-width: 200px;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation for scroll reveal */
.revealed {
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation for mobile nav */
@keyframes navLinkFade {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toggle .line1 {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
  opacity: 0;
}

.toggle .line3 {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Contact Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  overflow: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.modal-content {
  position: relative;
  background-color: var(--light-color);
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  padding: 2rem;
  box-shadow: 0 0 20px rgba(0, 204, 255, 0.3);
  border: 1px solid var(--primary-color);
  transform: scale(0.8);
  transition: transform 0.3s ease;
  margin: 50px auto;
}

.modal.show .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--accent-color);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid rgba(0, 204, 255, 0.3);
  border-radius: 4px;
  background-color: rgba(15, 27, 64, 0.9);
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.2);
}

.submit-btn {
  background: linear-gradient(
    45deg,
    var(--secondary-color),
    var(--primary-color)
  );
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-block;
  text-align: center;
}

.submit-btn:hover {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 204, 255, 0.3);
}

#form-status {
  padding: 0.8rem 0;
  font-weight: 500;
  text-align: center;
}

.status-success {
  color: #4caf50;
}

.status-error {
  color: #ff5252;
}

/* Portfolio link styling */
.portfolio-link {
  background-color: var(--neon-blue);
  color: var(--dark-blue) !important;
  border-radius: 4px;
  padding: 6px 12px !important;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.portfolio-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 8px var(--neon-blue);
}

.portfolio-link i {
  font-size: 0.8em;
}

/* Portfolio service card */
.portfolio-service-card {
  background: linear-gradient(
    135deg,
    rgba(8, 102, 156, 0.05) 0%,
    rgba(0, 149, 238, 0.2) 100%
  );
  border: 1px solid var(--neon-blue);
  border-radius: 10px;
  padding: 25px;
  margin: 30px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.portfolio-service-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--neon-blue);
  opacity: 0.1;
  border-radius: 0 0 0 100%;
}

.portfolio-service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-content h3 {
  color: var(--neon-blue);
  margin-bottom: 15px;
}

.service-content p {
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.service-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--neon-blue);
  color: var(--dark-blue);
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.service-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px var(--neon-blue);
}

/* Portfolio link styling */
.portfolio-link {
  background-color: var(--neon-blue);
  color: var(--dark-blue) !important;
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-left: 8px;
}

.portfolio-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 8px var(--neon-blue);
}

/* Portfolio service card styling */
.portfolio-service-card {
  background: linear-gradient(
    135deg,
    rgba(18, 24, 38, 0.8),
    rgba(15, 33, 75, 0.95)
  );
  border: 1px solid var(--neon-blue);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  padding: 2rem;
  margin: 2rem 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 10px rgba(66, 220, 255, 0.2);
}

.service-content {
  text-align: center;
}

.service-content h3 {
  color: var(--neon-blue);
  margin-bottom: 1rem;
}

.service-btn {
  background: var(--primary-color);
  color: var(--light-color);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  margin-top: 1rem;
  display: inline-block;
  transition: all 0.3s ease;
}

.service-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(66, 220, 255, 0.5);
}

.service-btn i {
  margin-left: 8px;
}

/* Privacy Policy Consent Styling */
.privacy-consent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.privacy-consent input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}

.privacy-consent label {
  margin: 0;
  display: inline;
}

/* Privacy Policy Page Styling */
.privacy-policy {
  padding-top: 120px;
  background-color: #081233;
  min-height: 100vh;
}

.policy-content {
  background-color: #0d1940;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 204, 255, 0.15);
  margin-bottom: 3rem;
}

.policy-content section {
  margin-bottom: 2rem;
}

.policy-content h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.policy-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-content a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s;
}

.policy-content a:hover {
  text-shadow: 0 0 8px var(--primary-color);
}
