:root {
  --text: #111315;
  --muted: #303438;
  --subtle: #454a4e;
  --link: #24567a;
  --link-hover: #123b59;
  --accent: #2c2c2a;
  --accent-soft: #f0f0ec;
  --rule: #d8d8d2;
  --paper: #fbfbf8;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --shadow-sm: none;
  --shadow-md: none;
  --radius: 2px;
  --font-body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --font-ui: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #dbe5eb;
  color: #172a36;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 140ms ease;
}

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

a:focus-visible {
  border-radius: 0;
  outline: 2px solid rgba(36, 86, 122, 0.35);
  outline-offset: 3px;
}

.page {
  width: min(820px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0 104px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 54px;
  padding: 0 0 48px;
  border-bottom: 1px solid var(--rule);
}

.profile::before {
  display: none;
}

.profile-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

h1 {
  margin: 0 0 20px;
  color: #191919;
  font-size: clamp(34px, 5vw, 45px);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.profile p {
  margin: 0 0 13px;
  color: #17191b;
}

.profile-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 23px !important;
  font-family: var(--font-ui);
}

.profile-links a {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--link);
  font-size: 14px;
  font-weight: 500;
}

.profile-links a:hover {
  background: transparent;
  color: var(--link-hover);
}

.profile-links span {
  margin: 0 9px;
  display: inline;
  color: var(--subtle);
}

.profile-photo {
  width: 176px;
  height: 176px;
  flex: 0 0 176px;
  display: block;
  border: 0;
  border-radius: 2px;
  object-fit: cover;
  object-position: center 30%;
  box-shadow: none;
  transform: none;
}

.experience,
.projects {
  margin-top: 64px;
}

h2 {
  margin: 0 0 20px;
  color: #252525;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.09em;
  line-height: 1.25;
  text-transform: uppercase;
}

h2::after {
  width: 28px;
  height: 1px;
  margin: 9px 0 0;
  display: block;
  border-radius: 0;
  background: var(--accent);
  content: "";
}

.experience-item,
.project-item {
  padding: 20px 22px;
  border: 2px solid #555b5f;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: none;
  transition: border-color 140ms ease;
}

.experience-item + .experience-item,
.project-item + .project-item {
  margin-top: 16px;
}

.experience-item:hover,
.project-item:hover {
  border-color: #303438;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

.experience-heading,
.project-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.experience-heading h3,
.project-heading h3 {
  margin: 0;
  color: #242424;
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.012em;
  line-height: 1.4;
}

.experience-heading span,
.project-heading span {
  flex: 0 0 auto;
  color: var(--subtle);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.experience-item p,
.project-item p {
  margin: 5px 0 0;
}

.experience-item .role {
  margin-top: 2px;
  color: #2d3235;
  font-family: var(--font-ui);
  font-size: 15px;
}

.project-item {
  position: relative;
}

.project-heading h3 a {
  color: var(--link);
}

.project-heading h3 a::after {
  margin-left: 7px;
  content: "\2192";
  font-size: 0.82em;
  opacity: 0.58;
}

.project-heading span {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-item p {
  max-width: 650px;
  color: #2d3235;
}

@media (max-width: 680px) {
  .page {
    width: min(100% - 32px, 540px);
    padding: 40px 0 72px;
  }

  .profile {
    align-items: flex-start;
    gap: 24px;
    padding: 0 0 38px;
  }

  .profile-photo {
    width: 128px;
    height: 128px;
    flex-basis: 128px;
    border-radius: 2px;
  }

  .experience-item,
  .project-item {
    padding: 17px 18px;
  }

  h1 {
    font-size: 33px;
  }

  .experience,
  .projects {
    margin-top: 50px;
  }
}

@media (max-width: 500px) {
  .profile {
    flex-direction: column-reverse;
  }

  .profile-photo {
    width: 136px;
    height: 136px;
  }

  .experience-item,
  .project-item {
    padding: 16px;
  }

  .experience-heading,
  .project-heading {
    display: block;
  }

  .experience-heading span,
  .project-heading span {
    width: fit-content;
    margin-top: 5px;
    display: block;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
