:root {
  color-scheme: light dark;
  --bg: #f7f5ef;
  --surface: #eeece5;
  --fg: #1f211d;
  --muted: #62645c;
  --accent: #ef5b36;
  --accent-text: #b94428;
  --rule: rgba(31, 33, 29, 0.2);
  --sans: "DM Sans", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #23231f;
    --surface: #292925;
    --fg: #f1ede4;
    --muted: #bcb8ae;
    --accent: #ff7048;
    --accent-text: #ff7048;
    --rule: rgba(241, 237, 228, 0.18);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-text);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--fg);
  color: var(--bg);
  transform: translate(-50%, -200%);
}

.skip-link:focus {
  color: var(--bg);
  transform: translate(-50%, 0);
}

.edge-accent {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 10px;
  background: var(--accent);
}

.shell {
  width: min(1180px, calc(100% - 80px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 6.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nameplate {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}

.site-nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.45em;
}

.hero {
  display: grid;
  min-height: 690px;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  align-items: center;
  gap: clamp(48px, 7vw, 96px);
  padding: 72px 0 84px;
}

.eyebrow,
.role-context,
.role-title,
.resume-period {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(54px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.tagline {
  margin: 0 0 32px;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.08;
}

.intro {
  max-width: 34rem;
  margin-bottom: 2rem;
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  line-height: 1.5;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration-color: var(--accent-text);
  text-decoration-style: dashed;
  text-transform: uppercase;
}

.portrait {
  position: relative;
  justify-self: end;
  width: min(100%, 430px);
}

.portrait::before {
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--accent);
  content: "";
}

.portrait img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 34%;
  filter: grayscale(1) contrast(1.03);
}

.profile,
.career,
.elsewhere {
  padding: clamp(5rem, 10vw, 9rem) 0;
  border-top: 1px solid var(--rule);
}

.plain-heading,
.career h2,
.now h2,
.elsewhere h2,
.writing h2,
.connect h2 {
  margin-bottom: 2rem;
  font-size: clamp(2.25rem, 4.3vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.profile-lead {
  max-width: 27ch;
  margin-bottom: 2.25rem;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.1vw, 4rem);
  line-height: 1.04;
}

.profile-aside {
  max-width: 39rem;
  margin-bottom: 0;
  margin-left: auto;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.career-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(2rem, 7vw, 8rem);
}

.career-layout h2 {
  margin: 0;
}

.career-story {
  max-width: 43rem;
}

.career-story p {
  font-size: clamp(1.05rem, 1.5vw, 1.23rem);
}

.career-story p:first-child {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.1vw, 3rem);
  line-height: 1.1;
}

.career-story .text-link {
  margin-top: 1rem;
}

.now {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--surface);
}

.now-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 7vw, 8rem);
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}

.now-header h2,
.now-header p {
  margin: 0;
}

.now-header p {
  max-width: 35rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
}

.roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(50px, 8vw, 110px);
}

.role {
  padding-top: 28px;
  border-top: 2px solid var(--accent);
}

.role-context {
  margin-bottom: 2.5rem;
  color: var(--muted);
}

.role h3 {
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.role-title {
  margin-bottom: 1.5rem;
  color: var(--accent-text);
}

.role-copy {
  max-width: 33rem;
  min-height: 7.7rem;
  margin-bottom: 2rem;
}

.role a,
.elsewhere-copy a,
.writing-header > a {
  color: var(--accent-text);
  text-decoration-color: var(--accent-text);
  text-decoration-style: dashed;
}

.role a {
  font-size: 0.88rem;
  font-weight: 600;
}

.elsewhere {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 8rem);
}

.elsewhere h2 {
  margin: 0;
}

.elsewhere-copy {
  max-width: 44rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.7rem);
  line-height: 1.12;
}

.elsewhere-copy p {
  margin: 0;
}

.writing {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--surface);
}

.writing-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.writing-header h2 {
  margin: 0;
}

.writing-header h2 a {
  color: var(--accent-text);
  text-decoration-color: var(--accent-text);
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
}

.writing-header > a {
  flex: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(34px, 6vw, 76px);
}

.feed-loading,
.feed-fallback {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.feature-post,
.small-post {
  display: block;
  text-decoration: none;
}

.feature-post img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 540px;
  filter: saturate(0.78);
}

.small-posts {
  display: flex;
  flex-direction: column;
}

.small-post {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--rule);
}

.small-post + .small-post {
  padding-top: 34px;
}

.small-post img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 260px;
  margin-bottom: 18px;
  filter: saturate(0.78);
}

.connect {
  padding: clamp(4rem, 8vw, 7rem) 0 0;
  border-top: 1px solid var(--rule);
}

.connect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.connect h2 {
  max-width: 16ch;
  margin: 0;
}

.socials {
  display: flex;
  gap: 13px;
}

.socials a {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--rule);
  font-size: 18px;
  text-decoration: none;
}

.socials a:hover {
  border-color: var(--accent-text);
  background: var(--accent-text);
  color: var(--bg);
}

.site-footer {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.78rem;
}

.resume-intro,
.resume-section > .shell {
  display: grid;
  grid-template-columns: minmax(170px, 0.3fr) minmax(0, 1fr);
  gap: clamp(50px, 8vw, 110px);
}

.resume-intro {
  padding-block: 110px 125px;
}

.resume-intro h1 {
  margin: 0;
  font-size: clamp(50px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.resume-summary p {
  max-width: 39rem;
  margin-bottom: 1.5rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.resume-summary > a {
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration-color: var(--accent-text);
  text-decoration-style: dashed;
  text-transform: uppercase;
}

.resume-section {
  padding-block: clamp(4.5rem, 8vw, 7rem);
  border-top: 1px solid var(--rule);
}

.resume-section h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.experience {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 42px;
  padding-bottom: 64px;
}

.experience + .experience {
  padding-top: 64px;
  border-top: 1px solid var(--rule);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.meta p {
  margin-bottom: 0.3rem;
}

.experience .role {
  padding-top: 0;
  border-top: 0;
}

.experience .role h3,
.education h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.role h3 a,
.education h3 a,
.support-list a {
  color: var(--accent-text);
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
}

.experience .role h3 i {
  font-size: 0.5em;
}

.experience .role-title {
  margin-bottom: 1.5rem;
  color: var(--accent-text);
}

.experience .role ul {
  padding-left: 1.2rem;
}

.experience .role li + li {
  margin-top: 0.65rem;
}

.education p {
  margin-bottom: 0;
  color: var(--muted);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span {
  padding: 8px 12px;
  border: 1px solid var(--rule);
  color: var(--muted);
}

.support-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.support-list li {
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 44px, 1180px);
  }

  .edge-accent {
    width: 8px;
  }

  .site-header {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding-block: 20px;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 10px 20px;
  }

  .site-nav a,
  .text-link,
  .role a,
  .writing-header a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 56px;
    padding-block: 64px 72px;
  }

  .portrait {
    justify-self: start;
    width: min(88%, 410px);
  }

  .profile,
  .career,
  .elsewhere,
  .now,
  .writing {
    padding: 4.5rem 0;
  }

  .career-layout,
  .roles,
  .elsewhere,
  .post-layout,
  .resume-intro,
  .resume-section > .shell,
  .experience {
    grid-template-columns: 1fr;
  }

  .career-layout,
  .elsewhere,
  .resume-intro,
  .resume-section > .shell,
  .experience {
    gap: 1.75rem;
  }

  .now-header,
  .writing-header,
  .connect-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .now-header {
    display: flex;
    gap: 1.75rem;
  }

  .profile-aside {
    margin-left: 0;
  }

  .role-copy {
    min-height: 0;
  }

  .writing-header,
  .connect-row {
    gap: 1.5rem;
  }

  .resume-intro {
    padding-block: 4.5rem 5rem;
  }

  .experience {
    padding-bottom: 3rem;
  }

  .experience + .experience {
    padding-top: 3rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
