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

/* Färgtema */
:root {
  --black: #000000;
  --navy: #003366; /* marinblå */
  --white: #ffffff;
  --accent: #f0f4f8; /* ljus accentfärg */
  --accent-dark: #002244;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--white);
  color: var(--black);
}

header {
  background-color: var(--navy);
  color: var(--white);
  padding: 0 1rem;
  height: 80px;
  line-height: 80px;
  text-align: center;
  font-weight: 700;
  font-size: 2.5rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  width: 100%;
  position: relative;
  transition: box-shadow 0.3s ease;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

nav {
  background-color: #001f4d; /* Mörkare marinblå för bättre kontrast */
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.75rem 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25); /* lite mörkare skugga */
  width: 100%;
  position: relative;
  transition: box-shadow 0.3s ease;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 1.1rem;
}

nav a {
  color: #ffffff; /* Vit text för bättre läsbarhet */
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav a.active,
nav a:hover {
  background-color: #f0f4f8; /* Ljus accentfärg */
  color: #001f4d; /* Samma mörkare marinblå som bakgrund */
  box-shadow: 0 4px 10px rgba(0, 31, 77, 0.4);
}
main {
  flex: 1 0 auto;
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem 2rem;
  line-height: 1.6;
}

main section p {
  border: 3px solid var(--navy);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  background-color: var(--accent);
  max-width: 700px;
  margin: 0 auto 2rem auto;
  font-size: 1.1rem;
  line-height: 1.7;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  color: var(--navy);
}

footer {
  background-color: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

footer a:hover {
  text-decoration: underline;
}

.paolo-img {
  width: 100%;
  max-width: 635px;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  object-fit: cover;
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 1rem;
  }

  header {
    font-size: 2rem;
    height: 60px;
    line-height: 60px;
  }

  main {
    padding: 1rem;
    padding-top: 110px;
    margin: 0 auto;
    max-width: 95%;
  }

  .paolo-img {
    max-width: 100%;
    height: auto;
  }

  #main-nav.sticky {
    top: 60px;
  }
}

.sticky {
  position: fixed;
  width: 100%;
  left: 0;
  z-index: 999;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

#main-header.sticky {
  top: 0;
}

#main-nav.sticky {
  top: 80px;
}

.tech-section,
.project-section {
  background-color: var(--accent);
  margin: 2rem auto;
  max-width: 800px;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 51, 102, 0.15);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  color: var(--navy);
}

.tech-section h2,
.project-section h2 {
  flex-basis: 100%;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.tech-section p,
.project-section p {
  flex: 1 1 300px;
  font-size: 1rem;
  line-height: 1.5;
}

.tech-section img,
.project-section img {
  flex: 1 1 300px;
  max-width: 300px;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0, 51, 102, 0.2);
  object-fit: cover;
}

@media (max-width: 700px) {
  .tech-section,
  .project-section {
    flex-direction: column;
  }

  .tech-section p,
  .tech-section img,
  .project-section p,
  .project-section img {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* Kontakt */
.kontakt {
  margin-top: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.kontakt table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--white);
  box-shadow: 0 6px 15px rgba(0, 51, 102, 0.15);
  border-radius: 8px;
  overflow: hidden;
}

.kontakt th,
.kontakt td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
  color: var(--navy);
}

.kontakt th {
  background-color: var(--navy);
  color: var(--white);
  width: 35%;
}

.kontakt tr:last-child td {
  border-bottom: none;
}

.kontakt a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

.kontakt a:hover {
  text-decoration: underline;
}

/* Social ikoner före kontaktuppgifter på Om-sidan */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.social-icons a {
  display: inline-block;
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(0.2);
  transition: filter 0.3s ease;
}

.social-icons a:hover {
  filter: brightness(0) invert(1);
}

.social-icons svg {
  width: 100%;
  height: 100%;
  fill: var(--navy);
}
