:root {
  --bg: #F9F8F6;
  --fg: #30302e;
  --muted: #77736c;
  --nav-fg: #62625e;
  --image-border: .5px solid rgba(98, 98, 94, .3);
  --image-radius: clamp(12px, 2vw, 18px);
  --header-height: 86px;
  --brand-size: 24px;
  --blur-reach: 16px;
  --display-size: min(clamp(64px, 10vw, 150px), 12svh);
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg)
}

body {
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}

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

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}

a:focus-visible,
summary:focus-visible,
button:focus-visible,
.coverflow-stage:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 5px
}

.project-image,
.project-image-placeholder,
.coverflow-card {
  border: var(--image-border);
  border-radius: var(--image-radius);
  overflow: hidden;
}

.wrap {
  width: min(100% - 40px, 1480px);
  margin: 0 auto
}

.content-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column
}

.page-content {
  flex: 1;
  max-width: 860px;
  padding: 40px 0 100px
}

html.page-motion {
  overscroll-behavior-y: none
}

.page-motion .page-content {
  min-height: calc(100svh - var(--header-height));
  padding-bottom: max(100px, calc(var(--page-footer-height, 80px) + 28px));
}

.page-motion .site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
}

.brand {
  white-space: nowrap;
  font-size: var(--brand-size);
  line-height: 1;
  letter-spacing: -.055em;
  font-weight: 400;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  flex-shrink: 0;
}

.header-inner {
  position: relative;
  z-index: 3;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-link {
  position: absolute;
  left: 0;
  font-size: 12px;
  color: var(--muted);
}

.home-link:hover {
  color: var(--fg)
}

/* A single soft edge fade; the header adds a light frosted finish. */
.header-blur,
.footer-blur {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  --fade-direction: to bottom;
}
.header-blur {
  top: 0;
  height: var(--header-height);
  z-index: 2;
}
.footer-blur {
  inset: 0;
  z-index: 0;
  --fade-direction: to top;
}
.blur-layer {
  position: absolute;
  inset: 0 0 calc(-1 * var(--blur-reach));
  background: var(--bg);
  --edge-mask: linear-gradient(var(--fade-direction),
    #000 calc(100% - var(--blur-reach)),
    rgba(0, 0, 0, .85) calc(100% - var(--blur-reach) * .75),
    rgba(0, 0, 0, .5) calc(100% - var(--blur-reach) * .5),
    rgba(0, 0, 0, .15) calc(100% - var(--blur-reach) * .25),
    transparent 100%);
  -webkit-mask-image: var(--edge-mask);
  mask-image: var(--edge-mask);
}
.footer-blur .blur-layer {
  inset: calc(-1 * var(--blur-reach)) 0 0;
}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .header-blur .blur-layer {
    background: rgba(249, 248, 246, .82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.site-footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  padding: 18px 0 22px;
}

.footer-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 16px;
}

.legal a:hover {
  color: var(--fg)
}

.main-nav {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: var(--nav-align, center);
  gap: 8px;
  font-size: calc(var(--display-size) * .55);
  line-height: 1;
  letter-spacing: -.045em;
}

.main-nav a {
  color: var(--nav-fg);
  transition: color .2s ease
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--fg)
}

@media(max-width:760px) {
  :root {
    --header-height: 72px;
    --brand-size: 22px;
    --blur-reach: 12px;
    --display-size: min(clamp(58px, 17vw, 92px), 12svh)
  }

  .wrap {
    width: min(100% - 28px, 1480px)
  }

  .page-content {
    padding: 24px 8px 64px
  }

  .footer-row {
    gap: 12px
  }
}

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

  .main-nav a {
    transition: none
  }
}

@media(prefers-reduced-transparency:reduce) {
  .blur-layer { display: none; }
  .header-blur, .footer-blur { background: var(--bg); }
}

@media(max-height:600px) {
  :root {
    --display-size: 9svh
  }

  .footer-row {
    gap: 8px
  }

  .main-nav {
    margin-top: 24px;
    gap: 6px
  }
}
