@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --spruce: #102326;
  --bone: #e8e2d4;
  --stone: #b9c2b9;
  --lichen: #7f978f;
  --rule: #1f3a3b;
  --amber: #f0b44c;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--spruce);
  color: var(--stone);
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 15px;
  font-stretch: 87.5%;
  font-weight: 350;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 4rem 1.5rem;
  background: radial-gradient(circle at 50% 45%, rgb(240 180 76 / 0.045), transparent 32rem);
}

main { width: 100%; max-width: 22rem; }

::selection { background: rgb(240 180 76 / 0.25); }

/* Header */
.mark {
  color: var(--bone);
  font-size: 2.5rem;
  font-stretch: 112.5%;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0 0 1.75rem -0.04em;
}
.mark span { color: var(--lichen); }

h1 {
  color: var(--bone);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.tagline { color: var(--lichen); font-size: 0.85rem; margin-top: 0.25rem; }

/* Projects */
.projects { list-style: none; margin-top: 3.5rem; }

.projects a {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 0.85rem;
  padding: 0.75rem 0;
  color: inherit;
  text-decoration: none;
}
.projects a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.5rem;
  height: 1px;
  width: 0;
  background: rgb(240 180 76 / 0.5);
  transition: width 0.3s ease-out;
}
.icon { grid-row: 1; align-self: center; border-radius: 4px; }
.title, .desc { grid-column: 2; }

.title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--stone);
  transition: color 0.2s;
}
.desc { display: block; color: var(--lichen); font-size: 0.8rem; margin-top: 0.15rem; }

.ext {
  width: 0.7rem;
  height: 0.7rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.projects a:hover::after, .projects a:focus-visible::after { width: 100%; }
.projects a:hover .title, .projects a:focus-visible .title { color: var(--bone); }
.projects a:hover .ext, .projects a:focus-visible .ext { opacity: 1; transform: translate(2px, -2px); }

/* Socials */
footer {
  display: flex;
  gap: 1.25rem;
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--lichen);
  text-decoration: none;
  transition: color 0.2s;
}
footer svg { width: 0.85rem; height: 0.85rem; fill: currentColor; }
footer a:hover { color: var(--bone); }

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

/* One entrance: header, projects and footer rise in sequence */
header, .projects li, footer {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i) * 70ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  header, .projects li, footer { animation: none; }
  .projects a::after, .ext { transition: none; }
}
