@font-face {
  font-family: "Sans-Serif";
  src: url("src/fonts/Sans-Serif-Medium-Italics.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Sans-Serif";
  src: url("src/fonts/Sans-Serif-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Sans";
  src: url("src/fonts/Sans-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #1c1c1b;
  --text-body: #f2f1ee;
  --text-strong: #f2f1ee;
  --text-footer: #f2f1ee;
  --text-soft: rgb(242 241 238 / 72%);
  --selection-bg: #00000068;
  --selection-text: #f2f1ee;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: "Sans-Serif", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.1px;
}

.container {
  width: min(36vw, 740px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
}

.profile-bio-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  opacity: 0;
  animation: reveal 0.45s ease-out 0.08s forwards;
}

.profile h1 {
  color: var(--text-strong);
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile {
  position: relative;
}

.profile-heading {
  display: block;
}

.profile-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: 0;
  right: 0;
  transform-origin: center;
  transition: transform 0.24s ease;
  z-index: 2;
}

.profile-photo:hover,
.profile-photo:focus-visible {
  transform: scale(3);
}

@media (hover: none), (pointer: coarse) {
  .profile-photo:hover,
  .profile-photo:focus-visible {
    transform: scale(2);
  }
}

.profile .title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  font-style: italic;
  display: inline-block;
  background:
    linear-gradient(
      90deg,
      transparent calc(50% - 20px),
      var(--text-strong) calc(50%),
      transparent calc(50% + 20px)
    ),
    linear-gradient(var(--text-soft), var(--text-soft));
  background-size: 250% 100%, auto;
  background-repeat: no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4.8s ease-in-out infinite;
}

.bio {
  opacity: 0;
  animation: reveal 0.45s ease-out 0.18s forwards;
}

.bio p {
  color: var(--text-body);
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 20px;
}

.bio-company {
  cursor: pointer;
}

.bio p:last-child {
  margin-bottom: 0;
}

.bio strong {
  font-style: normal;
  font-weight: 700;
  color: var(--text-strong);
}

.bio a {
  all: unset;
  cursor: pointer;
}

.projects {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-body);
  opacity: 0;
  animation: reveal 0.45s ease-out 0.28s forwards;
  margin-top: -10px;
}

.projects ul {
  list-style: none;
}

.projects li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  transition: opacity 0.2s ease;
}

.projects li:last-child {
  margin-bottom: 0;
}

.projects li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--text-strong);
  opacity: 0.7;
}

.projects a {
  color: inherit;
  text-decoration: none;
  display: block;
  transition: opacity 0.2s ease;
}

.projects strong {
  color: var(--text-strong);
  font-style: normal;
  font-weight: 700;
}

.footer-content {
  color: var(--text-footer);
  display: flex;
  align-items: center;
  margin-top: -6px;
  opacity: 0;
  animation: reveal 0.45s ease-out 0.38s forwards;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.social-icon {
  width: 20px;
  height: 20px;
  color: var(--text-strong);
  opacity: 0.72;
  text-decoration: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.social-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.social-links:hover .social-icon,
.social-links:focus-within .social-icon {
  opacity: 1;
}

.social-links:hover .social-icon:not(:hover),
.social-links:focus-within .social-icon:not(:focus-visible) {
  opacity: 0.38;
}

.social-icon:hover,
.social-icon:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

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

@keyframes shimmer {
  0% {
    background-position: 100% center;
  }

  66.67% {
    background-position: 0% center;
  }

  100% {
    background-position: 0% center;
  }
}

@media (max-width: 1100px) {
  .container {
    width: min(44vw, 740px);
  }
}

@media (max-width: 800px) {
  .container {
    width: min(60vw, 740px);
  }

  .projects a:hover {
    opacity: 1;
  }
}

@media (max-width: 500px) {
  .container {
    width: min(84vw, 740px);
    padding: 18px;
  }

  .profile h1,
  .profile .title,
  .bio p,
  .projects {
    font-size: 15px;
    line-height: 20px;
  }

  .profile h1 {
    font-size: 18px;
  }

  .projects li::before {
    width: 5px;
    height: 5px;
  }

  .footer-content {
    justify-content: flex-start;
  }

  .profile-heading {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-bio-wrapper,
  .bio,
  .projects,
  .footer-content {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .profile .title {
    animation: none;
  }

  .projects li,
  .projects a,
  .social-icon,
  .profile-photo {
    transition: none;
  }
}

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

::-moz-selection {
  background: #00000040;
  color: var(--text-strong);
}
