:root {
  color-scheme: light;
  --ink: #15263b;
  --muted: #53647a;
  --accent: #215ce5;
  --line: #d9e1e9;
  --paper: #fbfcfe;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 7px; }
::selection { background: #dbe7ff; }

.page {
  width: min(100% - 8rem, 80rem);
  min-height: 100svh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

.masthead {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-block: 2.5rem;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: 5rem 7rem;
}

.profession {
  margin: 0 0 1.7rem;
  color: var(--accent);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 500;
  line-height: 1.5;
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(3.5rem, 8vw, 7.75rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.name-period { color: var(--accent); }

.location {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
  max-width: 100%;
  margin-top: 3.75rem;
  font-style: normal;
}

.contact-button {
  border: 1px solid var(--ink);
  border-radius: 0.25rem;
  background: var(--ink);
  color: white;
  padding: 0.8rem 1.25rem;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.contact-button:hover { background: var(--accent); border-color: var(--accent); }
.contact-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.contact-button:disabled { opacity: 0.65; cursor: wait; }
.contact-note { margin: 0; color: var(--muted); font-size: 0.875rem; line-height: 1.6; }
#contact-result { max-width: 100%; }
#contact-result p { max-width: 32rem; margin: 0; line-height: 1.6; }
.contact-image { display: block; width: 340px; max-width: 100%; height: auto; }
#contact-check { width: 20rem; max-width: 100%; }
altcha-widget {
  --altcha-max-width: 100%;
  --altcha-color-base: #fff;
  --altcha-color-base-content: var(--ink);
  --altcha-color-primary: var(--accent);
  --altcha-border-color: var(--line);
  --altcha-border-radius: 0.25rem;
  --altcha-checkbox-border-color: #8997aa;
  --altcha-checkbox-size: 1.5rem;
  --altcha-padding: 1rem;
}
.text-button { justify-self: start; padding: 0.5rem 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.text-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#contact-status { max-width: 32rem; margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .contact-button { transition: background-color 120ms ease, border-color 120ms ease; }
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.6rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

footer p { margin: 0; }

@media (max-width: 600px) {
  .page { width: calc(100% - 3rem); }
  .masthead { padding-block: 1.75rem; }
  main { padding-block: 4rem 5rem; }
  h1 { font-size: clamp(3rem, 12vw, 4.5rem); letter-spacing: -0.055em; }
  .profession { max-width: 16rem; margin-bottom: 1.5rem; }
  .contact-details { flex-direction: column; align-items: flex-start; margin-top: 2.75rem; }
}
