:root {
  --ink: #152028;
  --mist: #F3F6F8;
  --slate: #5C6B76;
  --line: #D5DEE5;
  --pacific: #1F6F8B;
  --pacific-deep: #15566C;
  --salt: #FFFFFF;
  --measure: 40rem;
  --page: min(68rem, calc(100% - 3rem));
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 60% at 0% -10%, rgba(31, 111, 139, 0.08), transparent 55%),
    linear-gradient(180deg, var(--mist) 0%, var(--salt) 38%, var(--mist) 100%);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--pacific);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--pacific-deep);
}

a:focus-visible,
.button:focus-visible,
.site-nav a:focus-visible {
  outline: 2px solid var(--pacific);
  outline-offset: 3px;
}

.site-header,
.site-main,
.site-footer {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.site-mark {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-mark:hover {
  color: var(--pacific-deep);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--slate);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.site-main {
  padding: 2.5rem 0 4rem;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--slate);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--pacific-deep);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

/* Profile */

.about-intro .profile-photo {
  display: block;
  width: min(100%, 26rem);
  height: auto;
  margin: 1.35rem 0 0;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--mist);
}

/* Homepage */

.hero {
  min-height: calc(100vh - 6.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0 4rem;
  max-width: 38rem;
}

.hero-name {
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero-role {
  margin: 1rem 0 0;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--slate);
}

.hero-lede {
  margin: 1.25rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--pacific);
  border-radius: 2px;
  background: var(--pacific);
  color: var(--salt);
  font: inherit;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:hover {
  background: var(--pacific-deep);
  border-color: var(--pacific-deep);
  color: var(--salt);
}

.button-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.button-secondary:hover {
  background: rgba(31, 111, 139, 0.08);
  border-color: var(--pacific);
  color: var(--pacific-deep);
}

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
  max-width: 42rem;
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.work-list {
  display: grid;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.work-item p {
  margin: 0;
  color: var(--slate);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.55;
}

.work-meta {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--pacific-deep);
  font-size: 0.85rem;
}

.post-list {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list a {
  color: inherit;
  text-decoration: none;
}

.post-list a:hover .post-title {
  color: var(--pacific-deep);
}

.post-title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.post-date {
  color: var(--slate);
  font-size: 0.9rem;
}

.post-summary {
  margin: 0.35rem 0 0;
  color: var(--slate);
  font-family: var(--font-serif);
  font-size: 1.02rem;
}

.contact-block p {
  margin: 0 0 0.75rem;
  max-width: 34rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
}

.contact-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.contact-links a:hover {
  color: var(--pacific-deep);
  border-bottom-color: var(--pacific);
}

.section-more {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

/* Inner pages */

.page-intro {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-intro p {
  margin: 0.9rem 0 0;
  color: var(--slate);
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.prose-page {
  max-width: var(--measure);
}

.prose-page p,
.prose-page li {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.7;
}

.prose-page p {
  margin: 0 0 1.15rem;
}

.prose-page h2 {
  margin: 2.25rem 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 500;
}

/* Resume */

.resume {
  max-width: 48rem;
}

.resume-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.resume-meta {
  margin: 0.65rem 0 0;
  color: var(--slate);
  font-size: 0.98rem;
}

.resume-meta a {
  color: var(--slate);
}

.resume-summary {
  margin: 1.5rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.65;
}

.resume-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.resume-section h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 500;
}

.resume-skills {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.resume-skills li {
  font-size: 0.98rem;
  line-height: 1.5;
}

.resume-skills strong {
  display: block;
  margin-bottom: 0.15rem;
  font-weight: 500;
}

.job {
  margin-bottom: 2rem;
}

.job-org {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.job-dates {
  color: var(--slate);
  font-size: 0.92rem;
}

.role-ladder {
  margin: 0.65rem 0 1rem;
  padding: 0;
  list-style: none;
  color: var(--slate);
  font-size: 0.95rem;
}

.role-ladder li + li {
  margin-top: 0.2rem;
}

.role-block {
  margin: 1.35rem 0 0;
}

.role-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 500;
}

.role-block ul {
  margin: 0;
  padding-left: 1.15rem;
}

.role-block li {
  margin-bottom: 0.45rem;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.55;
}

.edu-item {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.edu-item span {
  display: block;
  color: var(--slate);
  font-size: 0.95rem;
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  .hero-name,
  .hero-role,
  .hero-lede,
  .hero-actions {
    animation: hero-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-role {
    animation-delay: 90ms;
  }

  .hero-lede {
    animation-delay: 160ms;
  }

  .hero-actions {
    animation-delay: 230ms;
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  :root {
    --page: calc(100% - 2rem);
  }

  .site-main {
    padding-top: 1.75rem;
  }

  .hero {
    min-height: auto;
    padding: 1.5rem 0 3rem;
  }

  .section {
    padding: 2.5rem 0;
  }
}
