:root {
  color-scheme: light dark;
  --background: #fff3e5;
  --foreground: #163d87;
  --wordmark: #163d87;
  --acid: #ff7043;
  --shadow: #244b9a;
  --muted: #526899;
  --button-ink: #14213d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #101a36;
    --foreground: #f8f0e6;
    --wordmark: #f8f0e6;
    --acid: #ff7043;
    --shadow: #6a88e8;
    --muted: #a9badb;
    --button-ink: #101a36;
  }
}

:root[data-theme="light"] {
  --background: #fff3e5;
  --foreground: #163d87;
  --wordmark: #163d87;
  --acid: #ff7043;
  --shadow: #244b9a;
  --muted: #526899;
  --button-ink: #14213d;
}

:root[data-theme="dark"] {
  --background: #101a36;
  --foreground: #f8f0e6;
  --wordmark: #f8f0e6;
  --acid: #ff7043;
  --shadow: #6a88e8;
  --muted: #a9badb;
  --button-ink: #101a36;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "DM Mono", ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.page {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: clamp(20px, 4vw, 48px);
  grid-template-rows: 1fr auto;
}

.wordmark {
  position: absolute;
  top: clamp(-30px, -2.2vw, -6px);
  left: clamp(-16px, -1.6vw, -4px);
  margin: 0;
  color: var(--wordmark);
  font-family: "Archivo Black", system-ui, sans-serif;
  font-size: clamp(56px, 14.5vw, 190px);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.82;
  pointer-events: none;
  text-transform: uppercase;
}

.wordmark span { display: block; }

.contact {
  position: absolute;
  top: clamp(360px, 38vw, 510px);
  right: clamp(24px, 5vw, 64px);
  display: inline-block;
  min-width: clamp(260px, 26vw, 380px);
  padding: clamp(16px, 3.2vw, 24px) clamp(26px, 5.5vw, 42px);
  background: var(--acid);
  box-shadow: 8px 8px 0 var(--shadow);
  color: var(--button-ink);
  font-family: "Archivo Black", system-ui, sans-serif;
  font-size: clamp(20px, 4vw, 30px);
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transform: rotate(-3deg);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.contact:hover { box-shadow: 11px 11px 0 var(--shadow); transform: rotate(-3deg) translate(-2px, -2px); }
.contact:focus-visible { outline: 3px solid var(--foreground); outline-offset: 4px; }

.footer-tools {
  position: absolute;
  bottom: clamp(20px, 4vw, 48px);
  left: clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.theme-toggle {
  height: 1.4rem;
  border: 0;
  border-left: 1px solid var(--muted);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0 0 0.8rem;
}

.theme-toggle:hover { color: var(--acid); }
.theme-toggle:focus-visible { outline: 3px solid var(--acid); outline-offset: 4px; }

.meta {
  margin: 0;
  color: var(--muted);
  font-size: clamp(11px, 1.2vw, 12px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .page { display: grid; min-height: 100svh; grid-template-rows: 1fr auto; }
  .wordmark {
    position: absolute;
    top: clamp(-18px, -4vw, -6px);
    left: clamp(-12px, -3vw, -4px);
    font-size: clamp(52px, 22vw, 132px);
  }
  .contact {
    position: absolute;
    top: clamp(230px, 62vw, 340px);
    right: auto;
    left: 50%;
    bottom: auto;
    width: fit-content;
    max-width: 80vw;
    min-width: 0;
    padding: clamp(16px, 4.5vw, 25px) clamp(20px, 6vw, 36px);
    font-size: clamp(24px, 11vw, 32px);
    white-space: nowrap;
    transform: translateX(-50%) rotate(-3deg);
  }
  .contact:hover { transform: translateX(-50%) rotate(-3deg) translate(-2px, -2px); }
  .footer-tools { bottom: clamp(18px, 4vw, 28px); left: clamp(20px, 7vw, 36px); }
}

@media (prefers-reduced-motion: reduce) { .contact { transition: none; } }
