:root {
  --paper: #f1ebdf;
  --ink: #2a2522;
  --teal: #1f8a8f;
  --red: #c8392c;
  --magenta: #7e1f4e;
  --blue: #2179d4;
  --indigo: #6f66e8;
  --navy: #003884;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Quicksand", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

main {
  width: 100%;
  max-width: 36rem;
  text-align: center;
}

.logo {
  width: min(72vw, 18rem);
  height: auto;
  border-radius: 0.75rem;
  display: block;
  margin: 0 auto 1.5rem;
  mix-blend-mode: multiply;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}

.tag {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  opacity: 0.75;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 16rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    max-width: none;
    gap: 0.75rem;
  }
}

.links > a,
.profile-toggle {
  --c: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 2px solid var(--c);
  background: transparent;
  color: var(--c);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

.ic svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ic.at {
  font-size: 1.25em;
  line-height: 1;
  font-weight: 700;
  margin-top: -0.05em;
}

.links > a:hover,
.profile[open] .profile-toggle {
  background: color-mix(in srgb, var(--c) 13%, transparent);
  transform: translateY(-1px);
}

@media (hover: hover) {
  .profile:hover .profile-toggle {
    background: color-mix(in srgb, var(--c) 13%, transparent);
    transform: translateY(-1px);
  }
}

.links > *:nth-child(1) { --c: var(--teal); }
.links > *:nth-child(2) { --c: var(--red); }
.links > *:nth-child(3) { --c: var(--navy); }

.profile {
  position: relative;
  outline: none;
}

.profile > summary {
  list-style: none;
}

.profile > summary::-webkit-details-marker {
  display: none;
}

.chev {
  display: inline-block;
  font-size: 0.7em;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.profile[open] .chev {
  transform: rotate(180deg);
}

@media (hover: hover) {
  .profile:hover .chev {
    transform: rotate(180deg);
  }
}

.sublinks {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
}

.profile[open] .sublinks {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.5rem;
}

@media (hover: hover) {
  .profile:hover .sublinks {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.5rem;
  }
}

.sublinks a {
  --c: var(--ink);
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px dashed var(--c);
  color: var(--c);
  background: transparent;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s ease;
}

.sublinks > a:nth-child(1) { --c: var(--blue); }
.sublinks > a:nth-child(2) { --c: var(--indigo); }

.sublinks a::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.9em;
  opacity: 0.55;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.sublinks a:hover {
  background: color-mix(in srgb, var(--c) 14%, transparent);
}

.sublinks a:hover::after {
  transform: translate(2px, -2px);
  opacity: 1;
}

@media (min-width: 640px) {
  .sublinks {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding-top: 0.5rem;
    margin-top: 0;
    z-index: 10;
  }
  .profile[open] .sublinks {
    margin-top: 0;
  }
  @media (hover: hover) {
    .profile:hover .sublinks {
      margin-top: 0;
    }
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1814;
    --ink: #f1ebdf;
    --teal: #6cd3d8;
    --red: #f37569;
    --magenta: #d36da0;
    --blue: #6fb3ff;
    --indigo: #9c95ff;
    --navy: #7eaaff;
  }
  .logo { mix-blend-mode: screen; }
}
