@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Fallback";
  src: local("Arial");
  ascent-override: 95.94%;
  descent-override: 28.16%;
  line-gap-override: 0%;
  size-adjust: 104.76%;
}

:root {
  --background: #f6f6f4;
  --text: #68645f;
  --strong: #111111;
  --line: #dfdedb;
  --hover: rgba(17, 17, 17, 0.045);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Geist", "Geist Fallback", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(100%, 576px);
  margin-inline: auto;
  padding: 80px 16px;
}

.profile-header,
.intro,
.compact-section,
.site-footer {
  position: relative;
  animation: enter 600ms var(--ease) both;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  animation-delay: 20ms;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.profile-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 20px;
}

.profile-copy strong {
  color: var(--strong);
  font-weight: 600;
}

.profile-copy span {
  color: var(--text);
}

.intro {
  animation-delay: 80ms;
}

.compact-section:nth-of-type(2) {
  animation-delay: 140ms;
}

.compact-section:nth-of-type(3) {
  animation-delay: 200ms;
}

.site-footer {
  z-index: 4;
  animation-delay: 280ms;
}

.intro h1 {
  margin: 0 0 16px;
  color: var(--strong);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.intro p {
  margin: 0;
  color: var(--text);
  text-wrap: pretty;
}

.intro p + p {
  margin-top: 8px;
}

.intro strong,
.row strong {
  color: var(--strong);
  font-weight: 600;
}

.email-link {
  color: var(--strong);
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size 250ms var(--ease);
}

.email-link:hover,
.email-link:focus-visible {
  background-size: 100% 1px;
}

.copy-toast {
  position: fixed;
  z-index: 100;
  top: 24px;
  right: 24px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.08), 0 1px 2px rgba(17, 17, 17, 0.04);
  color: var(--strong);
  font-size: 16px;
  line-height: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px) scale(0.98);
  transform-origin: top right;
  transition: opacity 180ms ease, visibility 180ms ease, transform 240ms var(--ease);
}

.copy-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.copy-toast-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compact-section {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.compact-section:last-of-type {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.compact-section h2 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.row {
  position: relative;
  z-index: 0;
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 4px 0;
  border-radius: 8px;
  font-size: 16px;
  line-height: 24px;
  transition:
    opacity 240ms ease,
    filter 240ms ease,
    transform 240ms var(--ease);
}

.row::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -6px;
  border-radius: 8px;
  background: var(--hover);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 180ms ease, transform 240ms var(--ease);
}

.row > div {
  min-width: 0;
}

.project-row-nowrap {
  grid-template-columns: max-content minmax(0, 1fr);
}

.project-row-nowrap > div {
  white-space: nowrap;
}

.row-description,
.row-meta {
  color: var(--text);
}

.row-meta {
  display: grid;
  min-width: 0;
  height: 24px;
  overflow: visible;
  white-space: nowrap;
  text-align: right;
}

.meta-default,
.meta-hover {
  display: block;
  grid-area: 1 / 1;
  transition: opacity 180ms ease, transform 240ms var(--ease);
}

.meta-hover {
  color: var(--strong);
  opacity: 0;
  transform: translateY(7px);
}

.row:hover,
.row:focus-visible {
  z-index: 2;
  transform: translateX(2px);
  outline: none;
}

.row:hover::before,
.row:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.work-row:hover .meta-default,
.work-row:focus-visible .meta-default {
  opacity: 0;
  transform: translateY(-7px);
}

.work-row:hover .meta-hover,
.work-row:focus-visible .meta-hover {
  opacity: 1;
  transform: translateY(0);
}

.compact-section:has(.row:hover) .row:not(:hover),
.compact-section:has(.row:focus-visible) .row:not(:focus-visible) {
  opacity: 0.42;
  filter: saturate(0.75);
}

.stack-icons {
  display: grid;
  align-items: center;
  justify-content: flex-end;
  justify-items: end;
  padding-left: 14px;
  opacity: 0.68;
  transition: opacity 200ms ease, transform 240ms var(--ease);
}

.stack-icons-default,
.project-url {
  grid-area: 1 / 1;
}

.stack-icons-default {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  transition: opacity 180ms ease, transform 240ms var(--ease);
}

.project-url {
  color: var(--strong);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 180ms ease, transform 240ms var(--ease);
}

.stack-icons img,
.stack-icon {
  width: 16px;
  height: 16px;
  display: block;
  transition: transform 240ms var(--ease);
}

.stack-lock {
  fill: none;
  stroke: var(--strong);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-row:hover .stack-icons,
.project-row:focus-visible .stack-icons {
  opacity: 1;
  transform: translateX(-2px);
}

.project-row:hover .stack-icons-default,
.project-row:focus-visible .stack-icons-default {
  opacity: 0;
  transform: translateY(-7px);
}

.project-row:hover .project-url,
.project-row:focus-visible .project-url {
  opacity: 1;
  transform: translateY(0);
}

.project-row:hover .stack-icons-default > :first-child,
.project-row:focus-visible .stack-icons-default > :first-child {
  transform: rotate(-4deg) scale(1.08);
}

.project-row:hover .stack-icons-default > :last-child,
.project-row:focus-visible .stack-icons-default > :last-child {
  transform: rotate(4deg) scale(1.08);
}

.site-footer {
  min-height: 34px;
  margin-top: 18px;
}

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

.social-link {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--strong);
  transition: background-color 200ms ease, transform 220ms var(--ease);
}

.social-link:hover,
.social-link:focus-visible {
  background: var(--hover);
  transform: translateY(-2px);
  outline: none;
}

.social-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  width: max-content;
  max-width: 180px;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--strong);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -5px) scale(0.96);
  transform-origin: center top;
  transition: opacity 160ms ease, visibility 160ms ease, transform 200ms var(--ease);
}

.social-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  border: 5px solid transparent;
  border-bottom-color: var(--strong);
  transform: translateX(-50%);
}

.social-link:hover .social-tooltip,
.social-link:focus-visible .social-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background: #d9d9d7;
  color: var(--strong);
}

:focus-visible {
  outline: 2px solid rgba(17, 17, 17, 0.45);
  outline-offset: 3px;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

@media (max-width: 560px) {
  .page-shell {
    width: 100%;
    padding: 48px 16px;
  }

  .row {
    gap: 8px;
  }

  .row-meta {
    min-width: 0;
  }

  .stack-icons {
    padding-left: 8px;
  }

  .project-row-nowrap {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .project-row-nowrap > div {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .copy-toast {
    top: 16px;
    right: 16px;
    left: 16px;
    width: max-content;
    max-width: calc(100% - 32px);
    margin-left: auto;
  }
}

@media (hover: none) {
  .social-tooltip {
    display: none;
  }
}

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

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