:root {
  --warm-white: #fffaf3;
  --peach: #ffd3bc;
  --rose-light: #fda58c;
  --motion-ease: cubic-bezier(.19, 1, .32, 1);
}

.world-light {
  position: absolute;
  inset: -5%;
  background:
    radial-gradient(ellipse at 77% 29%, #bf758031 0%, #7e4c6b26 24%, transparent 55%),
    radial-gradient(ellipse at 73% 73%, #89483930 0%, transparent 48%),
    linear-gradient(112deg, transparent 22%, #c1a1bf13 47%, transparent 67%);
  transform: translate3d(var(--light-x, 0px), var(--light-y, 0px), 0);
  transition: transform .75s var(--motion-ease), opacity .55s ease;
  mix-blend-mode: screen;
  opacity: .78;
}

body.in-page .world-light {
  opacity: .97;
  background:
    radial-gradient(ellipse at 82% 23%, #754f704c, transparent 52%),
    radial-gradient(ellipse at 42% 65%, #a65e3927, transparent 55%);
}

#atmosphere { opacity: .8; }
body:not(.in-page) .world-image { filter: contrast(1.025); }

.hero-copy h1,
.page-title,
.contact-top > h1 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  color: var(--warm-white);
  letter-spacing: -.077em;
  text-shadow: 0 1px 22px #ffdfc328;
}

.hero-copy h1 {
  font-size: clamp(60px, 7.55vw, 126px);
  line-height: .91;
}

.hero-copy h1 > span:last-child,
.page-title em,
.contact-top > h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  color: #fff2e3;
  text-shadow: 0 0 36px #ffbfa94d;
}

.hero-copy h1 > span:last-child {
  font-size: .99em;
  letter-spacing: -.088em;
  margin-top: .15em;
}

.hero-copy h1 > span:last-child .green-dot { color: var(--rose-light); }
.page-title, .contact-top > h1 { line-height: .99; }
.hero-description { color: #f3e5df; }
.hero-copy .eyebrow { color: #ded2cd; }
.hero-copy .tiny-line { background: var(--peach); }
.hero-cta { color: var(--warm-white); border-color: #ffbfaa79; }

.motion-word { display: inline-block; white-space: nowrap; }
.motion-glyph {
  display: inline-block;
  transform-origin: 50% 85%;
}

/* Give italic serif strokes room to extend beyond their advance width. */
:is(.hero-copy h1 > span:last-child, .page-title em, .contact-top > h1 em) .motion-glyph {
  padding-inline: .16em;
  margin-inline: -.16em;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .motion-glyph {
    --shine: linear-gradient(112deg, #f3dfd7 5%, #fffaf3 27%, #fffdf8 42%, #ffe0c9 48%, #fffefb 51%, #fffaf3 60%, #ecd3c7 94%);
    background-image: var(--shine), linear-gradient(#fffdf7 4%, #fff6ed 48%, #dcbcb3 100%);
    background-size: 250% 100%, 100% 100%;
    background-position: 95% 0, 0 0;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }

  .hero-copy h1 > span:last-child .motion-glyph,
  .page-title em .motion-glyph,
  .contact-top > h1 em .motion-glyph {
    --shine: linear-gradient(112deg, #e2ac9f 4%, #fff2df 24%, #ffe9d7 42%, #ffc4ac 46%, #fffdf8 52%, #fff5e8 58%, #e59a86 95%);
  }

  .green-dot .motion-glyph {
    --shine: linear-gradient(110deg, #f69b83, #ffcab1 38%, #fff4e0 50%, #f68b77 80%);
  }
}

.view { animation: none; }

.motion-entrance .motion-glyph {
  animation: glyph-arrive .95s var(--motion-ease) both, type-polish 2.15s ease-out both;
  animation-delay: calc(35ms + var(--letter) * 24ms), calc(255ms + var(--letter) * 29ms);
}

.motion-entrance :is(.hero-copy .eyebrow, .hero-description, .hero-cta, .page-intro > p, .contact-top > p) {
  animation: copy-arrive .8s var(--motion-ease) both;
}

.motion-entrance :is(.hero-description, .page-intro > p:last-child, .contact-top > p:last-child) { animation-delay: .18s; }
.motion-entrance .hero-cta { animation-delay: .27s; }

@keyframes glyph-arrive {
  from { opacity: 0; transform: translate3d(.04em, .55em, 0) scaleY(.92); filter: blur(.085em); }
  65% { opacity: 1; }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes type-polish {
  from { background-position: 100% 0, 0 0; }
  to { background-position: 3% 0, 0 0; }
}
@keyframes copy-arrive {
  from { opacity: 0; transform: translateY(13px); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: none; }
}

.page-flare {
  position: fixed;
  z-index: 24;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 12%, #a96f8c16 37%, #ffbfaa55 50%, #68486526 67%, transparent 86%);
  mix-blend-mode: screen;
}
.page-flare.is-sweeping { animation: flare-cross .92s var(--motion-ease) both; }

@keyframes flare-cross {
  0% { opacity: 0; transform: translate3d(-78%, 0, 0); }
  20% { opacity: .95; }
  100% { opacity: 0; transform: translate3d(70%, 0, 0); }
}

.motion-card-in { animation: card-arrive .76s var(--motion-ease) both; animation-delay: var(--card-delay, 0ms); }

@keyframes card-arrive {
  from { opacity: .12; transform: translate3d(0, 21px, 0) scale(.988); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

.project-card, .featured-cert, .achievement-grid article, .contact-links > a {
  position: relative;
  background-image: radial-gradient(ellipse at var(--glint-x, 50%) var(--glint-y, 0%), #ffd1b728, transparent 62%);
  background-size: 100% 100%;
}

.project-card::before, .featured-cert::before, .achievement-grid article::before, .contact-links > a::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  opacity: 0;
  box-shadow: inset 0 1px #ffe5d7a0, inset 0 0 32px #ffd7c218;
  transition: opacity .3s ease;
}
:is(.project-card, .featured-cert, .achievement-grid article, .contact-links > a):is(:hover, :focus-within)::before { opacity: 1; }

.dock {
  background-image: linear-gradient(175deg, #63505b30, transparent 60%);
  box-shadow: 0 13px 35px #08060951, inset 0 1px #fff6ea14;
}
.dock-home.active { color: var(--green); }
.dock-links a:hover, .dock-links a.active { text-shadow: 0 0 16px #facab894; }
.resume-link { box-shadow: inset 0 1px #fff1ea1a; }
.resume-link, .hero-cta, .dock a, .filter, .copy-button {
  transition-timing-function: var(--motion-ease);
}

dialog[open] { animation: glass-open .54s var(--motion-ease) both; }
dialog[open]::backdrop { animation: backdrop-in .44s ease-out both; }

@keyframes glass-open {
  from { opacity: 0; transform: translateY(19px) scale(.978); filter: blur(7px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }


@media (min-width: 641px) and (max-height: 780px) {
  .hero-copy { top: clamp(98px, 17vh, 153px); }
}

@media (max-width: 1000px) and (min-width: 641px) {
  .hero-copy h1 { font-size: clamp(47px, 8.25vw, 90px); }
}

@media (max-width: 640px) {
  .hero-copy h1 { font-size: clamp(44px, 13.15vw, 71px); }
  .hero-copy h1 > span:last-child { margin-top: .11em; }
  .world-light { opacity: .56; }
  .page-title { letter-spacing: -.067em; }
}

@media (prefers-reduced-motion: reduce) {
  .page-flare, #atmosphere { display: none; }
  .world-light { transform: none; }
}
