:root {
  color-scheme: light;
  --paper: #f8fbfa;
  --ink: #112e35;
  --text: #40555c;
  --muted: #546d72;
  --teal: #007970;
  --rule: #cfdddb;
  --hover: #e2f2ee;
  --button: #006e67;
  --button-hover: #005851;
  --button-ink: #fff;
  --gutter: max(6.5vw, (100vw - 1380px) / 2);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0a1b21;
  --ink: #f4faf9;
  --text: #c2d5d7;
  --muted: #a4bcc0;
  --teal: #5de0cb;
  --rule: #29464b;
  --hover: #18363c;
  --button: #69e1ce;
  --button-hover: #91eddc;
  --button-ink: #062e30;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { margin-inline: var(--gutter); }
header, footer, .utilities, .location, #contact, button, .email {
  display: flex;
  align-items: center;
}

header, footer { justify-content: space-between; }
header { padding-block: clamp(1.75rem, 4.6vh, 3.75rem); }
.monogram { display: block; }
.utilities { gap: 1.5rem; }
.location { gap: 0.5rem; font-size: 0.9375rem; font-weight: 500; }
.location svg { width: 1.1rem; color: var(--teal); }

svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

button, .email {
  gap: 0.7rem;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  transition: color 150ms, background-color 150ms, border-color 150ms;
}

.icon-button {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  color: var(--ink);
}

.icon-button:hover { color: var(--teal); background: var(--hover); }
.sun, [data-theme="dark"] .moon { display: none; }
[data-theme="dark"] .sun { display: block; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }

main {
  flex: 1;
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  padding-block: 3rem 4rem;
}

.intro { width: min(44vw, 42.5rem); }
p { margin: 0; }
.role {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--teal);
  font-size: clamp(0.8rem, 1.05vw, 1rem);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.145em;
}

.role::before { content: ""; width: 2.4rem; height: 2px; background: currentColor; }
h1 {
  margin: 1rem 0 1.8rem -0.055em;
  line-height: 1.08;
  font-size: clamp(3.25rem, 6.35vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.048em;
  color: var(--ink);
}

.intro p:not(.role) {
  font-size: clamp(1.0625rem, 1.35vw, 1.3rem);
  letter-spacing: -0.01em;
  line-height: 1.58;
  max-width: 46ch;
  margin-top: 1.05rem;
}

#contact { gap: 0.65rem; position: relative; margin-top: 2.2rem; }
.email {
  padding: 0.9rem 1.3rem;
  min-height: 3.25rem;
  border-radius: 0.65rem;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.email:hover { background: var(--button-hover); }
#copy { flex-shrink: 0; width: 3.25rem; height: 3.25rem; border-radius: 0.65rem; }
#feedback {
  position: absolute;
  top: calc(100% + 0.5rem);
  font-size: 0.9rem;
  color: var(--teal);
}

#terrain {
  position: absolute;
  z-index: -1;
  right: 0;
  width: min(55vw, 55rem);
  height: min(100%, 49vw, 49rem);
  pointer-events: none;
}

footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(1rem, 2.7vh, 2rem);
  color: var(--muted);
  font-size: 0.9rem;
}

small { font-size: inherit; }
#shuffle { min-height: 2.75rem; gap: 0.55rem; font-weight: 500; }
#shuffle svg { width: 1.1rem; color: var(--teal); }
#shuffle:hover { color: var(--teal); }

@media (max-width: 56rem) {
  :root { --gutter: 7vw; }
  header { padding-block: 1.5rem; }
  .monogram { width: 2.9rem; height: 2.9rem; }
  .utilities { gap: 1rem; }
  .location { font-size: 0.875rem; }
  main { padding-block: 2rem 0; grid-template-rows: auto 1fr; }
  .intro { width: min(100%, 38rem); }
  h1 { font-size: clamp(2.5rem, 12.15vw, 5rem); margin-block: 0.8rem 1.3rem; }
  .intro p:not(.role) { max-width: 100%; margin-top: 0.85rem; }
  #contact { margin-top: 1.65rem; }
  #terrain {
    position: relative;
    width: 100%;
    height: clamp(15rem, 68vw, 26rem);
    margin-top: 1.4rem;
  }
  footer { padding-block: 0.8rem; font-size: 0.8rem; }
}

@media (max-width: 26rem) {
  :root { --gutter: 5.5vw; }
  header { padding-block: 1.2rem; }
  main { padding-top: 1.5rem; }
  .role { font-size: 0.72rem; }
  .intro p:not(.role) { font-size: 1rem; }
  .email { font-size: 0.9rem; gap: 0.5rem; padding: 0.75rem; }
  .email, #copy { min-height: 2.9rem; height: auto; }
  #copy { width: 2.9rem; }
  #contact { gap: 0.45rem; }
  footer { font-size: 0.75rem; }
}

@media (max-width: 22rem) {
  .email { padding-inline: 0.65rem; font-size: 0.875rem; }
  .email svg { display: none; }
}
