:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --text: #161616;
  --title: #8f3f2a;
  --muted: #66615a;
  --line: rgb(22 22 22 / 0.14);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --text: #f2f0eb;
  --title: #f0b35f;
  --muted: #aaa49a;
  --line: rgb(242 240 235 / 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

main {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 2rem;
}

.theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-weight: 700;
  cursor: pointer;
}

.theme-icon {
  grid-area: 1 / 1;
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  color: var(--title);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.theme-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-icon-moon,
[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: scale(0.82) rotate(-12deg);
}

[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.intro {
  width: min(100%, 680px);
}

h1 {
  margin: 0 0 1rem;
  color: var(--title);
  font-size: clamp(2.8rem, 9vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

p {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.links a {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  padding: 0;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.links svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.links a[href^="mailto"] svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.links a:hover {
  border-color: currentColor;
  color: var(--title);
  transform: translateY(-1px);
}

@media (max-width: 560px) {
  main {
    align-items: center;
    padding: 5.5rem 1.25rem 2rem;
  }

  .theme-toggle {
    top: 1rem;
    right: 1rem;
  }
}
