@font-face {
  font-family: "Ioskeley Mono";
  src: url("assets/fonts/IoskeleyMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Ioskeley Mono";
  src: url("assets/fonts/IoskeleyMono-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  background: #fff;
  color: #000;
  font-family: "Ioskeley Mono", "Courier New", monospace;
  margin: 0;
}

body:has(#dark-mode:checked) {
  background: #000;
  color: #fff;
}

#dark-mode,
input[type="radio"] {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.github-link {
  left: 24px;
  position: absolute;
}

.github-link img {
  display: block;
  filter: grayscale(1);
  height: 24px;
  width: 24px;
}

body:has(#dark-mode:checked) .github-link img {
  filter: grayscale(1) invert(1);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  justify-content: center;
}

nav a,
nav label,
.theme-toggle {
  color: inherit;
  display: inline-block;
  font-size: 14px;
  position: relative;
  text-decoration: none;
}

nav a::after,
nav label::after,
.theme-toggle::after {
  background: currentColor;
  bottom: -4px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 250ms ease;
  width: 100%;
}

nav a:hover::after,
nav label:hover::after,
.theme-toggle:hover::after {
  transform: scaleX(1);
}

.theme-toggle {
  cursor: pointer;
  position: absolute;
  right: 24px;
}

.dark-label {
  display: none;
}

body:has(#dark-mode:checked) .light-label {
  display: none;
}

body:has(#dark-mode:checked) .dark-label {
  display: inline;
}

main {
  padding: 48px 24px;
}

.tab-panel {
  display: none;
}

.project-group-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}

.project-group-title.meow-title {
  margin-top: 32px;
}

.project-card {
  border: 1px solid transparent;
  color: inherit;
  display: grid;
  gap: 8px;
  max-width: 720px;
  padding: 20px;
  position: relative;
  text-decoration: none;
  transition: border-color 250ms ease;
}

.project-card:hover {
  border-color: currentColor;
}

.project-card + .project-card {
  margin-top: 16px;
}

.project-card-title {
  font-weight: 700;
}

.project-card-description {
  color: inherit;
  opacity: 0.7;
}

.project-card-arrow {
  position: absolute;
  right: 20px;
  top: 20px;
}

.project-card:hover .project-card-arrow {
  transform: translate(2px, -2px);
}

.project-card-arrow {
  transition: transform 250ms ease;
}

.contact-entry + .contact-entry {
  margin-top: 1.6em;
}

.mail-icon,
.session-icon {
  filter: grayscale(1);
  margin-right: 8px;
  position: relative;
  top: -1px;
  vertical-align: middle;
}

.mail-icon {
  height: 24px;
  width: 24px;
}

.session-icon {
  height: 27px;
  width: 24px;
}

body:has(#dark-mode:checked) .session-icon {
  filter: grayscale(1) invert(1);
}

.session-link {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  margin: 0;
  padding: 0;
  text-align: left;
}

#home:target,
#about:target,
#projects:target,
#contact:target,
body:not(:has(.tab-panel:target)) #home {
  display: block;
}

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

#contact a::after {
  display: none;
}

::selection {
  background: #000;
  color: #fff;
}
