@font-face {
  font-family: 'Lora Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/assets/fonts/lora-latin-wght-normal.woff2) format('woff2-variations');
  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: 'IBM Plex Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url(/assets/fonts/ibm-plex-sans-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Caveat Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/assets/fonts/caveat-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Noto Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 900;
  src: url(/assets/fonts/noto-serif-greek-ext-900-normal.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* Colours follow the blog (hypomnema.lukas-mayr.com): paper, ink and Aegean blue. */
:root {
  --bg: #faf9ee;
  --band: #f3efe1;
  --print: #ffffff;
  --ink: #2c2a26;
  --text: #47443e;
  --muted: #6b655a;
  --line: #e2d9c9;
  --accent: #2e5984;
  --marker: rgba(46, 89, 132, 0.17);
  --tape: rgba(214, 201, 170, 0.75);
  --shadow: rgba(40, 30, 20, 0.12);
  --when-light: inline;
  --when-dark: none;
  --spot: #1d1915;
  --spot-ink: #ede5d3;
  color-scheme: light;

  --serif: "Lora Variable", Georgia, serif;
  --sans: "IBM Plex Sans Variable", system-ui, sans-serif;
  --hand: "Caveat Variable", cursive;

  /* a hand-drawn stroke, used under links and as the site's one recurring mark */
  --scribble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M1.5 5.4C22 3.2 41 6.7 63 4.8S104 2.8 128 4.9 171 6.9 198.5 3.3' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1915;
    --band: #231e19;
    --print: #352f27;
    --ink: #ede5d3;
    --text: #dcd3c1;
    --muted: #a99f8d;
    --line: #3b342b;
    --accent: #8fb3da;
    --marker: rgba(143, 179, 218, 0.26);
    --tape: rgba(120, 108, 88, 0.6);
    --shadow: rgba(0, 0, 0, 0.35);
    --when-light: none;
    --when-dark: inline;
    --spot: #faf9ee;
    --spot-ink: #2c2a26;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1d1915;
  --band: #231e19;
  --print: #352f27;
  --ink: #ede5d3;
  --text: #dcd3c1;
  --muted: #a99f8d;
  --line: #3b342b;
  --accent: #8fb3da;
  --marker: rgba(143, 179, 218, 0.26);
  --tape: rgba(120, 108, 88, 0.6);
  --shadow: rgba(0, 0, 0, 0.35);
  --when-light: none;
  --when-dark: inline;
  --spot: #faf9ee;
  --spot-ink: #2c2a26;
  color-scheme: dark;
}

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

/* keeps the footer at the bottom on short pages */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
}

h2 {
  font-size: clamp(32px, 4vw, 40px);
  margin-bottom: 18px;
}

p {
  margin: 0;
}

body > header,
main {
  width: 100%;
}

main {
  flex: 1 0 auto;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 24px;
}

.handwritten {
  font: 500 25px/1.3 var(--hand);
  color: var(--accent);
}

/* small headings written by hand, slightly crooked */
.note {
  display: inline-block;
  font: 600 27px/1.1 var(--hand);
  color: var(--accent);
  transform: rotate(-1.5deg);
}

.scribble {
  position: relative;
  display: inline-block;
  padding-bottom: 7px;
  color: var(--ink);
  font-weight: 500;
}

.scribble::after {
  content: "";
  position: absolute;
  inset: auto -3px 0;
  height: 7px;
  background: var(--accent);
  -webkit-mask: var(--scribble) center / 100% 100% no-repeat;
  mask: var(--scribble) center / 100% 100% no-repeat;
  transition: transform 0.2s ease;
  transform-origin: left;
}

.scribble:hover {
  text-decoration: none;
}

.scribble:hover::after {
  transform: scaleX(1.06) translateY(1px);
}

/* header and footer */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
}

/* the logo keeps the look of the old site */
.logo {
  padding-bottom: 2px;
  border-bottom: 2px solid var(--accent);
  color: var(--ink);
  font: 400 20px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.15em;
}

.logo:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 16px;
  font-weight: 500;
}

.site-nav a {
  padding: 10px 12px;
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.theme-toggle {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.25s ease;
}

/* on hover a blob of the other theme pops up under the icon and keeps wobbling */
.theme-toggle::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  background: var(--spot);
  transform: scale(0);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.theme-toggle:focus-visible {
  color: var(--spot-ink);
}

/* the blob itself shows the focus; a ring around it would only draw a square */
.theme-toggle:focus-visible:not(.rested) {
  outline: none;
}

/* a slow turn plus a gentle change of shape, so it breathes instead of twitching */
.theme-toggle:focus-visible::before {
  transform: scale(1);
  animation:
    blob-shape 4s ease-in-out infinite alternate,
    blob-turn 9s linear infinite;
}

/* touch screens keep :hover after a tap, so the hover blob is for mice only */
@media (hover: hover) {
  .theme-toggle:hover {
    color: var(--spot-ink);
  }

  .theme-toggle:hover::before {
    transform: scale(1);
    animation:
      blob-shape 4s ease-in-out infinite alternate,
      blob-turn 9s linear infinite;
  }

  .theme-toggle:hover svg {
    transform: rotate(8deg);
  }
}

/* right after a switch the pointer is still on the button; no blob until it leaves */
.theme-toggle.rested,
.theme-toggle.rested:hover {
  color: var(--ink);
}

.theme-toggle.rested::before,
.theme-toggle.rested:hover::before {
  transform: scale(0);
  transition: none;
  animation: none;
}

@keyframes blob-shape {
  0% {
    border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  }
  50% {
    border-radius: 54% 46% 45% 55% / 45% 55% 47% 53%;
  }
  100% {
    border-radius: 49% 51% 56% 44% / 55% 48% 52% 45%;
  }
}

@keyframes blob-turn {
  to {
    rotate: 360deg;
  }
}

/* clicking lets that blob grow over the page: the new theme is revealed inside it */
@property --reveal {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  --blob: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M51 3c21-1 41 13 45 35 5 24-7 50-31 57C40 103 11 91 4 66-3 39 23 4 51 3z'/%3E%3C/svg%3E");
  -webkit-mask: var(--blob) no-repeat;
  mask: var(--blob) no-repeat;
  -webkit-mask-size: var(--reveal) var(--reveal);
  mask-size: var(--reveal) var(--reveal);
  -webkit-mask-position: calc(var(--reveal-x) - var(--reveal) / 2) calc(var(--reveal-y) - var(--reveal) / 2);
  mask-position: calc(var(--reveal-x) - var(--reveal) / 2) calc(var(--reveal-y) - var(--reveal) / 2);
  animation: reveal 0.75s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}

@keyframes reveal {
  from {
    --reveal: 68px;
  }
  to {
    --reveal: 330vmax;
  }
}

.theme-toggle svg {
  display: block;
  width: 26px;
  height: 26px;
  transition: transform 0.25s ease;
}

.theme-toggle[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.theme-toggle .when-light {
  display: var(--when-light);
}

.theme-toggle .when-dark {
  display: var(--when-dark);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 28px 40px;
}

/* start page */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 64px;
  padding-block: 56px 96px;
}

.hero-text {
  flex: 1 1 460px;
  min-width: 0;
}

.hero h1 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.hoi {
  display: block;
  margin-bottom: 6px;
  font: 700 0.62em/1 var(--hand);
  letter-spacing: 0;
  color: var(--accent);
  transform: rotate(-3deg);
  transform-origin: left bottom;
}

.intro {
  max-width: 30em;
  margin-top: 28px;
  font-size: 20px;
  line-height: 1.75;
}

/* a highlighter stroke, so the interests stand out without looking like links */
.intro mark {
  padding: 0 1px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: var(--ink);
  background: linear-gradient(transparent 55%, var(--marker) 55%);
}

.portrait {
  position: relative;
  flex: 0 1 400px;
  margin: 0 auto;
  padding: 14px 14px 18px;
  background: var(--print);
  box-shadow: 0 1px 2px var(--shadow), 0 14px 34px var(--shadow);
  transform: rotate(2.2deg);
}

.portrait::before,
.portrait::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 27px;
  background: var(--tape);
}

.portrait::before {
  top: -14px;
  left: 34px;
  transform: rotate(-6deg);
}

.portrait::after {
  bottom: -12px;
  right: 30px;
  transform: rotate(4deg);
}

.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

.band-top {
  border-top: 1px solid var(--line);
}

.band {
  background: var(--band);
  border-block: 1px solid var(--line);
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 56px 72px;
  padding-block: 88px;
}

.split > * {
  flex: 1 1 400px;
  min-width: 0;
}

.blog-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.blog-title h3 {
  font-size: 25px;
  line-height: 1.2;
}

.blog-mark {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--bg);
  font: 900 28px/1 "Noto Serif", Georgia, serif;
  transform: rotate(-3deg);
}

.blog-intro p {
  max-width: 32em;
  margin: 16px 0 22px;
}

.latest .note {
  margin: 10px 0 10px;
}

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list li + li {
  border-top: 1px dashed var(--line);
}

.post-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 18px;
  padding-block: 14px;
  color: var(--ink);
}

.post-title {
  font: 500 19px/1.35 var(--serif);
}

.post-list time {
  white-space: nowrap;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

#gallery > .wrap {
  padding-block: 88px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
}

.section-head > div {
  flex: 1 1 480px;
  min-width: 0;
}

.section-head p {
  max-width: 36em;
}

#gallery .handwritten {
  margin-top: 44px;
}

.contact {
  padding-block: 96px 88px;
}

.contact > p {
  margin: -4px 0 24px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 18px;
}

.social-links svg {
  flex: none;
  color: var(--muted);
}

/* photos: loose prints, each a little crooked, some taped down */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 36px 30px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

/* on the gallery page every print keeps the photo's own format */
.photo-grid-large {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-items: start;
  gap: 44px 36px;
  margin-top: 44px;
}

.photo-grid-large .photo img {
  aspect-ratio: auto;
}

.photo {
  display: block;
  color: var(--text);
}

.photo:hover {
  text-decoration: none;
}

.photo figure {
  position: relative;
  margin: 0;
  padding: 10px 10px 8px;
  background: var(--print);
  box-shadow: 0 1px 2px var(--shadow), 0 8px 20px var(--shadow);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* tilt and tape come per photo from src/pages/gallery.js */
.photo figure[data-tape]::before,
.photo figure[data-tape="corners"]::after {
  content: "";
  position: absolute;
  width: var(--tape-w, 76px);
  height: 22px;
  background: var(--tape);
}

.photo figure[data-tape="top"]::before {
  top: -11px;
  left: var(--tape-x);
  transform: rotate(var(--tape-turn));
}

.photo figure[data-tape="left"]::before,
.photo figure[data-tape="corners"]::before {
  top: 2px;
  left: -16px;
  transform: rotate(calc(-38deg + var(--tape-turn)));
}

.photo figure[data-tape="right"]::before,
.photo figure[data-tape="corners"]::after {
  top: 2px;
  right: -16px;
  transform: rotate(calc(38deg + var(--tape-turn)));
}

.photo:hover figure {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 2px 4px var(--shadow), 0 14px 30px var(--shadow);
}

.photo-frame {
  display: block;
  overflow: hidden;
}

.photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.photo-caption {
  display: block;
  margin-top: 6px;
  font: 600 21px/1.2 var(--hand);
  color: var(--ink);
}

.photo-description {
  display: block;
  margin: 4px 2px 6px;
  font-size: 15px;
  line-height: 1.5;
}

/* gallery page */

.gallery-page {
  padding-block: 40px 96px;
}

.gallery-page h1 {
  margin: 12px 0 18px;
  font-size: clamp(40px, 5vw, 60px);
}

.lead {
  max-width: 36em;
}

.gallery-page .handwritten {
  margin-top: 14px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 36px;
}

.filters[hidden] {
  display: none;
}

.filters button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 16px var(--sans);
  cursor: pointer;
}

.filters button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.photo-grid li[hidden] {
  display: none;
}

.license {
  max-width: 40em;
  margin-top: 56px;
  font-size: 14px;
  color: var(--muted);
}

.license a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: #15120f;
  color: #dcd3c1;
}

.lightbox :focus-visible {
  outline-color: #8fb3da;
}

html:has(.lightbox[open]) {
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox img {
  justify-self: center;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #ede5d3;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.lightbox-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px 28px;
}

.lightbox-caption {
  font: 600 24px/1.2 var(--hand);
  color: #ede5d3;
}

.lightbox-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8fb3da;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lightbox-download svg {
  align-self: center;
}

.lightbox-license {
  font-size: 14px;
  color: #a99f8d;
}

/* small pages */

.imprint,
.not-found {
  padding-block: 48px 96px;
  min-height: 50vh;
}

.imprint h1,
.not-found h1 {
  margin-bottom: 28px;
  font-size: 36px;
}

.imprint p + p {
  margin-top: 12px;
}

.imprint p {
  color: var(--ink);
}

.imprint .small {
  font-size: 14px;
  color: var(--muted);
}

.not-found a {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .hero {
    gap: 48px;
    padding-block: 32px 72px;
  }

  .photo-grid,
  .photo-grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 16px;
  }

  .photo figure {
    padding: 6px 6px 4px;
  }

  .photo-caption {
    font-size: 17px;
  }

  .photo-description {
    display: none;
  }

  .post-list a {
    grid-template-columns: minmax(0, 1fr);
  }

  .lightbox {
    padding: 16px 4px;
  }

  .lightbox[open] {
    gap: 12px 0;
  }

  .lightbox-step {
    width: 36px;
  }

  .site-nav {
    flex-basis: 100%;
    margin-left: -12px;
  }

  .theme-toggle {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo figure,
  .scribble::after,
  .theme-toggle,
  .theme-toggle::before,
  .theme-toggle svg {
    transition: none;
  }

  .theme-toggle:hover::before,
  .theme-toggle:focus-visible::before {
    animation: none;
  }
}
