:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #f5f4ff;
  background: #090c16;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 30% 6%, #242743 0%, transparent 45%),
    radial-gradient(ellipse at 93% 21%, #231b38 0%, transparent 37%),
    #090c16;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid #c9b7ff; outline-offset: 5px; }
.masthead, main { width: min(68rem, calc(100% - 3rem)); margin-inline: auto; }
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.45rem;
  border-bottom: 1px solid #ffffff24;
}
.wordmark, .nav-link { text-decoration: none; font-size: .92rem; }
.wordmark { font-weight: 700; }
.wordmark span { color: #c9b7ff; margin-right: .4rem; }
.nav-link { color: #d2cfe3; }
.nav-link span { margin-left: .25rem; }
.nav-link:hover { text-decoration: underline; text-underline-offset: .35em; }

.intro {
  display: grid;
  align-content: center;
  position: relative;
  isolation: isolate;
  min-height: clamp(16rem, 32vw, 22rem);
  padding-block: 3rem;
  overflow: clip;
}
.intro h1 {
  margin: 0;
  font: 400 clamp(3.35rem, 9vw, 7.4rem)/.99 Georgia, serif;
  letter-spacing: -.075em;
}
.intro em { color: #c4b4ff; }
.intro p { color: #ccc8dd; font-size: clamp(1rem, 2vw, 1.2rem); margin: 1.2rem 0 0; }
.constellation {
  position: absolute;
  z-index: -1;
  right: 1rem;
  top: 12%;
  width: min(36%, 20rem);
  aspect-ratio: 1.5;
  transform: rotate(-24deg);
  border: 1px solid #baaaff36;
  border-radius: 50%;
  box-shadow: 0 0 45px #7660a722, inset 0 0 45px #7660a722;
}
.constellation::before, .constellation::after {
  content: '';
  position: absolute;
  inset: 13%;
  border: 1px solid #baaaff33;
  border-radius: 50%;
}
.constellation::after { inset: 29%; }
.constellation i {
  position: absolute;
  inset: 13% auto auto 24%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e4d9ff;
  box-shadow: 0 0 10px #ded2ff;
}
.constellation i:nth-child(2) { inset: 67% auto auto 76%; }
.constellation i:nth-child(3) { inset: 42% auto auto 50%; width: 8px; height: 8px; }

.projects { padding-block: 0 3.5rem; }
.projects h2 { margin: 0 0 1rem; font-size: 1.11rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.25rem; }
.card {
  --accent: #d4c3ff;
  --art: #302447;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 1.15rem;
  background: #121625;
  border: 1px solid #ffffff26;
  text-decoration: none;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card[data-theme="leaf"] { --accent: #a5e4bc; --art: #193a35; }
.card[data-theme="controller"] { --accent: #ffadaf; --art: #4c263c; }
.card[data-theme="flashcards"] { --accent: #f2d395; --art: #493620; }
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 32px #03050b65;
}
.art {
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  min-height: clamp(8.5rem, 18vw, 11.5rem);
  color: var(--accent);
  border-bottom: 1px solid #ffffff23;
  background: radial-gradient(ellipse at 50% 60%, var(--art), #101523 85%);
}
.art::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 80%;
  height: 185%;
  transform: rotate(-20deg);
  background: repeating-radial-gradient(ellipse, transparent 0 18px, #ffffff20 19px 20px, transparent 21px 34px);
  mask-image: radial-gradient(ellipse, black, transparent 70%);
  pointer-events: none;
}
.symbol {
  width: 4.4rem;
  height: 4.4rem;
  border: 1px solid currentColor;
  border-radius: 1rem;
  background: #121625;
  transform: rotate(-9deg);
  transition: transform .22s ease;
}
.card:hover .symbol, .card:focus-visible .symbol { transform: rotate(0) scale(1.08); }
[data-theme="leaf"] .symbol {
  background: url("/animal-crossing/images/leaf.svg") center / 64% no-repeat, #142825;
}
[data-theme="controller"] .symbol {
  width: 5.25rem;
  height: 3rem;
  border-radius: 1.3rem;
  background:
    linear-gradient(var(--accent), var(--accent)) 22% 50% / 1rem .25rem no-repeat,
    linear-gradient(var(--accent), var(--accent)) 26.5% 50% / .25rem 1rem no-repeat,
    radial-gradient(circle at 68% 59%, var(--accent) 0 .17rem, transparent .2rem),
    radial-gradient(circle at 79% 39%, var(--accent) 0 .17rem, transparent .2rem),
    #2c1929;
}
[data-theme="flashcards"] .symbol {
  width: 4.4rem;
  height: 3.2rem;
  border-radius: .45rem;
  box-shadow: .38rem .38rem 0 -.1rem #332718, .38rem .38rem 0 0 #f2d39580;
  background:
    linear-gradient(currentColor, currentColor) 33% 40% / 53% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 25% 65% / 38% 1px no-repeat,
    #332718;
}
.card-body { padding: clamp(1.2rem, 3vw, 1.75rem); display: flex; flex-direction: column; }
.card-body h3 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.7rem); letter-spacing: -.035em; }
.card-body p { margin: .6rem 0 1.35rem; color: #c7c7da; line-height: 1.55; max-width: 37ch; }
.card-action { margin-top: auto; color: var(--accent); font-size: .88rem; font-weight: 700; }
.card-action span { margin-left: .2rem; }

@media (max-width: 40rem) {
  .project-grid { grid-template-columns: 1fr; }
  .constellation { right: -1.7rem; top: 18%; width: 55%; opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .card, .symbol { transition: none; }
  .card:hover, .card:focus-visible, .card:hover .symbol, .card:focus-visible .symbol { transform: none; }
}
