/* Inter Variable, self-hosted (from @fontsource-variable/inter) */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --background: #171717;
  --foreground: #ededed;
  --soft: #b8b8b8;
  --muted: #9a9a9a;
  --line: #303030;
  --focus: #ffffff;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--background);
  color-scheme: dark;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100%;
  min-height: 100svh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter Variable", Inter, ui-sans-serif, sans-serif;
  font-kerning: normal;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

a {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  margin-inline: -0.06em;
  padding-inline: 0.06em;
  background-image: linear-gradient(var(--foreground), var(--foreground));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  color: inherit;
  text-decoration: none;
  transition:
    background-size 620ms cubic-bezier(0.16, 1, 0.3, 1),
    color 360ms ease;
}

@media (hover: hover) {
  a:any-link:hover {
    background-size: 100% 100%;
    color: var(--background);
  }
}

a:any-link:focus-visible {
  background-size: 100% 100%;
  color: var(--background);
}

a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

::selection {
  background: var(--foreground);
  color: var(--background);
}

.site-page,
.archive-page,
.not-found {
  width: min(100% - 2.5rem, 700px);
  margin-inline: auto;
}

.project-links,
.archive-links {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 1.1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.intro {
  padding-block-start: clamp(6rem, 14vw, 8rem);
  padding-block-end: clamp(5rem, 12vw, 6.5rem);
}

.intro-greeting {
  margin: 0 0 1.5rem;
  color: var(--soft);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.intro h1 {
  max-width: 21ch;
  margin: 0;
  font-size: clamp(2.1rem, 5.5vw, 3.05rem);
  font-weight: 490;
  letter-spacing: -0.043em;
  line-height: 1.1;
}

.intro-copy {
  max-width: 610px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.intro-copy a,
.about-copy a {
  color: var(--foreground);
}

.content-section {
  padding-block: 5.25rem;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 540;
  letter-spacing: -0.015em;
}

.section-link {
  flex-shrink: 0;
  color: #737373;
  font-size: 0.75rem;
}

.project-list,
.experience-list,
.archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project,
.experience-row,
.archive-row {
  padding-block: 1.7rem;
  border-top: 1px solid var(--line);
}

.project:first-child,
.experience-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.archive-row:first-child {
  border-top: 0;
}

.project-heading,
.experience-heading,
.archive-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.experience-heading {
  flex-wrap: wrap;
  row-gap: 0.45rem;
}

.experience-heading h3 {
  white-space: nowrap;
}

.project h3,
.experience-row h3,
.archive-project h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 540;
  letter-spacing: -0.015em;
}

.project > p,
.experience-summary,
.archive-project p {
  max-width: 610px;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.project-heading h3,
.archive-project {
  min-width: 0;
}

.project .project-tech,
.experience-role,
.experience-heading > p,
.archive-year {
  margin: 0.65rem 0 0;
  color: #737373;
  font-size: 0.75rem;
}

.experience-heading > p {
  flex-shrink: 0;
  margin: 0;
}

.experience-role {
  color: var(--muted);
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.about-copy p + p {
  margin-top: 1.25rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 2.25rem 4rem;
  border-top: 1px solid var(--line);
  color: #737373;
  font-size: 0.75rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.archive-header {
  padding-block: 3rem 6rem;
}

.archive-header .text-arrow-link {
  display: inline-block;
  margin-bottom: 6rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.archive-header h1,
.not-found h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.archive-list {
  border-top: 1px solid var(--line);
}

.archive-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 1.25rem;
}

.archive-year {
  margin: 0.15rem 0 0;
}

.archive-links {
  align-items: baseline;
  white-space: nowrap;
}

.archive-page .site-footer {
  margin-top: 6rem;
}

.not-found {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
}

.not-found-code {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.not-found .text-arrow-link {
  width: fit-content;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.reveal {
  animation: reveal 1500ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes reveal {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (max-width: 620px) {
  .site-page,
  .archive-page,
  .not-found {
    width: min(100% - 2rem, 700px);
  }

  .intro {
    padding-block: 4.75rem 4.5rem;
  }

  .content-section {
    padding-block: 4.25rem;
  }

  .experience-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 0.3rem;
  }

  .experience-heading h3 {
    width: 100%;
    white-space: normal;
  }

  .project-heading {
    gap: 1rem;
  }

  .archive-header {
    padding-block: 2rem 4.25rem;
  }

  .archive-header .text-arrow-link {
    margin-bottom: 4.5rem;
  }

  .archive-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.85rem 1rem;
  }

  .archive-links {
    grid-column: 2;
  }
}

@media (max-width: 420px) {
  .intro h1,
  .archive-header h1,
  .not-found h1 {
    font-size: 2rem;
  }
}

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

  .reveal {
    animation: none;
  }

  a {
    transition: none;
  }
}
