:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --accent: #ff5c35;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="dark"] {
  --bg: #0b0b0c;
  --fg: #ededed;
  --muted: #8b8b92;
  --line: rgba(255, 255, 255, .1);
  --card: rgba(255, 255, 255, .04);
  --dot: 255, 255, 255;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f6f3;
  --fg: #141414;
  --muted: #6b6b70;
  --line: rgba(0, 0, 0, .1);
  --card: rgba(0, 0, 0, .03);
  --dot: 0, 0, 0;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  transition: background-color .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
.accent { color: var(--accent); font-style: normal; }

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.bar, .hero, .foot { position: relative; z-index: 1; }

/* Top bar */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 5vw, 48px);
}
.mark {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -.02em;
}
.controls { display: flex; gap: 10px; align-items: center; }
.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--card);
  backdrop-filter: blur(8px);
}
.lang button, .theme {
  font: 500 12px/1 var(--mono);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.lang button[aria-pressed="true"] { color: var(--bg); background: var(--fg); }
.lang button:hover:not([aria-pressed="true"]) { color: var(--fg); }
.theme {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(8px);
}
.theme:hover { color: var(--fg); }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
[data-theme="dark"] .theme .moon, [data-theme="light"] .theme .sun { display: none; }

/* Hero */
.hero {
  align-self: center;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 48px) 64px;
}
.kicker {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 18px;
}
.kicker::before { content: "→ "; color: var(--accent); }
.name {
  font-size: clamp(2.6rem, 9vw, 6rem);
  line-height: .95;
  font-weight: 650;
  letter-spacing: -.045em;
  margin: 0 0 22px;
  cursor: default;
  user-select: none;
}
.name .ch {
  display: inline-block;
  transition: transform .5s var(--ease), color .3s;
  animation: rise .9s var(--ease) both;
  animation-delay: calc(var(--i) * 28ms);
}
.name .word { display: inline-block; white-space: nowrap; }
.name .ch.on { color: var(--accent); transform: translateY(-.08em); }
@keyframes rise {
  from { opacity: 0; transform: translateY(.35em); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.nick {
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  letter-spacing: -.02em;
  margin: 0 0 14px;
  animation: fade .8s .45s var(--ease) both;
}
.nick em { font-weight: 600; }
.lead {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.55;
  max-width: 34em;
  margin: 0 0 40px;
  animation: fade .8s .55s var(--ease) both;
}
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Links */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fade .8s .65s var(--ease) both;
}
.link {
  --x: 50%;
  --y: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  backdrop-filter: blur(10px);
  color: var(--fg);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .3s;
}
.link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(160px circle at var(--x) var(--y), rgba(255, 92, 53, .22), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.link:hover { border-color: rgba(255, 92, 53, .5); transform: translateY(-2px); }
.link:hover::before { opacity: 1; }
.link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.link.email { padding: 0; }
.link.email a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 6px 12px 18px;
  color: inherit;
  text-decoration: none;
}
.copy {
  display: grid;
  place-items: center;
  margin: 6px 6px 6px 4px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.copy:hover { color: var(--fg); background: var(--line); }
.copy svg { width: 15px; height: 15px; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Footer */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px clamp(20px, 5vw, 48px);
  font: 12px/1.4 var(--mono);
  color: var(--muted);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font: 500 13px/1 var(--mono);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (hover: none) {
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
