@font-face {
  font-family: "T-Star Pro";
  src: url("../fonts/tstar-pro-light-webfont.woff2") format("woff2"),
       url("../fonts/tstar-pro-light-webfont.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #05080c;
  --signet-blue: #0069b4;
  --wave-blue: #8caddc;
  --ink: #e9eef3;
  --signet-size: min(440px, 72vw, 56vh);
  color-scheme: dark;
}

@supports (height: 1svh) {
  :root { --signet-size: min(440px, 72vw, 56svh); }
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--night); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding-block: 6vh;
  padding-inline: 24px;
  background: var(--night);
  color: var(--ink);
  font: 300 1rem/1.4 "T-Star Pro", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* The room light: a faint pool of blue around the signet. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgb(0 105 180 / 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 2.4s ease-out;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Black disc under the video disc: screen blending over black keeps the brand
   colours exact, while the page tint and light pool would lighten them. */
.signet {
  position: relative;
  width: var(--signet-size);
  aspect-ratio: 1;
  background: radial-gradient(circle closest-side, #000 89.5%, transparent 90%);
}

/* Halo just outside the disc (the disc fills 90 % of the video frame). */
.signet::before {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  box-shadow: 0 0 calc(var(--signet-size) * 0.18) calc(var(--signet-size) * 0.015) rgb(0 105 180 / 0.45);
  opacity: 0;
  transition: opacity 1.6s ease-out;
}

.signet__media,
.signet__still {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* The video has a black background; screen blending makes it disappear. */
.signet__media { mix-blend-mode: screen; }

/* Laid exactly over the video disc. Once the animation has finished, the vector
   logo takes over: crisp at any size and in exact brand colours, independent of
   how a browser colour-manages video. */
.signet__still {
  padding: 5%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.name {
  margin: clamp(1.75rem, 5vh, 3rem) 0 0.9rem;
  font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.75rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.mail {
  padding-bottom: 0.3em;
  color: var(--wave-blue);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  letter-spacing: 0.1em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: color 0.3s, text-shadow 0.3s;
}

.mail:hover,
.mail:focus-visible {
  color: #fff;
  text-shadow: 0 0 18px rgb(140 173 220 / 0.8);
}

.mail:focus-visible,
.social a:focus-visible {
  outline: 1px solid var(--wave-blue);
  outline-offset: 8px;
  border-radius: 2px;
}

.social {
  display: flex;
  gap: 1.4rem;
  margin-top: 1.6rem;
}

.social a {
  display: block;
  color: var(--wave-blue);
  transition: color 0.3s, filter 0.3s;
}

.social svg {
  display: block;
  width: clamp(1.25rem, 1.1rem + 0.4vw, 1.5rem);
  height: auto;
}

/* text-shadow doesn't reach SVG, so the glow is a drop-shadow here. */
.social a:hover,
.social a:focus-visible {
  color: #fff;
  filter: drop-shadow(0 0 10px rgb(140 173 220 / 0.8));
}

/* Sequence: the page stays dark until the signet has switched on. */
.js .name,
.js .mail,
.js .social {
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out, color 0.3s, text-shadow 0.3s;
}

.js .mail { transition-delay: 0.35s, 0.35s, 0s, 0s; }
.js .social { transition-delay: 0.7s, 0.7s, 0s, 0s; }

.lit .name,
.lit .mail,
.lit .social {
  opacity: 1;
  transform: none;
}

html:not(.js) body::before,
html:not(.js) .signet::before,
.lit body::before,
.lit .signet::before { opacity: 1; }

.settled .signet__still,
.still .signet__still { opacity: 1; }
.still .signet__still { transition: none; }
.still .signet__media { display: none; }

@media (prefers-reduced-motion: reduce) {
  .signet__media { display: none; }
  .signet__still { opacity: 1; }
  *, *::before { transition: none !important; }
}
