:root {
  --background: #f6f2ec;
  --card: #fffaf3;
  --text: #191716;
  --muted: #706a64;
  --line: #ded6cc;
  --accent: #a65f45;
  --accent-dark: #754231;
}

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

html {
  scroll-behavior: smooth;
}

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

img {
  display: block;
  max-width: 100%;
}

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

.container {
  width: min(1100px, 90%);
  margin: 0 auto;
}

/* Header */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 242, 236, 0.95);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */

.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 5rem;
}

.hero-text-content {
  max-width: 760px;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
}

.internship-info {
  max-width: 620px;
  margin-bottom: 2rem;
}

.internship-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.internship-info p {
  margin: 0;
  padding-bottom: 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.small-title {
  margin-bottom: 1rem;
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  margin-bottom: 0.8rem;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-weight: 600;
}

.button:hover {
  background: var(--accent-dark);
}

.hero-buttons .button {
  width: 190px;
  text-align: center;
}

/* Sektioner */

.section {
  padding: 6rem 0;
  border-top: 1px solid var(--line);
}

.about {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 5rem;
}

.about p:not(.small-title) {
  max-width: 600px;
  margin-bottom: 1rem;
  color: var(--muted);
}

/* Kompetencer */

.skills {
  align-self: start;
  margin-top: 3.6rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.skill-list span {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
}

/* Projekter */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

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

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}

.project-content p {
  color: var(--muted);
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1.4rem;
}

.project-links a {
  color: var(--accent-dark);
  font-weight: 600;
  white-space: nowrap;
}

.project-links a:hover {
  text-decoration: underline;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tags span {
  padding: 0.35rem 0.65rem;
  background: var(--background);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Kontakt */

.contact-section {
  background: #efe6dc;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact p:not(.small-title) {
  max-width: 500px;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-links a {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.contact-links a:hover {
  color: var(--accent-dark);
}

/* Footer */

.footer {
  padding: 2rem 0;
  background: #efe6dc;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Til toppen-knap */

#scrollTopBtn {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 1000;
  display: none;
  width: 46px;
  height: 46px;
  background: #aaa5a0;
  color: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

#scrollTopBtn.visible {
  display: block;
}

#scrollTopBtn:hover {
  background: #8f8a85;
}

/* Mobil */

@media (max-width: 768px) {
  /* Navigation */

  .menu-button {
    display: block;
    color: var(--text);
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 1rem 5%;
    border-bottom: 1px solid var(--line);
  }

  /* Hero */

  .hero {
    min-height: 70vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  h1 {
    font-size: 2.4rem;
  }

  .hero-buttons {
    gap: 0.8rem;
  }

  .hero-buttons .button {
    width: auto;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }

  .hero-image {
    justify-content: flex-start;
  }

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

  /* Sektioner */

  .section {
    padding: 4rem 0;
  }

  /* Om mig */

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

  .skills {
    margin-top: 0;
  }

  /* Projekter */

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

  .project-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }

  .project-content {
    padding: 1.2rem;
  }

  .project-links {
    flex-wrap: wrap;
    gap: 1rem;
  }

  /* Kontakt */

  .contact {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}
