@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/archivo-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fbfbfa;
  --ink: #141414;
  --mut: #9a9a96;
  --hair: #e6e6e2;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --disp: "Archivo", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--disp);
  cursor: crosshair;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ui {
  opacity: 0;
  animation: uiFallback 0.9s ease 3s forwards;
}
body.ready .ui {
  opacity: 1;
  animation: none;
  transition: opacity 0.9s ease;
}
@keyframes uiFallback {
  to { opacity: 1; }
}
body.ready .wordmark { transition-delay: 0.1s; }
body.ready .social { transition-delay: 0.25s; }
body.ready .projects { transition-delay: 0.4s; }

a { color: var(--ink); text-decoration: none; }

:focus-visible {
  outline: 1px dashed var(--ink);
  outline-offset: 4px;
}

.wordmark {
  position: fixed;
  top: 24px;
  left: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  z-index: 4;
  cursor: pointer;
}

.social {
  position: fixed;
  top: 16px;
  right: 22px;
  z-index: 6;
}

.cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 6px;
  margin: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: opacity 0.22s ease;
}
.cluster svg { display: block; }
.social.open .cluster {
  opacity: 0;
  pointer-events: none;
}

.bubble {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 218px;
  padding: 24px 18px 20px;
  background: #ffffff;
  border: 0.5px solid var(--hair);
  border-radius: 24px;
  display: grid;
  justify-items: center;
  row-gap: 20px;
  transform-origin: calc(100% - 36px) 28px;
  transform: scale(0.55);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}
.social.open .bubble {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.brow {
  /* Two equal columns so the icon centers sit symmetric about the bubble
     centerline regardless of label widths (LINKEDIN is wider than EMAIL). */
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  width: 100%;
}

.bitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bitem svg { display: block; }
.bitem span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mut);
  transition: color 0.2s ease;
}
.bitem:hover span { color: var(--ink); }
.social.open .bitem { opacity: 1; transform: translateY(0); }
.social.open .bitem:nth-of-type(1) { transition-delay: 0.07s; }
.social.open .brow .bitem:nth-of-type(1) { transition-delay: 0.12s; }
.social.open .brow .bitem:nth-of-type(2) { transition-delay: 0.17s; }

.projects {
  position: fixed;
  bottom: 30px;
  z-index: 4;
}
body[data-layout="a"] .projects { right: 32px; left: auto; text-align: right; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mut);
  margin: 0 0 12px;
}

.plink {
  display: block;
  font-size: 15px;
  font-weight: 600;
  padding: 6px 0;
  cursor: pointer;
  letter-spacing: 0;
  transition: letter-spacing 0.25s ease;
}
.plink:hover { letter-spacing: 0.02em; }
.plink .idx {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--mut);
}
body[data-layout="a"] .plink .idx { margin-right: 10px; }

.nojs {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
  z-index: 10;
}
.nojs-name {
  font-family: var(--disp);
  font-size: 44px;
  font-weight: 600;
  margin: 0;
}
.nojs-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin: 0; }
.nojs-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: underline;
}

@media (max-width: 720px) {
  .wordmark { top: 18px; left: 18px; }
  .social { top: 10px; right: 12px; }
  .bubble { width: 204px; }
  body[data-layout="a"] .projects { right: 20px; bottom: 24px; }
  .plink { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble, .bitem, .ui, #field, .plink {
    transition: none !important;
    animation: none !important;
  }
  .ui { opacity: 1; }
}
