:root {
  --paper: #f3ece2;
  --paper-deep: #ebe2d3;
  --ink: #1a1714;
  --ink-soft: #4a433b;
  --ink-mute: #8a8277;
  --line: rgba(26, 23, 20, 0.12);
  --accent: #b04a3f;

  /* Signatur-radius: stor topp-venstre, liten på de tre andre */
  --frame: 40px 6px 6px 6px;
  --frame-sm: 20px 4px 4px 4px;

  --display: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 920px;
  --gutter: 32px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px var(--gutter) 96px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 96px;
}

.hero__image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: var(--frame);
  cursor: pointer;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: opacity 0.6s cubic-bezier(0.2, 0.6, 0.2, 1),
    transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.hero__image img.alt {
  opacity: 0;
  transform: scale(1.04);
}

.hero__image:hover img.main {
  opacity: 0;
  transform: scale(1.02);
}

.hero__image:hover img.alt {
  opacity: 1;
  transform: scale(1);
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, 7.5vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

.lede {
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.35;
  color: var(--ink-soft);
  max-width: 28ch;
  margin: 0;
}

/* ---------- sections ---------- */
section + section {
  margin-top: 72px;
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  color: var(--ink);
}

h2 em {
  font-style: italic;
  color: var(--accent);
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
  max-width: 60ch;
}

p:last-child {
  margin-bottom: 0;
}

/* ---------- CV ---------- */
.cv {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.cv li {
  display: grid;
  grid-template-columns: 72px 120px 1fr auto;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.cv .thumb {
  width: 120px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--paper-deep);
  display: block;
  border-radius: var(--frame-sm);
}

.cv .year {
  font-family: var(--display);
  font-size: 20px;
}

.cv .title {
  font-family: var(--display);
  font-size: 22px;
  font-style: italic;
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.cv .meta {
  font-size: 14px;
  color: var(--ink-soft);
}

.cv .role {
  font-size: 13px;
  color: var(--ink-mute);
  white-space: nowrap;
}

.cv .role strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
  background: var(--paper-deep);
  border-radius: var(--frame);
  transition: opacity 0.3s ease;
}

.gallery a:hover img {
  opacity: 0.88;
}

/* ---------- contact ---------- */
.contact {
  position: relative;
  padding: 8px 0 4px;
}

.contact__email {
  display: inline-block;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(26px, 3.4vw, 44px);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 18px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, border-color 0.2s,
    transform 0.3s cubic-bezier(0.2, 0.6, 0.2, 1);
  transform-origin: left bottom;
}

.contact__email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact__arrow {
  display: inline-block;
  margin-left: 0.3em;
  transition: transform 0.25s ease;
}

.contact__email:hover .contact__arrow {
  transform: translateX(6px);
}

/* ---------- footer ---------- */
footer {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-mute);
  font-family: var(--display);
  font-style: italic;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  main {
    padding: 40px 20px 64px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 64px;
  }

  .hero__image {
    max-width: 320px;
  }

  section + section {
    margin-top: 56px;
  }

  .cv li {
    grid-template-columns: 56px 96px 1fr;
    grid-template-rows: auto auto;
    gap: 12px 16px;
  }

  .cv .thumb {
    width: 96px;
  }

  .cv .role {
    grid-column: 3;
  }

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

  footer {
    margin-top: 64px;
    flex-direction: column;
    gap: 6px;
  }
}
