* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --fg: #222;
  --muted: #999;
  --rule: #e0e0e0;
  --sans: 'Instrument Sans', Helvetica, Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}

html { font-size: 17px; }

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--fg);
  background: #fff;
  line-height: 1.75;
  max-width: 720px;
  padding: 3rem 2rem;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.04;
  background-image: url('botanical.svg');
  background-repeat: no-repeat;
  background-position: center right;
  background-size: contain;
  z-index: -1;
  animation: fern-in 3s ease-out both, sway 20s ease-in-out 3s infinite;
  transform-origin: bottom center;
}

.post-page::before {
  animation: sway 20s ease-in-out infinite;
  opacity: 0.04;
}

@keyframes fern-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 0.04;
    transform: translateY(0) scale(1);
  }
}

@keyframes sway {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  30% { transform: rotate(1.2deg) translateY(-6px); }
  60% { transform: rotate(-0.8deg) translateY(4px); }
  80% { transform: rotate(0.5deg) translateY(-2px); }
}

::selection {
  background: var(--fg);
  color: #fff;
}

a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

a:hover {
  border-color: var(--fg);
}

/* nav */

nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  font-size: 0.9rem;
  animation: rise 0.8s ease-out both;
}

nav a {
  border: none;
  color: var(--muted);
  transition: color 0.3s;
}

nav a.active,
nav a:hover {
  color: var(--fg);
}

/* tabs */

.tab {
  display: none;
}

.tab.active {
  display: block;
  animation: fade 0.6s ease both;
}

.tab.active h1 {
  animation: rise 0.6s ease both;
  animation-delay: 0.05s;
}

.tab.active p,
.tab.active ul,
.tab.active article,
.tab.active .ig-embed,
.tab.active .social-icons {
  animation: fade 0.7s ease both;
  animation-delay: 0.15s;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* portrait */

.portrait {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.2rem;
  filter: grayscale(100%);
  animation: fade 1s ease both;
  animation-delay: 0.2s;
  transition: filter 0.6s ease;
}

.portrait:hover {
  filter: grayscale(0%);
}

/* type */

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1.2rem;
  color: #444;
}

.quiet {
  margin-top: 2rem;
  color: var(--muted);
}

.quiet a {
  color: var(--muted);
}

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

/* social icons */

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-icons a {
  color: var(--muted);
  border: none;
  transition: color 0.3s;
  display: flex;
  align-items: center;
}

.social-icons a:hover {
  color: var(--fg);
}

/* press */

ul {
  list-style: none;
}

li {
  padding: 0.4rem 0;
  border-top: 1px solid var(--rule);
  transition: padding-left 0.3s ease;
}

li:hover {
  padding-left: 0.3rem;
}

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

li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
}

li a:hover {
  opacity: 0.5;
}

li a .icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-left: 1rem;
  opacity: 0.35;
}

li a:hover .icon {
  opacity: 0.6;
}

li span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* photography */

.ig-embed {
  margin-top: 2rem;
  max-width: 100%;
  background: #fafafa;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem;
}

.ig-embed .instagram-media {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* blog */

article {
  margin-bottom: 2.5rem;
}

.blog-preview {
  cursor: pointer;
  transition: opacity 0.2s;
}

.blog-preview:hover {
  opacity: 0.6;
}

.read-more {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.date {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0.2rem 0 0.8rem;
}

/* post page */

.post {
  margin-bottom: 3rem;
}

.post h1 {
  margin-bottom: 2rem;
}

h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.1rem;
  margin: 2rem 0 0.8rem;
}

ol {
  padding-left: 1.2rem;
  margin-bottom: 1.2rem;
  color: #444;
}

ol li {
  border: none;
  padding: 0.15rem 0;
}

ol li:last-child {
  border: none;
}

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  border: none;
  margin-bottom: 2rem;
}

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

/* footer */

footer {
  margin-top: 4rem;
  font-size: 0.8rem;
  color: var(--muted);
  animation: fade 1.2s ease both;
  animation-delay: 0.4s;
}

footer p {
  margin-bottom: 0.3rem;
}

.legal {
  font-size: 0.65rem;
}

.legal a {
  color: var(--muted);
  border: none;
}

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

/* mobile */

@media (max-width: 600px) {
  body { padding: 2rem 1.25rem; }
  nav { margin-bottom: 2.5rem; }
}
