@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400&family=Manrope:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --bg: #275f95;
  --text: #f5eff7;
  --muted: #c0b2c4;
  --line: rgba(246, 232, 248, 0.24);
  --accent: #ffb1ce;
  --selection: rgba(209, 104, 177, 0.48);
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

:root[data-solar="twilight"] {
  --bg: #08020d;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 220ms ease, color 220ms ease;
}

.atmosphere {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  background: #124385;
}

.safari-chrome-edge {
  position: fixed;
  z-index: 2;
  right: 0;
  left: 0;
  height: 0.75rem;
  pointer-events: none;
  opacity: 1;
}

.safari-chrome-edge-top {
  top: 0;
  background: #124385;
}

.safari-chrome-edge-bottom {
  bottom: 0;
  background: #4483b8;
}

::selection {
  background: var(--selection);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.75rem;
}

.skip-link:focus {
  top: 1rem;
}

.site {
  position: relative;
  z-index: 1;
  width: calc(100% - 3rem);
  max-width: 44rem;
  min-height: 100svh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.site-header {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.domain {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.domain-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.horizon-toggle {
  --solar-phase: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  user-select: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.horizon-toggle:hover:not(:disabled) {
  border-color: var(--muted);
}

.horizon-toggle:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.horizon-toggle:disabled {
  cursor: default;
}

.horizon-toggle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.horizon-toggle circle {
  fill: currentColor;
  stroke: none;
}

.horizon-toggle .horizon-line {
  opacity: 0.7;
}

.horizon-toggle .sun-marker {
  transform: translateY(calc(var(--solar-phase) * 9px));
  transform-origin: 12px 7px;
  transition: transform 3s cubic-bezier(0.65, 0, 0.35, 1);
}

.horizon-toggle[data-holding="true"] {
  border-color: var(--accent);
  transform: scale(0.94);
}

.horizon-toggle[data-scrubbing="true"] .sun-marker {
  transition: none;
}

main {
  display: grid;
  align-items: center;
  padding: 3.5rem 0 5rem;
}

.placard {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: arrive 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-footer {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.61rem;
}

.site-footer p {
  margin: 0;
}

.identity {
  order: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.identity-copy {
  min-width: 0;
}

h1 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.identity-copy p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.59rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.statement {
  order: 1;
  max-width: 62ch;
  padding: 0 0 1.9rem;
  font-size: clamp(0.98rem, 1.4vw, 1.06rem);
  line-height: 1.6;
  letter-spacing: -0.015em;
}

.statement p {
  margin: 0;
}

.statement p:first-child {
  max-width: 24ch;
  margin-bottom: 1.15rem;
  font-size: clamp(1.65rem, 3.4vw, 2.25rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.statement a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.portrait-detail {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.72;
}

.links {
  display: flex;
  gap: 1.5rem;
}

.links a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-bottom: 0.22rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.links span {
  font-family: var(--mono);
  font-size: 0.62rem;
  transition: transform 160ms ease;
}

.links a:hover span {
  transform: translate(2px, -2px);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 1.35rem 0 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.56rem;
}

.sun-dial {
  --sun-dial-size: 8rem;
  --sun-dial-angle: -130deg;
  position: fixed;
  z-index: 12;
  top: var(--sun-dial-center-y, 75%);
  left: 50%;
  width: var(--sun-dial-size);
  color: rgba(245, 239, 247, 0.84);
  font-family: var(--mono);
  text-align: center;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0.75rem 2rem rgba(0, 0, 0, 0.2));
}

.sun-dial[hidden] {
  display: none;
}

.sun-dial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.sun-dial h2 {
  margin: 0;
  font-size: 0.54rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sun-dial-close {
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  opacity: 0.72;
}

.sun-dial-face {
  position: relative;
  width: var(--sun-dial-size);
  height: var(--sun-dial-size);
  border: 1px solid rgba(245, 239, 247, 0.25);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(245, 239, 247, 0.06) 0 1px, transparent 1.5px),
    rgba(5, 8, 25, 0.12);
  box-shadow:
    inset 0 0 0 0.45rem rgba(245, 239, 247, 0.018),
    inset 0 0 2rem rgba(5, 8, 25, 0.16);
  cursor: grab;
  -webkit-backdrop-filter: blur(0.4rem);
  backdrop-filter: blur(0.4rem);
  touch-action: none;
}

.sun-dial-face:active {
  cursor: grabbing;
}

.sun-dial-face::before {
  position: absolute;
  inset: 0.4rem;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from -130deg,
    rgba(245, 239, 247, 0.34) 0deg 0.8deg,
    transparent 0.8deg 13deg
  );
  content: "";
  -webkit-mask: radial-gradient(circle, transparent 0 82%, #000 83%);
  mask: radial-gradient(circle, transparent 0 82%, #000 83%);
  pointer-events: none;
}

.sun-dial-face:focus-visible,
.sun-dial-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sun-dial-horizon {
  position: absolute;
  right: 18%;
  bottom: 24%;
  left: 18%;
  height: 1px;
  background: currentColor;
  opacity: 0.32;
}

.sun-dial-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 1px;
  height: 37%;
  background: currentColor;
  transform: translateX(-50%) rotate(var(--sun-dial-angle));
  transform-origin: 50% 100%;
}

.sun-dial-sun {
  position: absolute;
  top: -0.24rem;
  left: 50%;
  width: 0.48rem;
  height: 0.48rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 0 0.8rem color-mix(in srgb, var(--accent) 46%, transparent);
  transform: translateX(-50%);
}

.sun-dial-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.3rem;
  height: 0.3rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(5, 8, 25, 0.35);
  transform: translate(-50%, -50%);
}

.sun-dial-status {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.atmosphere-lab {
  position: fixed;
  z-index: 40;
  top: 1rem;
  right: 1rem;
  width: min(20rem, calc(100vw - 2rem));
  max-height: calc(100svh - 2rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(224, 235, 255, 0.2);
  border-radius: 0.75rem;
  background: rgba(3, 8, 23, 0.88);
  box-shadow: 0 1.25rem 4rem rgba(0, 0, 0, 0.38);
  color: #eef4ff;
  font-family: var(--mono);
  -webkit-backdrop-filter: blur(1.25rem) saturate(1.15);
  backdrop-filter: blur(1.25rem) saturate(1.15);
}

.atmosphere-lab[hidden] {
  display: none;
}

.atmosphere-lab-header,
.atmosphere-lab-control-label,
.atmosphere-lab-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.atmosphere-lab-header {
  margin-bottom: 1rem;
}

.atmosphere-lab h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
}

.atmosphere-lab-header p {
  margin: 0.2rem 0 0;
  color: rgba(224, 235, 255, 0.62);
  font-size: 0.55rem;
}

.atmosphere-lab kbd {
  font: inherit;
  color: #fff;
}

.atmosphere-lab button {
  border: 1px solid rgba(224, 235, 255, 0.2);
  border-radius: 999px;
  background: rgba(224, 235, 255, 0.06);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.atmosphere-lab button:hover {
  border-color: rgba(224, 235, 255, 0.48);
}

.atmosphere-lab button:focus-visible,
.atmosphere-lab input:focus-visible {
  outline: 2px solid #9dbdff;
  outline-offset: 2px;
}

.atmosphere-lab-close {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  font-size: 1rem;
}

.atmosphere-lab-control + .atmosphere-lab-control {
  margin-top: 0.8rem;
}

.atmosphere-lab-control-label {
  margin-bottom: 0.3rem;
  color: rgba(238, 244, 255, 0.78);
  font-size: 0.58rem;
}

.atmosphere-lab-control output {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.atmosphere-lab-control input {
  display: block;
  width: 100%;
  margin: 0;
  accent-color: #86aefb;
}

.atmosphere-lab-footer {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(224, 235, 255, 0.14);
}

.atmosphere-lab-footer button {
  padding: 0.45rem 0.65rem;
  font-size: 0.54rem;
}

.atmosphere-lab-status {
  flex-basis: 100%;
  min-height: 0.75rem;
  color: rgba(224, 235, 255, 0.62);
  font-size: 0.52rem;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 38.75rem) {
  .site {
    width: calc(100% - 2rem);
  }

  .site-header {
    min-height: 4.75rem;
  }

  main {
    padding: 3rem 0 4rem;
  }

  .identity {
    gap: 0.7rem;
  }

  .links {
    gap: 1rem;
  }

  .atmosphere-lab {
    top: auto;
    right: 0.75rem;
    bottom: 0.75rem;
    width: calc(100vw - 1.5rem);
    max-height: calc(100svh - 1.5rem);
  }
}
