:root {
  --sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Palatino, Georgia, Times, serif;
  --heading: "Georgia", serif;
  --branding: #cd212a;
  --liked: #01a7fe;
  --shared: #ff7b3a;
  --base: hsl(220, 11%, 11%);
  --text: hsl(210, 9%, 97%);
  --accent: hsl(0, 0%, 60%);
  --hover: rgba(255, 255, 255, 0.05);
}

@view-transition {
  navigation: auto;
}

@keyframes move-out {
  to {
    transform: translateX(-25%);
    opacity: 0;
  }
}

@keyframes move-in {
  from {
    transform: translateX(25%);
    opacity: 0;
  }
}

::view-transition-old(root) {
  animation: 200ms ease-in-out both move-out;
}

::view-transition-new(root) {
  animation: 200ms ease-in-out both move-in;
}

* {
  scrollbar-width: thin;
}

html {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  margin: 0;
  font-family: var(--serif);
  background: var(--base);
  color: var(--text);
  font-size: 1.625rem;
  transition: background-color 1s ease;
  position: relative;
}

body::after {
  content: "";
  position: absolute;
  width: 100%;
  background: var(--highlight);
  top: 0;
  height: 10px;
  left: 0;
}

::selection {
  background: var(--text);
  color: var(--base);
}

a {
  padding: 5px 5px;
  font-size: 0.7rem;
  color: var(--accent);
  font-family: var(--sans-serif);
  text-transform: uppercase;
  margin: auto;
  user-select: none;
  letter-spacing: 1px;
  text-decoration: none;
  transition: color 1s ease;
}

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

main {
  max-width: 33em;
  margin: 0 auto;
  padding: 6em 1.5em;
  display: flex;
  flex-direction: column;
  gap: 2.5em;
}

time {
  user-select: none;
  font-family: var(--sans-serif);
  text-transform: uppercase;
  font-size: 0.55em;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-align: center;
  transition: color 1s ease;
}

h1 {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.8em;
  line-height: 1.2em;
  margin: 0;
  text-align: center;
  transition: color 1s ease;
}

article {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

article p {
  line-height: 1.7em;
  margin: 0;
  transition: color 1s ease;
}

article video,
article img,
article iframe,
article audio,
article canvas,
article svg,
article picture,
article embed,
article object {
  background: var(--hover);
  max-width: 100%;
  width: 100%;
  outline-offset: -2px;
  object-fit: cover;
  border-radius: 10px;
  max-height: 500px;
}

mark {
  background: transparent;
  color: var(--accent);
  padding: 0.45em 0.65em 0.35em 0.65em;
  font-size: 0.55em;
  font-family: var(--sans-serif);
  text-transform: uppercase;
  font-weight: 700;
  user-select: none;
  letter-spacing: 2px;
  margin: auto;
}

nav {
  display: flex;
  padding: 2em 1em;
  border-top: 0.5px solid var(--accent);
}

button {
  width: 40px;
  height: 40px;
  margin: auto;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  fill: var(--text);
  user-select: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

button.back {
  position: fixed;
  left: 20px;
  top: 30px;
}

button svg {
  width: 16px;
  height: 16px;
  transition:
    scale 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55),
    fill 1s ease;
}

button.liked svg {
  fill: var(--liked);
  scale: 1.5;
}

button.shared svg {
  fill: var(--shared);
}

@media (min-width: 2560px) {
  body {
    font-size: 1.5rem;
  }
}

@media (max-width: 1920px) {
  body {
    font-size: 1.375rem;
  }
}

@media (max-width: 1680px) {
  body {
    font-size: 1.25rem;
  }
}

@media (max-width: 1280px) {
  body {
    font-size: 1.125rem;
  }
}

@media (max-width: 1024px) {
  body {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.875rem;
  }
}

@media (max-width: 275px) {
  body {
    font-size: 0.75rem;
  }
}
