/* wengelin.org – one stylesheet, self-hosted font, no external resources. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/Montserrat.woff2") format("woff2");
}

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #b8b8b8;
  --link: #9be9b9;
  --link-hover: #ffffff;
  --rule: #333333;
  --focus: #9be9b9;
  --brand-green: #5ef249; /* Friktion brand colour, used for the arrow */
  /* Plate behind the name on the mobile hero. Checked against a white photo pixel. */
  --hero-plate: rgba(0, 0, 0, 0.62);
  --hero-text: #ffffff;
  --hero-lead: #e6e6e6;
  --gutter: 1.25rem;
  --wide: 70rem;
  --measure: 38rem;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.site-header,
main,
.site-footer {
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  display: flex;
  justify-content: flex-end;
  padding-block: 1rem;
  font-size: 0.9375rem;
}

main {
  padding-block: 0 3rem;
}

h1,
h2 {
  line-height: 1.15;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  letter-spacing: -0.01em;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.375rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Hero: photo with name and title. Mobile first: full-bleed photo with a plate. */
.hero {
  position: relative;
  margin-inline: calc(-1 * var(--gutter));
  margin-bottom: 2rem;
}

.hero__photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88svh;
  object-fit: cover;
  object-position: 50% 20%;
}

.hero__text {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem var(--gutter) 1.25rem;
  background: var(--hero-plate);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hero__text h1 {
  color: var(--hero-text);
}

.hero__text .lead {
  color: var(--hero-lead);
}

.content {
  max-width: var(--measure);
}

/* Wide screens: photo on the left, name and text on the right. */
@media (min-width: 50rem) {
  main {
    display: grid;
    grid-template-columns: minmax(0, 26rem) minmax(0, var(--measure));
    grid-template-rows: auto 1fr;
    column-gap: clamp(2rem, 5vw, 4.5rem);
    justify-content: center;
    padding-top: 1rem;
  }

  .hero {
    display: contents;
  }

  .hero__photo {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    max-height: none;
  }

  .hero__text {
    grid-column: 2;
    grid-row: 1;
    position: static;
    padding: 0 0 2rem;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .hero__text .lead {
    color: var(--muted);
  }

  .content {
    grid-column: 2;
    grid-row: 2;
  }

  .site-header,
  .site-footer {
    max-width: calc(26rem + var(--measure) + 4.5rem + 2 * var(--gutter));
  }
}

/* Simple pages without a hero (404). */
main.simple {
  display: block;
  max-width: var(--measure);
  padding-top: 3rem;
}

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

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

cite {
  font-style: italic;
}

.contact {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
  margin: 0;
}

.contact dt {
  font-weight: 600;
}

.contact dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 26rem) {
  .contact {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact dd {
    margin-bottom: 0.75rem;
  }
}

.site-footer {
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

/* Friktion section. The call to action follows the small inline variant
   used in the cards on friktion.se: bold text and a short green arrow. */
.friktion__heading {
  margin-bottom: 1.25rem;
}

.friktion__logo {
  display: block;
  width: 100%;
  max-width: 16rem;
  height: auto;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.cta:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.cta__arrow {
  flex-shrink: 0;
  width: auto;
  height: 1.5rem;
  color: var(--brand-green);
  transition: transform 0.2s ease;
}

.cta:hover .cta__arrow {
  transform: translateX(0.25rem);
}

@media (prefers-reduced-motion: reduce) {
  .cta__arrow {
    transition: none;
  }
}

/* Interests: two lists side by side when there is room, stacked otherwise. */
.interests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem 2.5rem;
  margin-top: 0.25rem;
}

.interests h3 {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.interests ul {
  margin: 0;
  padding-left: 1.1rem;
}

.interests li {
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.interests li::marker {
  color: var(--link);
}

@media print {
  .site-header {
    display: none;
  }

  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
  }

  .hero {
    margin: 0;
  }

  .hero__photo {
    max-width: 6cm;
    max-height: none;
  }

  .hero__text {
    position: static;
    padding: 0.5rem 0 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .cta__arrow {
    color: #000;
  }

  .friktion__logo {
    max-width: 5cm;
    filter: invert(1);
  }

  .hero__text h1,
  .hero__text .lead,
  .lead,
  .site-footer,
  a {
    color: #000;
  }
}
