:root {
  color-scheme: dark;
  --bg: #08100f;
  --bg-deep: #050807;
  --panel: #101817;
  --panel-strong: #151f1d;
  --line: rgba(229, 238, 232, 0.14);
  --line-strong: rgba(154, 218, 196, 0.38);
  --text: #edf4ef;
  --muted: #a9b9b2;
  --soft: #71827b;
  --teal: #4cc4b0;
  --green: #9ce36e;
  --amber: #e6b45c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(180deg, rgba(8, 16, 15, 0.18), var(--bg-deep) 58%),
    radial-gradient(circle at 18% 8%, rgba(76, 196, 176, 0.14), transparent 24%),
    linear-gradient(135deg, #060a09 0%, #0a1211 42%, #07100f 100%);
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(156, 227, 110, 0.78);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 16px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid rgba(237, 244, 239, 0.08);
  background: rgba(5, 8, 7, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 760;
  color: var(--text);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(156, 227, 110, 0.28);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(76, 196, 176, 0.22), rgba(230, 180, 92, 0.12));
  color: #e9f7ed;
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  background: rgba(237, 244, 239, 0.07);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(237, 244, 239, 0.05);
  color: var(--text);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(520px, 78svh, 760px);
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -3;
  background-image: url("../images/morten-linder-it-infrastruktur-og.png");
  background-position: center;
  background-size: cover;
  filter: saturate(0.9) contrast(1.08);
  transform: scale(1.02);
}

.hero-overlay {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 8, 7, 0.96) 0%, rgba(5, 8, 7, 0.84) 38%, rgba(5, 8, 7, 0.38) 75%, rgba(5, 8, 7, 0.68) 100%),
    linear-gradient(180deg, rgba(5, 8, 7, 0.1), #050807 100%);
}

.hero-content,
.section-inner {
  width: min(var(--max), calc(100% - clamp(36px, 8vw, 88px)));
  margin-inline: auto;
}

.hero-content {
  max-width: 760px;
  margin-inline: clamp(18px, calc((100vw - var(--max)) / 2), 999px) auto;
  padding-block: 68px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 720px;
  font-size: clamp(3rem, 9vw, 6.8rem);
  font-weight: 840;
}

h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  font-weight: 800;
}

h3 {
  color: #f5faf6;
  font-size: 1.08rem;
  font-weight: 760;
}

.hero-subtitle {
  max-width: 760px;
  margin: 20px 0 0;
  color: #f3f8f4;
  font-size: clamp(1.28rem, 2.5vw, 2rem);
  line-height: 1.22;
  font-weight: 710;
}

.hero-body {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button,
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 780;
  line-height: 1.2;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.contact-link:hover {
  transform: translateY(-1px);
}

.button-primary {
  border: 1px solid rgba(156, 227, 110, 0.58);
  background: #d7f6bb;
  color: #06100c;
}

.button-secondary,
.contact-link {
  border: 1px solid var(--line-strong);
  background: rgba(237, 244, 239, 0.06);
  color: var(--text);
}

.section {
  padding: clamp(64px, 9vw, 112px) 0;
  border-top: 1px solid rgba(237, 244, 239, 0.07);
  background: var(--bg);
}

.section-muted {
  background: #0b1412;
}

.section-profile {
  background: linear-gradient(180deg, #050807 0%, var(--bg) 100%);
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 32px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: start;
}

.copy-block {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
}

.copy-block p {
  margin: 0;
}

.copy-block p + p {
  margin-top: 20px;
}

.card-grid {
  display: grid;
  gap: 16px;
}

.card-grid-focus {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.experience-card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(237, 244, 239, 0.055), rgba(237, 244, 239, 0.025));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
}

.info-card {
  border-top-color: rgba(76, 196, 176, 0.44);
}

.info-card-feature {
  grid-column: span 2;
  border-top-color: rgba(156, 227, 110, 0.5);
  background:
    linear-gradient(135deg, rgba(156, 227, 110, 0.105), transparent 54%),
    linear-gradient(180deg, rgba(237, 244, 239, 0.065), rgba(237, 244, 239, 0.025));
}

.experience-card {
  min-height: 190px;
  border-top-color: rgba(230, 180, 92, 0.42);
  background: rgba(237, 244, 239, 0.045);
}

.info-card p,
.experience-card p {
  margin: 14px 0 0;
  color: var(--muted);
}

.competency-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.competency-list li {
  position: relative;
  min-height: 58px;
  padding: 14px 16px 14px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(237, 244, 239, 0.04);
  color: #dce7e0;
  font-weight: 650;
}

.competency-list li::before {
  position: absolute;
  top: 20px;
  left: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(76, 196, 176, 0.13);
  content: "";
}

.section-projects {
  background:
    linear-gradient(135deg, rgba(76, 196, 176, 0.09), transparent 42%),
    #070d0c;
}

.section-projects h2,
.section-friends h2 {
  color: #d9e5df;
}

.section-projects .copy-block,
.section-friends .copy-block {
  color: #93a49c;
}

.project-intro {
  margin-bottom: 32px;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(76, 196, 176, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(237, 244, 239, 0.06), rgba(237, 244, 239, 0.028)),
    rgba(8, 16, 15, 0.72);
  color: #9fb0a8;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(156, 227, 110, 0.38);
  background:
    linear-gradient(180deg, rgba(237, 244, 239, 0.082), rgba(237, 244, 239, 0.035)),
    rgba(8, 16, 15, 0.86);
  color: #edf4ef;
}

.project-card-title {
  color: #f2faf5;
  font-size: 1.03rem;
  font-weight: 800;
  line-height: 1.18;
}

.section-friends {
  background: #060b0a;
}

.friend-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 880px;
}

.friend-card {
  min-height: 132px;
  border-color: rgba(237, 244, 239, 0.11);
  background: rgba(237, 244, 239, 0.025);
  color: #8d9d96;
}

.friend-card .project-card-title {
  color: #d4e0da;
}

.section-contact {
  background:
    linear-gradient(135deg, rgba(76, 196, 176, 0.12), transparent 42%),
    linear-gradient(180deg, #0b1412 0%, #050807 100%);
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(156, 227, 110, 0.2);
  border-radius: 8px;
  background: rgba(237, 244, 239, 0.045);
  box-shadow: var(--shadow);
}

.contact-panel p {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.contact-actions {
  justify-content: flex-start;
  margin: 0;
}

.contact-link {
  width: 100%;
}

.site-footer {
  padding: 28px clamp(18px, 4vw, 44px);
  border-top: 1px solid rgba(237, 244, 239, 0.08);
  background: #050807;
  color: var(--soft);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: clamp(18px, 4vw, 44px);
    left: clamp(18px, 4vw, 44px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(5, 8, 7, 0.96);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    justify-content: flex-start;
  }

  .split,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .card-grid-focus,
  .card-grid-four,
  .project-card-grid,
  .friend-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-card-feature {
    grid-column: auto;
  }

  .competency-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 66px;
  }

  .brand span:last-child {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    min-height: clamp(540px, 82svh, 660px);
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(5, 8, 7, 0.97) 0%, rgba(5, 8, 7, 0.88) 70%, rgba(5, 8, 7, 0.7) 100%),
      linear-gradient(180deg, rgba(5, 8, 7, 0.12), #050807 100%);
  }

  .hero-content,
  .section-inner {
    width: min(100% - 32px, var(--max));
  }

  .hero-content {
    padding-block: 48px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .card-grid-focus,
  .card-grid-four,
  .project-card-grid,
  .friend-card-grid {
    grid-template-columns: 1fr;
  }

  .info-card,
  .experience-card {
    min-height: auto;
  }

  .contact-panel {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
