/* Nikola Grimm — nikolagrimm.de
   Palette: #F3EFE6 sand, #24302C ink, #3E4C46 muted,
   #4F675C sage, #31443C sage deep, #D9D0C3 line, #EBE4D8 draft. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-500-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f3efe6;
  --ink: #24302c;
  --muted: #3e4c46;
  --sage: #4f675c;
  --sage-deep: #31443c;
  --line: #d9d0c3;
  --draft: #ebe4d8;
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --wrap: min(72rem, calc(100% - 2.5rem));
  --measure: 40rem;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
}

::selection {
  background: #d5ddd4;
  color: var(--ink);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

p {
  margin: 0 0 1rem;
}

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

a {
  color: var(--sage-deep);
  text-underline-offset: 0.18em;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  background: var(--bg);
  color: var(--ink);
  padding: 0.55rem 0.85rem;
  z-index: 20;
}

.skip:focus {
  transform: none;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1.75rem;
  padding-block: 0.85rem 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 3.15rem;
  height: auto;
  flex: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand-sub {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  padding: 0.45rem 0;
}

.nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

section[id] {
  scroll-margin-top: 5.25rem;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100svh - 5.2rem);
  padding: 4.25rem 0 4.75rem;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: min(38rem, 58%);
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 7.2vw, 5.35rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

h1 .cred {
  font-size: 0.58em;
  letter-spacing: 0;
  white-space: nowrap;
}

.role {
  margin: 1.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.lede {
  margin: 1.4rem 0 0;
  max-width: 22em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
  line-height: 1.35;
}

.hero-figure {
  position: absolute;
  right: max(1.25rem, calc((100% - 72rem) / 2));
  top: 50%;
  transform: translateY(-48%);
  width: min(38vw, 26rem);
  opacity: 0.34;
  pointer-events: none;
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.section {
  padding: clamp(4.25rem, 8vw, 6.75rem) 0;
}

.rule {
  width: 2rem;
  height: 1px;
  background: var(--sage);
  margin-bottom: 0.9rem;
}

h2 {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.15rem, 4vw, 2.85rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.prose,
.cite,
.t-detail,
.focus p {
  hyphens: auto;
}

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

.meta {
  color: var(--muted);
}

.about-grid {
  display: grid;
  gap: 2.25rem;
  align-items: start;
}

.portrait {
  margin: 0;
  width: min(100%, 18.75rem);
  justify-self: center;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 9.5rem 9.5rem 0.45rem 0.45rem;
  background: var(--draft);
  filter: grayscale(1);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 46rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 0.35rem 1.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline time,
.timeline .when {
  color: var(--sage-deep);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding-top: 0.28rem;
  white-space: nowrap;
}

.t-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.t-detail {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.focus {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.focus li {
  padding: 1.25rem 0 1.4rem;
  border-top: 1px solid var(--line);
}

.focus h3 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.focus p {
  margin: 0;
  max-width: 36em;
  color: var(--muted);
}

.subhead {
  margin: 2.4rem 0 0.4rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  letter-spacing: -0.015em;
}

.entry {
  max-width: 42rem;
  padding: 1.1rem 0 1.25rem;
  border-top: 1px solid var(--line);
}

.kind {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.cite {
  margin: 0;
}

.entry .more {
  margin: 0.55rem 0 0;
}

.mail {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.2;
  color: var(--ink);
  text-underline-offset: 0.14em;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
}

.site-footer a {
  color: var(--ink);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.legal {
  padding: 2.75rem 0 4.5rem;
}

.legal-inner {
  max-width: 40rem;
}

.draft {
  margin: 0 0 1.75rem;
  padding: 0.85rem 1rem;
  background: var(--draft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.draft strong {
  color: var(--ink);
  font-weight: 600;
}

.legal h1 {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.legal h2 {
  margin: 2rem 0 0.55rem;
  font-size: 1.55rem;
}

address {
  font-style: normal;
  margin-bottom: 1rem;
}

.legal a {
  overflow-wrap: anywhere;
}

.back {
  margin-top: 2.25rem;
}

@media (min-width: 740px) {
  .focus {
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }
}

@media (min-width: 860px) {
  :root {
    --wrap: min(72rem, calc(100% - 5rem));
  }

  .about-grid.has-portrait {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.78fr);
    gap: 4rem;
    align-items: start;
  }

  .about-grid.has-portrait .prose {
    grid-column: 1;
    grid-row: 1;
  }

  .about-grid.has-portrait .portrait {
    grid-column: 2;
    grid-row: 1;
    width: min(100%, 22rem);
    justify-self: end;
    margin-top: 0.2rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .hero {
    min-height: 0;
    display: block;
    padding: 2.4rem 0 3rem;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-figure {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: min(78%, 16rem);
    margin-top: 1.75rem;
    opacity: 0.72;
  }

  section[id] {
    scroll-margin-top: 1rem;
  }
}

@media (max-width: 640px) {
  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .timeline time,
  .timeline .when {
    padding-top: 0;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-header {
    position: static;
  }

  .nav,
  .skip,
  .hero-figure {
    display: none;
  }

  body {
    background: #fff;
  }

  a {
    color: inherit;
  }

  .mail::after {
    content: " (" attr(href) ")";
    font-family: var(--sans);
    font-size: 0.55em;
  }
}
