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

:root {
  --ink: #14233a;
  --accent: #7c2d12;
}

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #a58c68;
  overflow: hidden;
  color: var(--ink);
  font-family: Heebo, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(12px, 3vh, 36px) 16px;
}

header {
  text-align: center;
  max-width: 640px;
  padding: clamp(14px, 2.6vh, 28px) clamp(18px, 4vw, 40px);
  /* soft white glow keeps the letters readable over the scaffold */
  text-shadow:
    0 0 2px #fff,
    0 0 4px #fff,
    0 0 6px #fff,
    0 0 10px #fff,
    0 0 16px rgba(255, 255, 255, 0.85);
}

.name {
  display: flex;
  flex-direction: column;
  margin: 0 0 clamp(16px, 3.4vh, 34px);
  text-wrap: balance;
}

.name strong {
  font-family: Rubik, Heebo, system-ui, sans-serif;
  font-size: clamp(1.35rem, min(5vw, 3.6vh), 1.9rem);
  font-weight: 700;
  line-height: 1.25;
}

.name span {
  font-size: clamp(0.9rem, min(3.6vw, 2.4vh), 1.1rem);
  font-weight: 500;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-family: Rubik, Heebo, system-ui, sans-serif;
  font-size: clamp(2rem, min(9vw, 7vh), 4.2rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* hazard-tape underline */
h1::after {
  content: "";
  display: block;
  width: 130px;
  height: 7px;
  margin: clamp(12px, 2.4vh, 24px) auto 0;
  border-radius: 4px;
  background: repeating-linear-gradient(-45deg, #f5b400 0 9px, var(--ink) 9px 18px);
}

.lede {
  margin: clamp(16px, 3.4vh, 34px) auto 0;
  font-size: clamp(0.95rem, min(4vw, 2.4vh), 1.15rem);
  line-height: 1.6;
  font-weight: 500;
  color: var(--ink);
  max-width: 52ch;
  text-wrap: pretty;
}

.contact { margin: clamp(18px, 3.8vh, 36px) 0 0; }

.contact a {
  display: inline-block;
  text-shadow: none;
  padding: 8px 20px;
  border-radius: 999px;
  background: #aaa;
  box-shadow: 0 2px 8px rgba(20, 35, 58, 0.14);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.fab {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s, box-shadow 0.15s;
}

.fab svg { width: 31px; height: 31px; }

.contact a:hover,
.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(20, 35, 58, 0.3);
}

.contact a:focus-visible,
.fab:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.site-footer {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  inset-inline: 0;
  text-align: center;
  pointer-events: none;
}

.site-footer a {
  pointer-events: auto;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.motion-toggle {
  position: fixed;
  left: calc(18px + env(safe-area-inset-left, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.motion-toggle svg { width: 22px; height: 22px; }

.site-footer a:focus-visible,
.motion-toggle:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.motion-paused .cloud,
.motion-paused .beacon,
.motion-paused .typing { animation-play-state: paused; }

.backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

.cloud { animation: drift linear infinite; }
.cloud.c1 { animation-duration: 150s; }
.cloud.c2 { animation-duration: 210s; animation-delay: -90s; }
.cloud.c3 { animation-duration: 180s; animation-delay: -40s; }
@keyframes drift {
  from { transform: translateX(-1500px); }
  to   { transform: translateX(2400px); }
}

.beacon { animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }

.typing { animation: type 0.28s steps(1) infinite; }
@keyframes type { 50% { transform: translate(-1.6px, -1.2px); } }

@media (prefers-reduced-motion: reduce) {
  .beacon, .cloud, .typing { animation: none; }
  .contact a, .fab { transition: none; }
}

/* Text pages, such as the accessibility statement */
body.doc {
  display: block;
  overflow: auto;
  background: #f7f4ef;
}

.doc article {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  line-height: 1.7;
}

.doc h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); margin-bottom: 0.4em; }
.doc h1::after { margin-inline: 0; }
.doc h2 { font-family: Rubik, Heebo, system-ui, sans-serif; font-size: 1.3rem; margin: 1.6em 0 0.4em; }
.doc a { color: var(--ink); font-weight: 700; }
.doc a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.doc .back { display: inline-block; margin-bottom: 16px; }
