@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap");

/*
  Hela webbplatsens utseende finns i den här filen.
  Ändra färgerna nedan om du vill prova ett annat färgschema.
*/
:root {
  --background: #d0eeee;
  --text: #202828;
  --link: #243f46;
  --link-hover: #0d5967;
}

/* Gör att padding och kantlinjer räknas in i elementens bredd. */
* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

/* Gemensam placering för sidornas huvudinnehåll. */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 72px 24px;
}

.profile {
  width: min(100%, 680px);
}

.header-art {
  display: block;
  width: min(calc(100vw - 48px), 980px);
  max-width: none;
  height: clamp(130px, 24vw, 190px);
  margin: 0 0 32px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  object-fit: cover;
  object-position: center 62%;
}

.footer-art {
  display: block;
  width: min(calc(100vw - 48px), 980px);
  max-width: none;
  height: auto;
  margin: 64px 0 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

h1 {
  margin: 0 0 32px;
  font-family: "Century Gothic", "Avenir Next", Avenir, Arial, sans-serif;
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 400;
  letter-spacing: 0.025em;
  line-height: 1.12;
  text-align: center;
}

.profile h1 {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.portrait {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: 0 auto 34px;
}

.intro {
  margin-bottom: 28px;
  font-size: clamp(1.15rem, 2.4vw, 1.38rem);
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
}

.intro p {
  margin: 0;
}

.description {
  max-width: 590px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(22px, 7vw, 48px);
  font-family: "Century Gothic", "Avenir Next", Avenir, Arial, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.045em;
}

.top-nav {
  margin-bottom: 42px;
}

nav a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

nav a:hover,
nav a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  color: var(--link-hover);
}

nav a[aria-current="page"] {
  font-weight: 700;
}

/* Undersidorna Texter och Länkar. */
.subpage {
  text-align: center;
}

.subpage p {
  margin: 0 auto 34px;
  font-size: 1.08rem;
  line-height: 1.7;
}

.subpage .text-intro {
  max-width: 590px;
  margin-bottom: 46px;
}

.text-entry {
  max-width: 560px;
  margin: 0 auto 46px;
  padding: 28px 0;
  border-top: 1px solid rgb(32 40 40 / 28%);
  border-bottom: 1px solid rgb(32 40 40 / 28%);
}

.text-entry h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 600;
}

.text-entry p {
  margin-bottom: 18px;
  font-size: 1rem;
}

.publication-link {
  color: var(--link);
  text-underline-offset: 5px;
}

.publication-link:hover,
.publication-link:focus-visible {
  color: var(--link-hover);
}

.back-link {
  color: var(--link);
  font-family: "Century Gothic", "Avenir Next", Avenir, Arial, sans-serif;
  font-size: 0.95rem;
  text-underline-offset: 5px;
}

/* CV-sidan. */
.cv-page {
  align-items: start;
}

.cv {
  width: min(100%, 980px);
}

.cv-header {
  max-width: 780px;
  margin-bottom: 64px;
}

.cv-label {
  margin: 0 0 12px;
  font-family: "Century Gothic", "Avenir Next", Avenir, Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-header h1 {
  margin-bottom: 20px;
  text-align: left;
}

.cv-summary {
  margin: 0 0 22px;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.65;
}

.cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  font-style: normal;
  font-weight: 600;
}

.cv-contact > * {
  display: inline-flex;
  align-items: center;
}

.cv-contact > *:not(:last-child)::after {
  content: "";
  width: 1px;
  height: 1em;
  margin: 0 13px;
  background: currentColor;
  opacity: 0.45;
}

.cv-contact a {
  color: var(--link);
  text-underline-offset: 4px;
}

.cv-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: clamp(44px, 8vw, 88px);
}

.cv-section h2 {
  margin: 0 0 30px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(32 40 40 / 28%);
  font-size: 0.92rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.cv-item {
  margin-bottom: 34px;
}

.cv-item h3 {
  margin: 0 0 5px;
  font-size: 1.05rem;
  line-height: 1.45;
}

.cv-item p {
  margin: 0;
  line-height: 1.58;
}

.cv-item .cv-period {
  margin-bottom: 7px;
  color: rgb(32 40 40 / 72%);
  font-size: 0.92rem;
}

.cv-item ul {
  margin: 13px 0 0;
  padding-left: 22px;
  line-height: 1.5;
}

.cv-back-link {
  display: inline-block;
  margin-top: 22px;
}

/* Länksidan och målningen. */
.link-page .link-intro {
  max-width: 560px;
  margin-bottom: 42px;
}

.link-page-art {
  display: block;
  width: min(100%, 420px);
  height: min(236px, calc((100vw - 40px) * 0.5625));
  aspect-ratio: 16 / 9;
  margin: 0 auto 34px;
  object-fit: cover;
  object-position: center 62%;
}

.external-links {
  max-width: 560px;
  margin: 0 auto 46px;
  border-top: 1px solid rgb(32 40 40 / 28%);
}

.external-links a {
  display: grid;
  gap: 7px;
  padding: 24px 4px;
  border-bottom: 1px solid rgb(32 40 40 / 28%);
  color: var(--link);
  text-align: left;
  text-decoration: none;
}

.link-placeholder {
  display: grid;
  gap: 7px;
  padding: 24px 4px;
  border-bottom: 1px solid rgb(32 40 40 / 28%);
  color: rgb(32 40 40 / 68%);
  text-align: left;
}

.external-links a:hover,
.external-links a:focus-visible {
  color: var(--link-hover);
}

.external-links strong,
.link-placeholder strong {
  font-size: 1.08rem;
}

.external-links span,
.link-placeholder span {
  font-size: 0.97rem;
  line-height: 1.5;
}

.link-placeholder small {
  margin-top: 3px;
  font-size: 0.82rem;
  font-style: italic;
}

/* Anpassningar för mobiltelefoner och smala fönster. */
@media (max-width: 520px) {
  .page {
    align-items: start;
    padding: 42px 20px 56px;
  }

  h1 {
    margin-bottom: 26px;
  }

  .portrait {
    width: min(82%, 250px);
    margin-bottom: 28px;
  }

  .description {
    text-align: left;
  }

  .cv-header {
    margin-bottom: 48px;
  }

  .cv-contact {
    flex-direction: column;
    align-items: flex-start;
  }

  .cv-contact > *:not(:last-child)::after {
    display: none;
  }

  .cv-columns {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
