
:root {
  --bg: #eee7dc;
  --fg: #261018;
  --muted: rgba(38, 16, 24, 0.58);
  --line: rgba(38, 16, 24, 0.16);
  --pulse: rgba(38, 16, 24, 0.28);
  --border: rgba(38, 16, 24, 0.22);
  --canvas-rgb: 38, 16, 24;
  --edge: clamp(18px, 2.35vw, 42px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
}

html { overflow: hidden; }

body {
  min-height: 100svh;
  overflow: hidden;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a { color: inherit; text-decoration: none; }

::selection {
  background: var(--fg);
  color: var(--bg);
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: fieldIn 900ms cubic-bezier(.2,.75,.2,1) 140ms forwards;
}

.landing {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  isolation: isolate;
}

.topbar {
  position: fixed;
  z-index: 4;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(20px, env(safe-area-inset-top)) var(--edge) 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .13em;
}

.brand,
.contact {
  opacity: 0;
  transform: translateY(-10px);
  animation: chromeIn 800ms cubic-bezier(.2,.75,.2,1) 850ms forwards;
}

.brand { position: relative; }
.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 450ms cubic-bezier(.2,.75,.2,1);
}
.brand:hover::after { transform: scaleX(1); }

.contact {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.contact-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 var(--pulse);
  animation: pulse 2.8s ease-out 2s infinite;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9vh var(--edge) max(28px, env(safe-area-inset-bottom));
}

.hero-kicker {
  position: absolute;
  top: 26%;
  right: var(--edge);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .17em;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}


.title-morph {
  position: relative;
  width: min(76vw, 1080px);
  height: clamp(70px, 9vw, 132px);
  margin-left: clamp(0px, 4vw, 64px);
}

#title-dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.title-clean {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: clamp(30px, 4.35vw, 70px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.045em;
  gap: .24em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 900ms cubic-bezier(.2,.75,.2,1), transform 900ms cubic-bezier(.2,.75,.2,1);
}

.title-morph.is-settled .title-clean {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hero-foot {
  position: absolute;
  left: var(--edge);
  right: var(--edge);
  bottom: max(28px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 28px;
  border-top: 1px solid var(--border);
  padding-top: 13px;
}

.hero-foot p {
  margin: 0;
  font-size: clamp(12px, .92vw, 15px);
  line-height: 1.25;
  letter-spacing: -.01em;
}

.tagline { justify-self: end; color: var(--muted); }

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: revealIn 900ms cubic-bezier(.2,.75,.2,1) 1.5s forwards;
}
.tagline.reveal { animation-delay: 1.62s; }
.hero-kicker.reveal { animation-delay: 1.72s; }

.email-orbit {
  position: fixed;
  z-index: 3;
  width: 108px;
  height: 108px;
  right: calc(var(--edge) - 5px);
  bottom: 78px;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.82);
  animation: orbitIn 900ms cubic-bezier(.16,1,.3,1) 1.9s forwards;
}

.email-orbit .orbit-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 14s linear infinite;
}

.email-orbit text {
  fill: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 6.5px;
  letter-spacing: 0;
}

.magnetic { will-change: transform; }


.email-orbit .orbit-arrow {
  width: 48px;
  height: 48px;
  position: relative;
  animation: none;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: .75;
  stroke-linecap: square;
  stroke-linejoin: miter;
  transform: translateY(-1px);
  transition: transform 450ms cubic-bezier(.16,1,.3,1);
}

.email-orbit:hover .orbit-arrow { transform: translate(4px, -5px); }

@keyframes revealIn { to { opacity: 1; transform: translateY(0); } }
@keyframes chromeIn { to { opacity: 1; transform: translateY(0); } }
@keyframes fieldIn { to { opacity: 1; } }
@keyframes orbitIn { to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--pulse); }
  55%,100% { box-shadow: 0 0 0 9px rgba(var(--canvas-rgb),0); }
}

@media (max-width: 760px) {
  :root { --edge: 18px; }

  .topbar {
    padding-top: max(18px, env(safe-area-inset-top));
    font-size: 10px;
  }

  .hero {
    justify-content: center;
    padding-top: 8vh;
  }

  .title-morph {
    width: calc(100vw - (var(--edge) * 2));
    height: clamp(42px, 10vw, 62px);
    margin-left: 0;
  }

  .title-clean {
    font-size: clamp(20px, 5.5vw, 27px);
    letter-spacing: -.04em;
  }

  /* Keep the visible dot tiny, but give the contact control a proper touch target. */
  .contact {
    min-width: 48px;
    min-height: 48px;
    justify-content: flex-end;
    margin-top: -14px;
    margin-right: -10px;
    padding: 10px;
  }


  #field { opacity: .52; }

  .hero-kicker { display: none; }

  .hero-foot {
    grid-template-columns: 1fr;
    gap: 6px;
    bottom: max(20px, env(safe-area-inset-bottom));
  }

  .tagline { justify-self: start; }

  .email-orbit {
    width: 66px;
    height: 66px;
    right: 15px;
    bottom: 86px;
  }

  .email-orbit text { font-size: 7.3px; }
}

@media (max-width: 420px) {
  .title-clean { font-size: clamp(20px, 5.35vw, 23px); }
  .contact > span:last-child { display: none; }
  .contact-dot { width: 7px; height: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .title-clean,
  .reveal,
  .brand,
  .contact,
  .email-orbit,
  #field {
    opacity: 1;
    transform: none;
  }
}


@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080d18;
    --fg: #eee9df;
    --muted: rgba(238, 233, 223, 0.58);
    --line: rgba(238, 233, 223, 0.15);
    --pulse: rgba(238, 233, 223, 0.24);
    --border: rgba(238, 233, 223, 0.20);
    --canvas-rgb: 238, 233, 223;
  }
}



/* Responsive headline: size is measured against the actual rendered font. */
.title-clean span { display: block; white-space: nowrap; flex-shrink: 0; }
a:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }
@media (max-width: 760px) {
  .title-morph { width: 100%; height: clamp(120px, 32vw, 245px); margin-left: 0; }
  .title-clean {
    flex-direction: column; justify-content: center; align-items: flex-start;
    font-size: clamp(40px, 14vw, 100px); font-weight: 700;
    line-height: .94; letter-spacing: -.065em; gap: 0;
  }
  .email-orbit { width: 100px; height: 100px; right: 12px; bottom: 94px; }
  .email-orbit text { font-size: 6.5px; letter-spacing: 0; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .title-morph { width: 78%; height: 90px; }
  .title-clean { flex-direction: row; align-items: center; justify-content: flex-start; gap: .24em; font-size: 5vw; font-weight: 400; }
  .email-orbit { bottom: 70px; width: 78px; height: 78px; }
}

/* Small visible dots retain a generous keyboard/touch target. */
.skill-dots { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.skill-dot {
  position: absolute; width: 44px; height: 44px; padding: 0; margin: 0;
  transform: translate(-50%, -50%); border: 0; border-radius: 50%;
  background: transparent; color: var(--fg); cursor: pointer;
  pointer-events: auto; -webkit-tap-highlight-color: transparent;
}
.skill-dot:disabled { pointer-events: none; }
.skill-dot::after {
  content: ''; position: absolute; inset: 13px; border: 1px solid currentColor;
  border-radius: 50%; opacity: 0; transition: opacity 180ms ease;
}
.skill-dot[aria-expanded="true"]::after,
.skill-dot:focus-visible::after { opacity: .45; }
.skill-dot:focus-visible { outline: 1px solid var(--fg); outline-offset: 1px; }
@media (hover: hover) { .skill-dot:hover::after { opacity: .3; } }
.skill-label {
  position: fixed; z-index: 5; max-width: calc(100vw - 24px);
  padding: 5px 8px; background: var(--bg); color: var(--fg);
  font-size: 12px; line-height: 1.4; letter-spacing: .015em;
  white-space: nowrap; pointer-events: none;
}
.skill-label[hidden] { display: none; }
