/* FÆLLES DESIGN: Farver, skrifttyper og størrelser står direkte ved reglerne.
Procentbredder, max-width og media queries sørger stadig for mobiltilpasning. */
/* === 1. GRUNDSTIL OG TILGÆNGELIGHED === */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: #f8f6f1;
  color: #242620;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}
h1, h2, h3, p {
  margin: 0;
}
h1, h2, h3 {
  overflow-wrap: break-word;
  line-height: 1.1;
  font-weight: 500;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
button {
  font: inherit;
  cursor: pointer;
}
img {
  display: block;
  width: 100%;
  height: auto;
}
a:focus-visible, button:focus-visible, video:focus-visible, audio:focus-visible, iframe:focus-visible {
  outline: 3px solid #b94325;
  outline-offset: 6px;
}
[hidden] {
  display: none !important;
}
.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
.section-space {
  padding-block: 90px;
}
/* Kursiv overskriftstekst, fx "Creativity" på forsiden. */
.italic-heading {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: normal;
}
/* Lille overtitel over en sektions overskrift, fx "A little about me". */
.section-label {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .20em;
  line-height: 1.7;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  padding: 10px 20px;
  background: #242620;
  color: white;
  z-index: 10;
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: translateY(0);
}

/* === 2. NAVIGATION: Mobil først. JS viser menuknappen. === */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 90px;
  border-bottom: 1px solid #d9d9cf;
}
.logo {
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: -.08em;
}
.logo span {
  color: #b92525;
  display: inline-block;
  margin-left: 8px;
}
.menu-button {
  border: 1px solid #d9d9cf;
  background: transparent;
  padding: 8px 14px;
  border-radius: 30px;
}
.site-header nav {
  display: flex;
  gap: 22px;
  width: 100%;
  padding: 16px 0;
  flex-wrap: wrap;
}
.site-header nav a {
  font-size: .9rem;
  text-decoration: none;
  padding-block: 6px;
}
.site-header nav a:hover, .site-header nav a:active {
  color: #b92525;
}

/* === 3. FORSIDENS STORE OVERSKRIFT OG INTROTEKST === */
.hero {
  padding-block: 55px 50px;
}
h1 {
  font-size: clamp(2.7rem, 7.3vw, 6.25rem);
  letter-spacing: -.055em;
  margin-block: 26px 30px;
}
h1 .italic-heading {
  color: #b92525;
}
.hero p {
  max-width: 500px;
  color: #424340;
  font-size: .95rem;
}

/* === 4. SHOWREEL === */
.showreel .section-label {
  font-size: .9rem;
  margin-bottom: 14px;
}
.showreel-video {
  display: block;
  width: 100%;
  height: auto;
  background: #252b24;
  aspect-ratio: 16 / 9;
}

.showreel-description {
  max-width: 650px;
  margin-top: 14px;
  color: #424340;
}

/* === 5. SEKTIONSOVERSKRIFTER OG FORSIDENS PROJEKTKORT === */
h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -.045em;
}
.section-heading {
  margin-bottom: 30px;
}
.section-heading .section-label {
  margin-bottom: 14px;
}
.project-grid {
  display: grid;
  gap: 36px 24px;
}
.project-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project-meta {
  display: flex;
  justify-content: space-between;
  margin-block: 17px 10px;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .20em;
  color: #494a47;
}
.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.project-card p {
  color: #424340;
  font-size: .9rem;
  max-width: 340px;
}

/* === 6. OM MIG === */
.about {
  background: #e8eade;
}
.about-grid {
  display: grid;
  gap: 38px;
}
.portrait-image {
  width: 100%;
}
.about-copy .section-label {
  margin-bottom: 20px;
}
.about-copy h2, .about-heading {
  margin-bottom: 25px;
}
/* Om-mig-sidens hovedoverskrift ligner overskriften på forsiden. */
.about-heading {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -.045em;
  margin-top: 0;
}
.about-copy > p:not(.section-label) {
  color: #424340;
  margin-top: 16px;
  font-size: .95rem;
}
.skills {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
  gap: 8px;
}
.skills li {
  font-size: .9rem;
  border: 1px solid #a3ac96;
  border-radius: 30px;
  padding: 5px 12px;
}

/* === 7. KONTAKT OG FOOTER === */
.contact {
  text-align: center;
}
.contact h2 {
  font-size: clamp(2.9rem, 6.5vw, 5.5rem);
  margin-block: 24px 30px;
}
.contact h2 .italic-heading {
  color: #b92525;
}
.contact-link {
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
}
.contact-link span {
  margin-left: 12px;
}
.site-footer {
  border-top: 1px solid #d9d9cf;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-block: 25px;
  font-size: .9rem;
  color: #424340;
}

/* === 8. STØRRE SKÆRME: Grid og navigation får mere plads. === */
@media (min-width: 700px) {
  .section-space {
    padding-block: 110px;
  }
  .container {
    width: min(1180px, calc(100% - 80px));
  }
  .menu-button {
    display: none;
  }
  .site-header nav {
    width: auto;
    padding: 0;
    gap: 32px;
  }
  .hero {
    padding-block: 80px 65px;
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-grid {
    grid-template-columns: .85fr 1.15fr;
    gap: 60px;
    align-items: center;
  }
  .site-footer {
    flex-direction: row;
    justify-content: space-between;
  }
}
@media (min-width: 1000px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* KNAPPER MELLEM SIDERNE: Et almindeligt link stylet som en knap. */
.more-link {
  display: block;
  width: fit-content;
  margin: 36px auto 0;
  padding: 12px 24px;
  border: 1px solid #242620;
  border-radius: 30px;
  text-decoration: none;
}
.back-to-top {
  margin-bottom: 120px;
}
.more-link:hover, .more-link:active {
  background: #242620;
  color: #f8f6f1;
}

/* PROJEKTBILLEDER PÅ FORSIDEN: Gråt overlay fader ind ved hover og tastaturfokus. */
.project-link {
  display: block;
  position: relative;
}
.project-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(40 40 40 / 65%);
  color: white;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity .3s;
}
.project-link:hover .project-overlay, .project-link:focus-visible .project-overlay, .project-link:active .project-overlay {
  opacity: 1;
}
/* På touchskærme vises teksten altid, fordi man ikke kan hover. */
@media (hover: none) {
  .project-overlay {
    opacity: 1;
  }
}

/* PROJEKTSIDEN: Mindre medier reducerer scrolling uden at ændre tekstbredden. */
.project-detail {
  max-width: 900px;
  margin: 0 auto 70px;
  padding-top: 30px;
  border-top: 1px solid #d9d9cf;
  scroll-margin-top: 8rem;
}
.project-detail h2 {
  margin-bottom: 20px;
}
.project-detail > p {
  max-width: 650px;
  margin-bottom: 24px;
  color: #424340;
}
.project-video {
  display: block;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  border: 0;
}
.project-detail > h3:not(:first-of-type) {
  margin-top: 30px;
}
#literary-works > h3:not(:first-of-type), #web-design > h3:not(:first-of-type) {
  margin-top: 20px;
}

/* Galleriet beholder den mindre bredde, også når flere billeder tilføjes. */
.gallery {
  max-width: 560px;
}
/* GALLERI: Miniaturebillederne kan skifte det store billede. */
.gallery-main {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #242620;
}
.gallery-thumbnails {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.gallery-thumbnails button {
  width: 110px;
  padding: 3px;
  border: 2px solid transparent;
  background: transparent;
}
.gallery-thumbnails button[aria-pressed="true"] {
  border-color: #b92525;
}
.gallery-thumbnails img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* MUSIK: Browserens egen lydafspiller. */
.music-player {
  max-width: 400px;
}
.music-player audio {
  display: block;
  width: 100%;
  margin-top: 14px;
}

/* LITTERATUR: Luft mellem værkerne uden ekstra JavaScript. */
.literary-link {
  display: block;
  width: fit-content;
  margin-bottom: 30px;
}

/* SPOTIFY: Samme maksimale bredde som projektvideoerne. Højden er uændret. */
.spotify-player {
  width: 100%;
  max-width: 560px;
  border: 0;
  border-radius: 12px;
}

/* PROJEKTMENU: En kompakt række over indholdet følger med, når man scroller.
På mobil ombrydes navnene til flere linjer. */
.project-menu {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  max-width: 900px;
  margin: 0 auto 30px;
  padding: 14px 0;
  border-bottom: 1px solid #d9d9cf;
  background: #f8f6f1;
}
.project-menu a {
  font-size: .9rem;
  text-decoration: none;
  padding-block: 4px;
}
.project-menu a:hover, .project-menu a:focus-visible, .project-menu a:active {
  color: #b92525;
}
.project-sections {
  min-width: 0;
}
/* Menuens bundstreg erstatter stregen over det første projekt. */
.project-sections > .project-detail:first-child {
  border-top: 0;
}

/* FORSTØRRELSE: Ikon i hjørnet og et stort billede oven på siden. */
.gallery-preview {
  position: relative;
}
.image-enlarge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid white;
  border-radius: 6px;
  background: rgb(36 38 32 / 80%);
  color: white;
}
.image-dialog {
  width: fit-content;
  max-width: 94vw;
  max-height: 94vh;
  padding: 12px;
  border: 0;
  background: #f8f6f1;
}
.image-dialog::backdrop {
  background: rgb(0 0 0 / 80%);
}
.image-dialog form {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.image-close {
  padding: 6px 12px;
  border: 1px solid #d9d9cf;
  background: transparent;
}
.enlarged-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(94vh - 90px);
  object-fit: contain;
}
/* Stop baggrundens scroll, mens billedet er åbent. */
body:has(.image-dialog[open]) {
  overflow: hidden;
}

/* PILE: Ligger oven på hver side af det forstørrede billede. */
.image-viewer {
  position: relative;
}
.image-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 48px;
  padding: 0;
  border: 1px solid white;
  border-radius: 6px;
  background: rgb(36 38 32 / 80%);
  color: white;
  font-size: 1.4rem;
}
.image-previous {
  left: 8px;
}
.image-next {
  right: 8px;
}

/* FOTOALBUM: Luft mellem de forskellige år. */
.photo-album-title {
  margin-top: 30px;
}

/* Respektér besøgendes indstilling om mindre bevægelse. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .project-overlay {
    transition: none;
  }
}
