@font-face {
  font-family: "Sevka Screen";
  src: url("projects/sevka-screen/fonts/SevkaScreen-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sevka Screen";
  src: url("projects/sevka-screen/fonts/SevkaScreen-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #20201e;
  --muted: #6c6a64;
  --paper: #f7f6f2;
  --line: #d8d6ce;
  color-scheme: light;
  font-family: "Sevka Screen", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #e8e7e2;
    --muted: #aaa8a1;
    --paper: #1b1b19;
    --line: #44433e;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #e8e7e2;
  --muted: #aaa8a1;
  --paper: #1b1b19;
  --line: #44433e;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

::selection {
  background: #ffae42;
  color: #20201e;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: var(--ink);
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.site-header,
main {
  width: min(100% - 2rem, 42rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  text-decoration: none;
}

.wordmark::before {
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  background: radial-gradient(circle at 50% 50%, #ffae42 0 1px, currentColor 1px);
  content: "";
  -webkit-mask: url("projects/site-assets/spiralpoint-logo.png") center / contain no-repeat;
  mask: url("projects/site-assets/spiralpoint-logo.png") center / contain no-repeat;
}

main {
  flex: 1;
}

.intro,
.projects-main {
  padding-block: clamp(5rem, 18vh, 9rem);
}

.intro {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
}

.profile-image {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  outline: 2px solid #ffae42;
  object-fit: cover;
}

h1 {
  margin: 0 0 1rem;
  font: inherit;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.intro-copy > p,
.page-intro > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.project-section {
  margin: 3rem 0 0;
}

.project-section + .project-section {
  margin-top: 3.5rem;
}

.project-section h2 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.project-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.project-list li {
  padding-block: 1.25rem;
}

.project-list-item-with-icon {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-list-item-with-icon > div {
  min-width: 0;
  flex: 1;
}

.project-list-icon {
  width: 3.5rem;
  height: 3.5rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.project-list a {
  font-weight: 700;
}

.project-list-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.license-badge {
  padding: 0.05rem 0.4rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.project-list p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.links {
  margin: 3rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
}

.project-main {
  padding-block: 4rem 7rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.project-main .summary {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.project-heading {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
}

.project-icon {
  width: 6rem;
  height: 6rem;
  object-fit: contain;
}

.project-main section {
  margin-top: 3.5rem;
}

h2 {
  margin: 0 0 0.75rem;
  font: inherit;
  font-weight: 700;
}

.project-main section p {
  margin: 0 0 1rem;
}

.project-links {
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}

.theme-selector {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  padding: 0.2rem;
  display: flex;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--paper);
}

.theme-selector button {
  width: 2rem;
  height: 2rem;
  padding: 0.4rem;
  border: 0;
  border-radius: 0.2rem;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-selector svg {
  width: 100%;
  height: 100%;
  display: block;
}

.theme-selector button:hover {
  color: var(--ink);
}

.theme-selector button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.theme-selector button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (max-width: 30rem) {
  .site-header {
    align-items: flex-start;
  }

  .site-header nav {
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
  }

  .project-heading {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 1rem;
  }

  .project-icon {
    width: 4.5rem;
    height: 4.5rem;
  }

  .intro {
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 1rem;
  }

  .profile-image {
    width: 5rem;
    height: 5rem;
  }
}
