I'm not sure why the image is translating when the mouse is hovering over it. Also, let me know if there's anything I can move around or change the structure of in my HTML or CSS to make it more functional as I'm new to web development.
html {
overflow: hidden;
}
body {
background-image: url("https://images.unsplash.com/photo-1617538781871-bfe89e84b61f?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=976&q=80");
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
height: 100vh;
margin: 0;
backdrop-filter: blur(32px);
}
.image {
min-height: 500px;
border-style: solid;
border-width: 50px;
margin: auto;
display: block;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
height: 50vh;
box-shadow: 0px 0px 20px #000000;
transition: all 0.5s;
transform: translate(-50%, -50%);
}
.image:hover {
transform: scale(1.05);
box-shadow: 0px 0px 50px #000000;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/style.css">
<script src="/script.js" defer></script>
</head>
<body>
<img class="image" src="https://images.unsplash.com/photo-1617538781871-bfe89e84b61f?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=976&q=80" alt="Image">
</body>
</html>