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

body {
  font-family: 'Urbanist', sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%);
  color: #fff;
  line-height: 1.6;
}

html, body {
  background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%);
  color: #fff;
  line-height: 1.6;
  min-height: 100%;
}

:root {
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}
body {
  padding-top: max(var(--safe-top), 0px);
  padding-bottom: max(var(--safe-bottom), 0px);
}


/* Nav */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, .95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid #ffffff20;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 1.5rem;
  gap: 3rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: color .3s ease, opacity .3s ease;
  position: relative;
  padding: .5rem 0;
  opacity: .7;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width .3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a.active {
  opacity: 1;
  color: #8ecfff;
  font-weight: 600;
}

nav a.active::after {
  width: 100%;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, .03) 0%, transparent 70%);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  z-index: 1;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid #fff;
  margin: 0 auto 2rem;
  object-fit: cover;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: #666;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.subtitle {
  font-size: 1.5rem;
  color: #ccc;
  margin-bottom: 2rem;
}

/* Sections */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #fff;
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text {
  background: #1a1a1a;
  padding: 2rem;
  border-left: 3px solid #fff;
  font-size: 1.1rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: #1a1a1a;
  padding: 2rem;
  border: 1px solid #ffffff30;
  transition: transform .3s ease, border-color .3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: #fff;
}

.skill-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.skill-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  transition: transform .3s ease, filter .4s ease;
  filter: drop-shadow(0 0 0 transparent);
}

.skill-card:hover .skill-icon {
  transform: scale(1.15);
}

.skill-card.ai:hover .skill-icon {
  filter: drop-shadow(0 0 15px #FF9A00) drop-shadow(0 0 40px #FF9A00);
}

.skill-card.ps:hover .skill-icon {
  filter: drop-shadow(0 0 15px #31A8FF) drop-shadow(0 0 40px #31A8FF);
}

.skill-card.figma:hover .skill-icon {
  filter: drop-shadow(0 0 15px #A259FF) drop-shadow(0 0 40px #A259FF);
}

.skill-card.vscode:hover .skill-icon {
  filter: drop-shadow(0 0 15px #007ACC) drop-shadow(0 0 40px #007ACC);
}

/* Projects */
.projects-grid {
  display: grid;
  gap: 3rem;
}

.project-card {
  background: #1a1a1a;
  border: 1px solid #ffffff30;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: scale(1.02);
  border-color: #fff;
}

.project-image {
  width: 100%;
  height: 300px;
  border-bottom: 1px solid #ffffff30;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  background: #0a0a0a center/cover no-repeat;
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.project-content p {
  color: #ccc;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.project-tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.tag {
  padding: .5rem 1rem;
  background: #0a0a0a;
  border: 1px solid #ffffff50;
  font-size: .9rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
  overflow-y: auto;
}

.modal[aria-hidden="false"] {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  background: #111;
  color: #fff;
  max-width: 900px;
  margin: 5vh auto;
  border: 1px solid #ffffff30;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  max-height: 90vh;
  overflow: auto;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 1.6rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s;
}

.modal-close:hover {
  opacity: 1;
}

.modal-header h2 {
  font-size: 2rem;
  margin-bottom: .4rem;
}

.modal-subtitle {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 1.4rem;
}

.modal-gallery {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-gallery img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #000;
  border: 1px solid #ffffff30;
  border-radius: 8px;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, .4);
  cursor: pointer;
  font-size: 2rem;
  transition: background .2s ease;
}

.modal-nav:hover {
  background: rgba(0, 0, 0, .6);
}

#prevImg {
  left: 10px;
}

#nextImg {
  right: 10px;
}

.modal-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-thumbs img {
  width: 80px;
  height: 55px;
  object-fit: cover;
  border: 1px solid #ffffff30;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s, border-color .2s;
}

.modal-thumbs img.active,
.modal-thumbs img:hover {
  opacity: 1;
  border-color: #fff;
}

.modal-text {
  margin-top: 1.5rem;
  line-height: 1.6;
}

.modal-text ul {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.modal-text li {
  margin-bottom: .5rem;
}

.body-lock {
  overflow: hidden;
}

/* Contact */
.contact-content {
  text-align: center;
  background: #1a1a1a;
  padding: 4rem;
  border: 1px solid #ffffff30;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-width: 120px;
}

.contact-item a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  transition: opacity .3s ease;
}

.contact-item a:hover {
  opacity: .7;
}

.icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.github img,
.linkedin img {
  width: 50px;
  height: 50px;
  filter: brightness(0) invert(1); /* gör dem vita */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ==== Kontaktikoner (mail & telefon) ==== */
.icon img {
  width: 50px;
  height: 50px;
  filter: brightness(0) invert(1); /* gör dem vita om de är svarta SVG:er */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.github img:hover,
.linkedin img:hover,
.icon img:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

/* Se till att alla kontaktikoner har samma stil */
.linkedin img,
.github img,
.icon img {
  width: 50px;
  height: 50px;
  display: block;
}


/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: #0a0a0a;
  border-top: 1px solid #ffffff20;
  color: #666;
}

.modal-link a {
  color: #8eff8e;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.modal-link a:hover {
  color: #b3ffb3;
  border-color: #b3ffb3;
}

/* Scroll-in animations */
.scroll-animation {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.scroll-animation.animate-in {
  opacity: 1;
  transform: translateY(0);
}

#prevImg-studentquiz {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

#nextImg-studentquiz {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

#prevImg-transit {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

#nextImg-transit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
/* Skill level meter (hover-fill) */
.skill-card {
  position: relative;
}

.skill-meter {
  margin-top: 1.2rem;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #ffffff20;
  overflow: hidden;
}

.skill-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent, #8ecfff);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
  transition: width 600ms cubic-bezier(.2,.8,.2,1);
}

/* Trigga på hover + keyboard (tab) */
.skill-card:hover .skill-fill,
.skill-card:focus .skill-fill,
.skill-card:focus-visible .skill-fill {
  width: var(--level, 0%);
}

/* Liten nivåtext som passar din typografi */
.skill-level-text {
  display: inline-block;
  margin-top: .5rem;
  font-size: .95rem;
  color: #ccc;
  opacity: .9;
}

/* Snygg fokusmarkering (för keyboard) */
.skill-card:focus-visible {
  outline: 2px solid rgba(142, 207, 255, 0.5);
  outline-offset: 3px;
}

.value-prop{
  padding-top: 0;
}

.value-grid{
  margin-top: 2rem;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.value-card{
  background: #1a1a1a;
  border: 1px solid #ffffff30;
  padding: 1.6rem;
  transition: transform .3s ease, border-color .3s ease;
}

.value-card:hover{
  transform: translateY(-5px);
  border-color: #fff;
}

.value-card h3{
  margin-bottom: .6rem;
  font-size: 1.2rem;
}

.value-card p{
  color:#ccc;
  font-size: 1.05rem;
}

/* ===== Project insight box ===== */
.project-insight{
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  background: #0a0a0a;
  border: 1px solid #ffffff30;
}

.project-insight strong{
  display:inline-block;
  margin-bottom: .4rem;
}

.project-insight p{
  color:#ccc;
  margin: 0;
}


/* Respektera users som vill minska animation */
@media (prefers-reduced-motion: reduce) {
  .skill-fill {
    transition: none;
  }
}



/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  nav ul {
    gap: 1.5rem;
    font-size: .9rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  section {
    padding: 4rem 1.5rem;
  }
}