:root {
  --bg: #faf7f0;
  --border: #e7ddcc;
  --ink: #081533;
  --muted: #3e4a63;
  --blue: #2f86b7;
  --blue-soft: #d8edf7;
  --panel: #ffffffcc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

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

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  pointer-events: none;
}

.hero-bg-right {
  right: -180px;
  top: -40px;
  width: 540px;
  height: 540px;
  background: #cfe8f5;
}

.hero-bg-left {
  left: -200px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  background: #f4dfb8;
}

.top-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.1rem 0;
}

.brand {
  font-family: "IBM Plex Mono", "SF Mono", monospace;
  font-size: 0.95rem;
  color: #2e3f5f;
}

.menu-links {
  display: none;
  gap: 2rem;
  color: #35435c;
}

.hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  padding: 3.5rem 0 6rem;
}

.pill {
  display: inline-block;
  margin: 0 0 1.3rem;
  border: 1px solid var(--border);
  background: #ffffffc9;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  color: #44526b;
}

h1 {
  margin: 0;
  font-size: clamp(2.9rem, 8vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 2rem);
  line-height: 1.45;
  margin: 2rem 0 1rem;
}

.meta {
  color: #62708b;
  font-family: "IBM Plex Mono", "SF Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.8;
}

.cta-row {
  margin-top: 2rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 1rem;
  padding: 0.95rem 1.5rem;
  border: 1px solid transparent;
  font-weight: 600;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-outline {
  border-color: #d8cbb8;
  background: #ffffffb8;
}

.focus-card {
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 14px 34px #1a2a3b12;
  padding: 1rem;
}

.avatar-shell {
  background: linear-gradient(155deg, #d9edf7, #c4deec);
  border: 1px solid #c9dfeb;
  border-radius: 1.4rem;
  min-height: 320px;
  padding: 0.45rem;
  overflow: hidden;
  box-shadow: inset 0 1px 0 #f2f8fb;
}

.avatar-shell img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
  object-fit: cover;
  object-position: center 34%;
  border-radius: 1.15rem;
  filter: saturate(1.03) contrast(1.04);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.focus-card:hover .avatar-shell img {
  transform: scale(1.02);
}

.avatar-shell.avatar-editorial {
  padding: 0.38rem;
}

.avatar-shell.avatar-editorial img {
  object-position: center 22%;
  transform: scale(1.07);
}

.focus-card:hover .avatar-shell.avatar-editorial img {
  transform: scale(1.09);
}

.focus-label,
.kicker {
  margin: 1.2rem 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font: 600 0.72rem/1.4 "IBM Plex Mono", "SF Mono", monospace;
  color: #2f86b7;
}

.focus-text {
  margin: 0;
  color: #46546f;
  line-height: 1.55;
}

.social-links {
  margin-top: 1rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.social-link {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid #c9dce8;
  background: #f5fbff;
  color: #245f83;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.social-link i {
  font-size: 1.1rem;
  line-height: 1;
}

.social-link:hover {
  transform: translateY(-1px);
  border-color: #9dc5dd;
  background: #e9f5fb;
}

.social-link:focus-visible {
  outline: 2px solid #2f86b7;
  outline-offset: 2px;
}

.about,
.writing,
.contact {
  padding: 5.2rem 0;
}

.about-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.about-grid p {
  margin: 0;
  color: #4b5a75;
  line-height: 1.7;
  font-size: 1.05rem;
  max-width: 36ch;
}

.about-grid > :only-child {
  grid-column: 1 / -1;
}

.about .work-intro {
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.75;
  max-width: 68ch;
  color: #34435d;
  text-wrap: pretty;
}

.about h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.about .work-heading {
  font-size: clamp(1.34rem, 2.15vw, 2rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 640;
  max-width: 34ch;
  text-wrap: balance;
}

.post-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: #fff;
  padding: 1.35rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.post-date {
  margin: 0;
  font: 500 0.78rem/1.3 "IBM Plex Mono", "SF Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7891;
}

.tag {
  margin: 0;
  display: inline-block;
  background: #e6f3f8;
  color: #1f6f99;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  justify-self: start;
  width: fit-content;
}

.post-card h3 {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.18rem;
}

.post-card p {
  margin: 0;
  color: #4f5b73;
}

.research {
  background: #eef3f7;
  padding: 4.5rem 0;
}

.research-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.warm {
  color: #b86716;
}

.links {
  display: grid;
  gap: 0.8rem;
}

.links a {
  border: 1px solid #d7e3ea;
  border-radius: 1rem;
  background: #ffffffb5;
  padding: 0.95rem 1.1rem;
}

.contact-card {
  background: #0e172b;
  color: #fff;
  border-radius: 2rem;
  padding: 2rem;
}

.contact-kicker {
  color: #fde2b0;
  margin-top: 0;
}

.content-hero-wrap {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.content-head {
  position: relative;
  z-index: 2;
  padding: 2.4rem 0 3.2rem;
}

.content-title {
  margin: 0.35rem 0 0;
  max-width: 18ch;
  text-wrap: balance;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.07;
  letter-spacing: -0.025em;
}

.content-meta {
  margin: 1rem 0 0;
  font: 500 0.8rem/1.35 "IBM Plex Mono", "SF Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7891;
}

.origin-pop {
  --origin-bg: oklch(0.94 0.03 238);
  --origin-bg-hover: oklch(0.9 0.045 238);
  --origin-border: oklch(0.8 0.055 238);
  --origin-ink: oklch(0.37 0.085 242);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--origin-border);
  border-radius: 999px;
  background: var(--origin-bg);
  color: var(--origin-ink);
  padding: 0.38rem 0.72rem;
  text-decoration: none;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), background-color 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.origin-pop .origin-pop-label {
  letter-spacing: 0.1em;
}

.origin-pop .origin-pop-icon {
  display: inline-flex;
  transform: translateY(0);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.origin-pop:hover {
  transform: translateY(-1px);
  background: var(--origin-bg-hover);
  border-color: oklch(0.74 0.065 238);
  box-shadow: 0 8px 20px oklch(0.45 0.05 242 / 0.14);
}

.origin-pop:hover .origin-pop-icon {
  transform: translate(1px, -1px);
}

.origin-pop:focus-visible {
  outline: 2px solid oklch(0.61 0.12 242);
  outline-offset: 2px;
}

.origin-pop-inline {
  margin-top: 0.15rem;
}

.content-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-media-wrap {
  position: relative;
  z-index: 2;
  margin-top: -0.65rem;
  padding-bottom: 2.4rem;
}

.hero-media {
  margin: 0;
  border: 1px solid #d6e3ec;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #f2f8fc;
  box-shadow: 0 16px 34px #1a2a3b14;
  transform: translateY(0);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.content-hero-wrap:hover .hero-media {
  transform: translateY(-2px);
}

.hero-media img {
  width: 100%;
  max-height: min(52vh, 560px);
  display: block;
  object-fit: cover;
  object-position: center;
}

.hero-media figcaption {
  margin: 0;
  padding: 0.72rem 0.95rem 0.82rem;
  color: #5c6b84;
  font: 500 0.77rem/1.45 "IBM Plex Mono", "SF Mono", monospace;
  letter-spacing: 0.04em;
}

.hero-media figcaption p {
  margin: 0;
}

.content-article {
  padding: 3rem 0 1.4rem;
}

.content-prose {
  max-width: 72ch;
  margin: 0 auto;
  color: #21304b;
  font-size: 1.03rem;
  line-height: 1.78;
}

.content-prose > :first-child {
  margin-top: 0;
}

.content-prose h2,
.content-prose h3,
.content-prose h4 {
  color: var(--ink);
  line-height: 1.24;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.content-prose h2 {
  margin: 2.3rem 0 0.75rem;
  font-size: clamp(1.5rem, 2.7vw, 2.1rem);
}

.content-prose h3 {
  margin: 1.9rem 0 0.6rem;
  font-size: clamp(1.2rem, 2.1vw, 1.55rem);
}

.content-prose p,
.content-prose li {
  text-wrap: pretty;
}

.content-prose a {
  color: #1f6f99;
  text-decoration: underline;
  text-decoration-color: #9dc9df;
  text-underline-offset: 0.18em;
}

.content-prose blockquote {
  margin: 1.5rem 0;
  padding: 0.95rem 1.05rem;
  border: 1px solid #dce9f1;
  border-radius: 1rem;
  background: #f4f9fc;
  color: #2a3e56;
}

.content-prose pre {
  margin: 1.4rem 0;
  border: 1px solid #dbe7ef;
  border-radius: 1rem;
  background: #f7fbfe;
  padding: 0.9rem 1rem;
  overflow-x: auto;
}

.content-prose code {
  font-size: 0.92em;
}

.content-listing {
  padding: 2.5rem 0 3.5rem;
}

.pagination {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pagination-link {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: #ffffffd1;
  color: #2e3f5f;
  padding: 0.5rem 0.8rem;
  font: 600 0.82rem/1.25 "IBM Plex Mono", "SF Mono", monospace;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pagination-link:hover {
  border-color: #c8dbe6;
  background: #f3f9fc;
}

.pagination-link.is-active {
  border-color: #9ec8de;
  background: #e6f3f8;
  color: #1f6f99;
}

.content-intro {
  margin-top: 0.9rem;
  max-width: 64ch;
  color: #47546d;
}

.content-next {
  padding: 0.4rem 0 4rem;
}

.back-linkblog {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-color: oklch(0.82 0.03 240);
  background: oklch(0.97 0.012 238);
  color: oklch(0.3 0.04 244);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 260ms cubic-bezier(0.22, 1, 0.36, 1), background-color 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.back-linkblog-icon {
  display: inline-flex;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.back-linkblog:hover {
  transform: translateY(-1px);
  border-color: oklch(0.74 0.05 238);
  background: oklch(0.95 0.018 238);
  box-shadow: 0 8px 20px oklch(0.45 0.05 242 / 0.12);
}

.back-linkblog:hover .back-linkblog-icon {
  transform: translateX(-1px);
}

.back-linkblog:focus-visible {
  outline: 2px solid oklch(0.61 0.12 242);
  outline-offset: 2px;
}

.btn-light {
  background: #fff;
  color: #101d35;
}

.btn-ghost {
  border-color: #ffffff33;
  color: #fff;
}

.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  color: #6a7791;
  padding: 2rem 1rem;
}

@media (min-width: 900px) {
  .menu-links {
    display: flex;
  }
}

@media (max-width: 899px) {
  .hero,
  .about-grid,
  .post-grid,
  .research-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 1rem;
  }

  .about h2 {
    max-width: none;
  }

  .about .work-heading {
    font-size: clamp(1.22rem, 4.9vw, 1.58rem);
    line-height: 1.42;
    letter-spacing: -0.006em;
    max-width: 30ch;
    text-wrap: pretty;
  }

  .about-grid p {
    max-width: none;
  }

  .about .work-intro {
    font-size: clamp(1rem, 3.9vw, 1.14rem);
    line-height: 1.72;
    max-width: 58ch;
  }

  .avatar-shell {
    min-height: 260px;
  }

  .avatar-shell img {
    min-height: 260px;
    object-position: center 30%;
  }

  .avatar-shell.avatar-editorial img {
    object-position: center 24%;
    transform: scale(1.08);
  }

  .content-head {
    padding: 1.5rem 0 2.2rem;
  }

  .content-title {
    max-width: 100%;
  }

  .content-prose {
    font-size: 1rem;
    line-height: 1.72;
  }

  .content-article {
    padding-top: 2rem;
  }

  .hero-media-wrap {
    margin-top: -0.3rem;
    padding-bottom: 1.7rem;
  }
}
