/*@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}*/

:root {
  --bg-color: #181818;
  --text-color: #fff;
  --text-color-soft:#999;
  --measure: 38rem;
}

[data-theme="light"] {
  --bg-color: #fff;
  --text-color: #181818;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: grid;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: var(--bg-color);
  color: var(--text-color);
  font-family: Geist, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s, color 0.3s;
}

main {
  width: min(100%, var(--measure));
}

header {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

p {
  margin: 0 0 1.15em;
  color: var(--text-color);
}

p:last-child {
  margin-bottom: 0;
}

.text-color-soft {
    color: var(--text-color-soft);
}

:root {
  --bg-color: #121212;
  --text-color: #ffffff;
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #121212;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

#theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
}

#theme-toggle svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.icon-sun {
  display: block;
}

.icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

#theme-toggle:hover svg {
  transform: rotate(15deg);
}

.greeting-wrap {
  position: relative;
  display: inline;
}

.greeting {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: help;
  vertical-align: baseline;
  border-radius: 0.12em;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--text-color-soft);
}

.greeting:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55em);
  transform: translateX(-50%);
  z-index: 1;
  padding: 0.28em 0.55em 0.32em;
  border-radius: 0.35em;
  background: var(--text-color);
  color: var(--bg-color);
  font-size: 0.78em;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 0.32em solid transparent;
  border-top-color: var(--text-color);
}

.greeting-wrap:hover .tooltip,
.greeting:focus-visible + .tooltip,
.greeting-wrap.is-open .tooltip {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .tooltip {
    transition:
      opacity 140ms ease,
      visibility 140ms ease;
  }
}
