:root {
  --background: #ffffff;
  --foreground: #1a1a1a;
  --muted: rgba(26, 26, 26, 0.56);
  --line: rgba(26, 26, 26, 0.22);
  --soft-line: rgba(26, 26, 26, 0.1);
  --focus: #1b6f88;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.17em;
}

a:hover {
  color: var(--muted);
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  background: var(--foreground);
  color: var(--background);
  left: 12px;
  padding: 10px 14px;
  position: fixed;
  top: 12px;
  transform: translateY(-180%);
  z-index: 50;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  display: grid;
  grid-template-columns: minmax(210px, 18%) minmax(320px, 50%) minmax(160px, 18%);
  justify-content: center;
  min-height: 100vh;
}

.identity,
.content,
.right-rail {
  min-width: 0;
  padding: clamp(28px, 4vw, 56px);
}

.identity-inner {
  position: sticky;
  top: clamp(28px, 4vw, 56px);
}

.portrait {
  margin: 0 0 24px;
  max-width: 184px;
}

.portrait img {
  aspect-ratio: 1 / 1.18;
  border: 1px solid var(--soft-line);
  object-fit: cover;
  object-position: center 32%;
  width: 100%;
}

.site-title {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 18px;
  text-decoration: none;
}

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 18px;
}

.identity p {
  font-size: 0.92rem;
  margin: 0 0 16px;
}

.identity-links {
  display: grid;
  gap: 5px;
  margin-top: 32px;
}

.identity-links a {
  font-size: 0.92rem;
}

.post {
  max-width: 720px;
}

.post h1 {
  font-size: clamp(2.25rem, 4vw, 3.4rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.18;
  margin: 0 0 36px;
}

.post h2 {
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 24px;
}

.post p {
  margin: 0 0 22px;
}

.post strong {
  font-weight: 500;
}

.post hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 44px 0;
}

.podcast-card {
  margin: 26px 0 24px;
}

.podcast-card a {
  border: 1px solid var(--soft-line);
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.podcast-card img {
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  opacity: 0.92;
  width: 100%;
}

.contact-row {
  align-items: baseline;
  display: grid;
  gap: 18px;
  grid-template-columns: 88px minmax(0, 1fr);
  margin: 0 0 22px;
}

.contact-row > span {
  color: var(--muted);
}

.email-actions {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.text-button,
.copy-button {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.17em;
}

.text-button {
  align-items: baseline;
  display: inline-flex;
  gap: 8px;
}

.text-button:hover,
.copy-button:hover {
  color: var(--muted);
}

.text-button small,
.copy-button {
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 80px;
  padding-bottom: 44px;
}

.site-footer p {
  margin: 0 0 6px;
}

@media (max-width: 940px) {
  .site-shell {
    display: block;
  }

  .identity,
  .content {
    padding: 28px;
  }

  .right-rail {
    display: none;
  }

  .identity-inner {
    position: static;
  }

  .identity {
    border-bottom: 1px solid var(--line);
  }

  .portrait {
    max-width: 160px;
  }

  .identity-links {
    grid-template-columns: repeat(3, max-content);
    gap: 18px;
  }

  .post {
    max-width: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .identity,
  .content {
    padding: 22px;
  }

  .post h1 {
    font-size: clamp(2rem, 12vw, 2.7rem);
  }

  .identity-links {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
