:root {
  --neutral-50: #fafafa;
  --neutral-200: #e5e5e5;
  --neutral-500: #737373;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;
  --orange-600: #ea580c;
  --orange-900: #7c2d12;

  --page-bg: var(--neutral-200);
  --page-fg: var(--neutral-950);
  --card-bg: var(--neutral-50);
  --link-hover: var(--orange-600);

  --font-sans: 'Dosis', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Inconsolata', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: var(--neutral-900);
    --page-fg: var(--neutral-50);
    --card-bg: var(--neutral-950);
    --link-hover: var(--orange-900);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--neutral-500);
}

html {
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  padding: 1.5rem 2.5rem;
  background-color: var(--page-bg);
  color: var(--page-fg);
  letter-spacing: 0.1em;
  font-size: 1rem;
  line-height: 1.5rem;
}

::selection {
  background-color: var(--orange-600);
  color: #000;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  font-size: inherit;
  font-weight: inherit;
}

.page {
  margin: auto;
  min-height: 100%;
  max-width: 72rem;
}

.spacer {
  padding: 2rem;
}

.card {
  margin: auto;
  padding: 1rem;
  border: 4px solid var(--neutral-500);
  border-radius: 1rem;
  background-color: var(--card-bg);
  text-align: center;
}

.divider {
  height: 0;
  border: 2px solid var(--neutral-500);
  border-radius: 9999px;
}

.header {
  display: grid;
  gap: 2rem;
  padding-bottom: 1rem;
  text-align: center;
}

.avatar {
  margin: auto;
  width: 50%;
  max-width: 24rem;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  user-select: none;
}

.header hgroup {
  display: grid;
  gap: 0.25rem;
}

.header h1 {
  padding-bottom: 2rem;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
}

.header h2 {
  font-size: 1.5rem;
  line-height: 2rem;
  color: var(--orange-600);
}

.sections {
  display: grid;
  gap: 2.5rem;
  margin: 1.5rem 0.5rem;
}

.section {
  display: grid;
  width: 100%;
  gap: 2rem;
}

.section h3 {
  color: var(--orange-600);
}

.section-anchor {
  user-select: none;
}

.about {
  text-align: justify;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 0.5rem;
  list-style: none;
}

.glitch {
  display: inline-block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  user-select: none;
  transition: color 500ms;
}

.glitch:hover {
  color: var(--link-hover);
}

.footer {
  margin: 1.5rem 0.5rem 0;
}

.socials {
  display: grid;
  grid-auto-flow: column;
  justify-items: center;
  gap: 1rem;
}

.socials a {
  transition: color 300ms;
}

.socials a:hover {
  color: var(--link-hover);
}

.project-page {
  --page-bg: var(--project-light);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  color: var(--project-fg, var(--page-fg));
}

@media (prefers-color-scheme: dark) {
  .project-page {
    --page-bg: var(--project-dark);
  }
}

.back {
  font-size: 1.5rem;
  line-height: 2rem;
  transition: color 300ms;
}

.back:hover {
  color: var(--link-hover);
}

.project-page .page {
  flex: 1;
  min-height: 0;
}

.project {
  display: grid;
  height: 100%;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 2.5rem;
}

.project hgroup {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  text-align: center;
}

.project h1 {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
}

.project h2 {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 300;
  font-style: italic;
}

.project-art {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-row: span 2;
  user-select: none;
}

.badge {
  width: 200px;
  height: auto;
  user-select: none;
}

.project-footer {
  display: flex;
  width: 100%;
  justify-content: center;
  padding-bottom: 1.5rem;
}

.project-footer .socials {
  width: 100%;
  align-items: stretch;
  gap: 0;
  font-size: 1.5rem;
  line-height: 2rem;
}

@media (min-width: 640px) {
  .header h1 {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .back {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .project {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    justify-items: end;
  }

  .project hgroup {
    grid-column-start: 2;
    align-self: end;
    text-align: right;
  }

  .project h1 {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .project-art {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-self: start;
  }

  .project-footer {
    grid-column: span 2;
  }

  .project-footer .socials {
    gap: 2rem;
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

@media (min-width: 768px) {
  .card {
    padding: 2.25rem;
    text-align: left;
    font-size: 1.875rem;
    line-height: 2.5rem;
  }

  .header {
    grid-template-columns: 1fr 2fr;
    padding-bottom: 3rem;
    text-align: start;
  }

  .avatar {
    width: 100%;
  }

  .header h1 {
    font-size: 3.75rem;
    line-height: 1.25;
  }

  .header h2 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .sections {
    margin: 1.25rem 0.5rem;
  }

  .section {
    grid-template-columns: 1fr 2fr;
  }

  .section h3 {
    font-size: 3rem;
    line-height: 1;
  }

  .glitch {
    text-align: left;
  }

  .project h1 {
    font-size: 3.75rem;
    line-height: 1;
  }

  .project h2 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .header h1 {
    font-size: 6rem;
    line-height: 1;
  }

  .project h1 {
    font-size: 6rem;
    line-height: 1;
  }
}
