:root {
  color-scheme: light;
  --ink: #202522;
  --sky: #b4b6b7;
  --sans: Inter, Arial, sans-serif;
  --serif: Lora, Georgia, serif;
  --page-gutter: 5vw;
  --tree-anchor: 50%;
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --content-left: calc(var(--page-gutter) + var(--safe-left));
  --content-right: calc(var(--page-gutter) + var(--safe-right));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--sky);
  color: var(--ink);
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

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

.landscape {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--sky);
}

#sky {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  filter: blur(3px);
}

.haze {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, #e4e5e20a, transparent 45%, #5056550b);
}

.pine {
  position: absolute;
  top: 17%;
  left: var(--tree-anchor);
  width: auto;
  height: 91%;
  max-width: none;
  transform-origin: 50% 100%;
  transform: translateX(-50%) translateX(var(--tree-shift, 0vw))
    rotate(var(--tree-lean, 0deg)) scale(var(--tree-width, 1), var(--tree-size, 1));
}

.companion-tree {
  position: absolute;
  left: var(--companion-left, calc(50% + 70px));
  bottom: -6%;
  width: auto;
  height: var(--companion-height, 36%);
  max-width: none;
  opacity: var(--companion-opacity, .34);
  transform: translateX(-50%) scaleX(var(--companion-direction, 1));
}

/* Keep the distant tree low and restrained on phones, including landscape. */
@media (max-width: 900px), (pointer: coarse) {
  .companion-tree {
    bottom: -2%;
  }
}

.grain {
  position: absolute;
  inset: 0;
  opacity: .16;
  mix-blend-mode: multiply;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="180" height="180"%3E%3Cfilter id="g"%3E%3CfeTurbulence type="fractalNoise" baseFrequency=".85" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Cpath filter="url(%23g)" opacity=".65" d="M0 0h180v180H0z"/%3E%3C/svg%3E');
}

.edge {
  position: absolute;
  inset: 0;
  border: 7px solid #d1d1c84d;
  box-shadow: inset 0 0 130px #34373825;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 1;
  margin-left: var(--content-left);
  margin-right: var(--content-right);
}

.site-header {
  display: flex;
  justify-content: flex-end;
  padding-top: calc(23px + env(safe-area-inset-top, 0px));
}

.site-header nav {
  display: flex;
  gap: 25px;
}

.site-header a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  letter-spacing: .25px;
  text-decoration: none;
}

.site-header a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.profile {
  position: absolute;
  z-index: 1;
  left: var(--content-left);
  bottom: 12%;
  max-width: min(330px, calc(100vw - var(--content-left) - var(--content-right)));
}

.eyebrow {
  max-width: 330px;
  margin-bottom: 18px;
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 1px;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.05;
  letter-spacing: -1.2px;
}

.intro {
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: .1px;
}

.contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #292c2a;
  border-radius: 2px;
  background: #292c2a;
  color: #f0f1ec;
  font-size: 12px;
  text-decoration: none;
}

.contact:hover {
  background: #383d39;
  border-color: #383d39;
}

.contact:focus-visible {
  outline: 2px solid #292c2a;
  outline-offset: 4px;
}

.tagline {
  margin-top: 22px;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .25px;
}

.site-footer {
  position: absolute;
  right: 0;
  bottom: calc(35px + env(safe-area-inset-bottom, 0px));
  left: 0;
}

.est {
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .6px;
}

::selection {
  background: #202522;
  color: #f0f1ec;
}

@media (max-width: 700px) {
  :root {
    --page-gutter: 7vw;
    --tree-anchor: 62%;
  }

  .site-header {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }

  .site-header nav {
    gap: 20px;
  }

  .profile {
    top: 14%;
    bottom: auto;
    left: var(--content-left);
    max-width: min(280px, calc(100vw - var(--content-left) - var(--content-right)));
  }

  .eyebrow {
    max-width: 245px;
    margin-bottom: 12px;
    font-size: 9px;
  }

  h1 {
    font-size: 37px;
  }

  .intro {
    font-size: 12px;
  }

  .tagline {
    margin-top: 16px;
    font-size: 10px;
  }

  .pine {
    top: 38%;
    height: 85%;
  }

  .edge {
    border-width: 5px;
  }

  .site-footer {
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }
}

/* Let enlarged text and short viewports scroll instead of clipping content. */
@media (max-height: 580px) {
  .profile {
    position: relative;
    inset: auto;
    margin: 48px var(--content-right) 42px var(--content-left);
  }

  .site-footer {
    position: relative;
    inset: auto;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  h1 {
    font-size: 37px;
  }
}

@media (max-width: 700px) and (max-height: 580px) {
  :root {
    --tree-anchor: 80%;
  }

  .pine {
    top: 38%;
    height: 85%;
  }
}
