:root {
  --bg: rgb(20, 20, 20);
  --primary: rgb(232, 232, 232);
  --secondary: rgb(138, 138, 138);
  --btn-color: rgb(25, 25, 25);
  --btn-hover: rgb(30, 30, 30);
  --bd-light: hsla(0, 0%, 53%, .2);
  --bd-dark: rgb(35, 35, 35);
  --dark: rgb(15, 15, 15);
  --page-width: 808px;
  --ease-fn: cubic-bezier(0.32, 0.72, 0, 1);
  scroll-behavior: smooth;
}

/* Reset styles */
*,
::after,
::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background-color: hsla(0, 0%, 53%, .2);
}

body {
  background-color: var(--bg);
  color: var(--primary);
  font-family: "Helvetica Neue", sans-serif;
  padding: 2rem;
  line-height: 1.6;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

h2 {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.82;
  color: var(--primary);
  margin-top: 88px;
}

p {
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

.flex {
  display: flex;
}

.page-container {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.title {
  h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    margin-left: 5px;
  }

  p {
    font-size: 0.95rem;
    color: var(--secondary);
    margin: 0;
  }

  a {
    text-decoration: none;
    color: var(--primary);
  }
}


.logo {
  color: var(--bg);
  font-size: 2rem;
  font-weight: bold;
  position: absolute;
  background: var(--primary);
  width: 46px;
  height: 46px;
  transition: all 0.2s;
}

.dotted-underline {
  color: hsla(0, 0%, 100%, .9);
  text-decoration-line: underline;
  text-decoration-color: hsla(0, 0%, 53%, .9);
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.custom-link {
  border-radius: 8px;
  border: 1px solid transparent;
  display: inline-block;
  font-weight: 500;
  background-color: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.9);
  transform: scale(1);
  transition-duration: 0.4s;
  transition-timing-function: var(--ease-fn);
  /* Add space to expand on hover*/
  padding-left: 0.25rem;
  padding-right: 0.25rem;

  &:hover {
    background-color: var(--dark);
    border-color: rgba(135, 135, 135, 0.2);
    color: rgb(255, 255, 255);
    transform: scale(1.03);
    transition-duration: 0.12s;
  }
}

.intro {
  margin-top: 4rem;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  justify-content: center;
}

@media (min-width: 1080px) {
  .gallery {
    --gallery-width: 980px;
    width: var(--gallery-width);
    margin-left: calc((var(--gallery-width) - var(--page-width)) / -2);
  }
}

.darken {
  color: var(--secondary);
}

.about-me {
  margin-top: 2rem;
  margin-bottom: 4rem;
  line-height: 1.7;
}

.last-edited {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 1.5rem;

  p {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--secondary);
  }
}

.site-footer {
  border-top: 1px solid var(--bd-light);
  padding-top: 2rem;
  font-size: 0.9rem;
  color: var(--secondary);

  strong {
    color: var(--primary);
  }

  p {
    margin: 0;
  }
}

#STALKER {
  pointer-events: none;
  position: fixed;
  left: 0;
  top: 0;
}

.stalker-inner {
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 0.75rem;
  border: 1px solid var(--bd-light);
  background-color: hsla(0, 0%, 6%, .8);
  padding: 0.5rem 0.75rem;
  opacity: 0;
  backdrop-filter: blur(8px);
  filter: blur(16px);
  transition-duration: 1.2s;
  transition-timing-function: var(--ease-fn);
  margin-left: -112px;
}

.stalker-link {
  font-size: 0.75rem;
  color: var(--secondary);
}

.stalker-icon {
  width: 1rem;
  height: auto;
  color: var(--secondary);
}

.button {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  border: 1px solid var(--bd-dark);
  background-color: var(--btn-color);
  margin-top: 1rem;
  padding: 7px 16px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition-duration: 0.4s;
  transition-timing-function: var(--ease-fn);
  transform: scale(1);

  &:hover {
    background-color: var(--btn-hover);
    transform: scale(1.02);
    transition-duration: 0.12s;
  }
}

.button--lg {
  gap: 12px;
  padding: 9px 20px;
  font-size: 16px;
}

.button__label {
  font-size: 12px;
  font-weight: 500;
  color: inherit;
}

.button--lg .button__label {
  font-size: 15px;
}

.button__icon {
  width: 18px;
  color: var(--secondary);
}

.button--lg .button__icon {
  width: 20px;
}

@media (min-width: 768px) {
  .button {
    gap: 12px;
    padding: 9px 20px;
    font-size: 16px;
  }

  .button__label {
    font-size: 15px;
  }

  .button__icon {
    width: 20px;
  }
}

.button:active,
.custom-link:active,
.gallery-item:has(.gallery-link:active) {
  transform: scale(0.98);
  transition-duration: 0.12s;
}

.artical-card {
  position: relative;
  border-radius: 0.75rem;
  border: 1px solid var(--bd-light);
  background-color: var(--dark);
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto;
  margin-top: 0.875rem;
  width: 100%;
  font-size: 14.5px;
  line-height: 1;

  p {
    margin: 0;
  }
}

.artical-title {
  font-weight: 500;
  line-height: 1.82;
  color: var(--primary);
  font-size: 16px;
}

.artical-desc {
  margin-top: 0.25rem;
  font-size: 14.5px;
  line-height: 1.82;
  color: rgba(255, 255, 255, 0.5);
}

.artical-demo {
  margin-top: 2rem;
  margin-bottom: 2rem;
  display: flex;
  width: 100%;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--bd-dark);
  padding-top: 9rem;
  padding-bottom: 9rem;
  font-weight: 500;
  background-image: linear-gradient(rgba(0, 0, 0, 0.2) 0%, rgb(15, 15, 15) 80%),
    repeating-radial-gradient(circle at 50% 50%, rgb(45, 45, 45) 0, rgb(30, 30, 30) 32px);
}

.artical-date {
  width: 100%;
  text-align: right;
  line-height: 1.82;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin-top: 0;
}

.shine {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  width: 100%;
  background-image: linear-gradient(90deg, hsla(228, 2%, 48%, 0) 7%, hsla(228, 2%, 48%, .25) 50%, hsla(228, 2%, 48%, .5) 67%, hsla(228, 2%, 48%, 0) 93%);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  filter: grayscale(100%);
  transition-duration: 1s;
  transition-timing-function: var(--ease-fn);
  list-style: none;

  &:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
  }
}

.gallery-link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  border-radius: 1rem;
  border: 1px solid var(--bd-light);
  padding: 0.25rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.gallery-image-wrapper {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--bd-light);
  background-color: var(--dark);
  padding: 2px;
}

.gallery-image-inner {
  overflow: hidden;
  height: 100%;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--bd-dark);
  aspect-ratio: 1200 / 630;
  background-color: rgba(20, 20, 20, 0);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-block;
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.5);
  padding: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.gallery-btn {
  margin-top: 0.25rem;
  display: block;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--bd-dark);
  background-color: var(--btn-color);
  padding-top: 14px;
  padding-bottom: 14px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transform: scale(1);
  transition-duration: 0.4s;
  transition-timing-function: var(--ease-fn);
  cursor: pointer;
}

.gallery-item:hover .gallery-btn {
  background-color: var(--btn-hover);
  transition-duration: 0.12s;
}

.gallery-item:hover .gallery-btn-label {
  transform: scale(1.03);
  transition-duration: 0.12s;
}

.gallery-btn-label {
  display: inline-block;
  transform: scale(1);
  transition-duration: 0.4s;
  transition-timing-function: var(--ease-fn);
}

.gallery-spotlight {
  position: absolute;
  inset: 0;
  margin: auto;
  pointer-events: none;
}