/* ==========================================================================
   pages.css — page-specific layout for /um-mig, /hafa-samband and /nalaegd.
   Design tokens and shared components (header, footer, brand, nav, pills)
   live in styles.css and are never redefined here.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Um mig — two-column grid: arch portrait placeholder + text column
   -------------------------------------------------------------------------- */

.about-page {
  flex: 1;
  background: var(--cream);
  color: var(--ink);
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 64px;
  align-items: center;
  /* top padding clears the fixed island header; the inline padding grows on
     wide screens so the CONTENT caps at 1360px while the cream background
     stays full-bleed (a max-width on the section left dark bands at the sides) */
  padding: 152px max(52px, calc((100% - 1360px) / 2)) 80px;
}

/* Striped placeholder until real portrait photography exists. */
.about-portrait {
  /* 4/5 against an unbounded column made this 930px tall at 1920px. */
  width: 100%;
  max-width: 460px;
  justify-self: end;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 0 0;
  background: repeating-linear-gradient(45deg, #e9e0d2 0 14px, #efe8dc 14px 28px);
  display: flex;
  align-items: end;
  justify-content: center;
  padding-bottom: 24px;
}

.about-chip {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--tan-muted);
  background: var(--cream);
  padding: 4px 10px;
  border-radius: 4px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 560px;
}

.about-eyebrow {
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tan-muted);
}

.about-text h1 {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 52px;
  line-height: 1.08;
  text-wrap: pretty;
}

.about-text p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--body-light);
}

.about-text .pill--dark {
  align-self: start;
}

/* Education & courses list under the about text */
.about-education {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.about-education h2 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tan-muted);
}

.about-education p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--body-light);
}

/* --------------------------------------------------------------------------
   Hafa samband — centered column, social buttons instead of a form
   -------------------------------------------------------------------------- */

.contact-page {
  flex: 1;
  background: var(--sand);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 152px 52px 80px;
  gap: 30px;
}

.contact-page h1 {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 56px;
  line-height: 1.06;
  text-align: center;
  /* px, not ch: the ch unit is measured against the *fallback* font before the
     webfont swaps in, so the max-width itself changed mid-load and re-wrapped
     the heading. A fixed px cap is stable across the swap. */
  max-width: 460px;
  text-wrap: pretty;
}

.contact-intro {
  margin: 0;
  max-width: 620px;
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
  color: var(--body-light);
}

.contact-socials {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Slightly larger than the shared .pill--dark, with room for the icon. */
.contact-social {
  gap: 10px;
  padding: 16px 30px;
  font-size: 14px;
}

.contact-social-icon {
  flex: none;
}

.contact-note {
  margin: 0;
  margin-top: 8px;
  font-size: 13px;
  color: var(--body-light);
}

/* --------------------------------------------------------------------------
   Nálægð — article page: baknudd & heilun
   -------------------------------------------------------------------------- */

.nalaegd-page {
  flex: 1;
  background: var(--cream);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 152px 52px 80px;
}

.nalaegd-article {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nalaegd-eyebrow {
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tan-muted);
}

.nalaegd-article h1 {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 52px;
  line-height: 1.08;
}

.nalaegd-article h2 {
  margin: 14px 0 0;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.15;
}

.nalaegd-article h3 {
  margin: 12px 0 0;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.3;
}

.nalaegd-article p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--body-light);
}

.nalaegd-article .nalaegd-signoff {
  margin-top: 10px;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
}

.nalaegd-article .pill--dark {
  align-self: flex-start;
  margin-top: 18px;
}

/* --------------------------------------------------------------------------
   404 — dark page in the landing's letter language
   -------------------------------------------------------------------------- */

.notfound-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 152px 24px 80px;
  gap: 18px;
  color: var(--cream);
}

.notfound-code {
  font-family: 'Instrument Serif', serif;
  font-size: 150px;
  line-height: .9;
}

/* The last 4 mirrors, like the final K in the wordmark */
.notfound-mirror {
  display: inline-block;
  transform: scaleX(-1);
  transform-origin: center;
}

.notfound-page h1 {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.15;
}

.notfound-page p {
  margin: 0;
  max-width: 44ch;
  font-size: 15px;
  line-height: 1.7;
  opacity: .8;
}

.notfound-cta {
  display: inline-flex;
  align-items: center;
  background: var(--cream);
  color: var(--ink);
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 13.5px;
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Mobile — single breakpoint (header/footer are handled in styles.css)
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .about-page {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 124px 24px 56px;
  }

  .about-portrait {
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
    justify-self: center; /* single column: undo the desktop end-alignment */
  }

  .about-text h1 {
    font-size: 36px;
  }

  .contact-page {
    padding: 124px 24px 56px;
    gap: 24px;
  }

  .contact-page h1 {
    font-size: 36px;
  }

  .contact-socials {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .contact-social {
    justify-content: center;
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
  }

  .nalaegd-page {
    padding: 124px 24px 56px;
  }

  .notfound-page {
    padding: 124px 24px 56px;
  }

  .notfound-code {
    font-size: 96px;
  }

  .notfound-page h1 {
    font-size: 27px;
  }

  .nalaegd-article h1 {
    font-size: 36px;
  }

  .nalaegd-article h2 {
    font-size: 25px;
  }
}
