:root {
  color-scheme: dark;
  --page: #100708;
  --ink: #f8e8e8;
  --accent: #ff4b54;
  --line: #492025;
  --gutter: clamp(1rem, 3.4vw, 3.5rem);
  --mono: "IBM Plex Mono", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--mono);
}

.site-header {
  display: flex;
  min-height: clamp(4.5rem, 7vw, 5.6rem);
  align-items: center;
  justify-content: space-between;
  margin-inline: var(--gutter);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mark,
.domain {
  color: var(--accent);
}

.mark {
  font-size: 1.1rem;
  letter-spacing: -0.11em;
}

.languages {
  display: flex;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
}

.languages a {
  display: grid;
  min-width: 2.55rem;
  min-height: 2.15rem;
  place-items: center;
  color: #c5a5a7;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 150ms, background-color 150ms;
}

.languages a:hover {
  color: var(--ink);
}

.languages a[aria-current="true"] {
  background: #3a1519;
  color: #ff8d91;
}

main,
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero {
  gap: clamp(1.5rem, 3.4vw, 3rem);
  padding-block: clamp(2rem, 7.5vh, 5rem);
}

.ascii-field {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: grid;
  width: 100%;
  padding: clamp(3.2rem, 5vw, 5.25rem) var(--gutter);
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle, #632b34 0.5px, transparent 0.8px) center / 12px 12px,
    radial-gradient(ellipse at center, #260b10, var(--page) 78%);
}

.ascii-field::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(var(--page), transparent 23%, transparent 77%, var(--page));
  content: "";
  pointer-events: none;
}

.shader {
  position: absolute;
  z-index: -2;
  width: 100%;
  height: 100%;
  inset: 0;
  opacity: 0.6;
}

.frame {
  position: absolute;
  display: grid;
  grid-template: 1fr 1fr / 1fr 1fr;
  inset: 1.5rem var(--gutter);
  pointer-events: none;
}

.frame i {
  width: 0.65rem;
  height: 0.65rem;
  border: solid #9c4049;
}

.frame i:nth-child(1) { border-width: 1px 0 0 1px; }
.frame i:nth-child(2) { justify-self: end; border-width: 1px 1px 0 0; }
.frame i:nth-child(3) { align-self: end; border-width: 0 0 1px 1px; }
.frame i:nth-child(4) { place-self: end; border-width: 0 1px 1px 0; }

.ascii-name {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: 0;
  color: var(--accent);
  font-family: "Courier New", "DejaVu Sans Mono", monospace;
  font-size: calc(100cqw / 34.49);
  font-weight: 400;
  font-variant-ligatures: none;
  line-height: 1;
  letter-spacing: 0;
  white-space: pre;
}

@supports (background-clip: text) {
  .ascii-name {
    background: linear-gradient(
      108deg,
      #f23851 37%,
      #ff6570 43%,
      #ffc1ad 48%,
      #fff1de 51%,
      #ff8b82 55%,
      #f23851 63%
    ) 50% 50% / 270% 100%;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 0.2em #ff2f403b);
    animation: shine 3.8s linear infinite;
  }
}

@keyframes shine {
  from { background-position: 100% 50%; }
  to { background-position: 0% 50%; }
}

.contact {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 3.25rem;
  align-items: stretch;
  width: max-content;
  max-width: calc(100% - 2 * var(--gutter));
  min-height: 3.65rem;
  background: var(--accent);
  color: #170608;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 160ms, box-shadow 160ms;
}

.contact:hover {
  background: #ff767b;
  box-shadow: 0 0 1.6rem #ff4b5445;
}

.contact:focus-visible,
.languages a:focus-visible {
  outline: 2px solid #ffd4c9;
  outline-offset: 4px;
}

#contact-label {
  align-self: center;
  padding: 0.9rem 1.15rem;
}

.contact-icon {
  display: grid;
  place-items: center;
  border-left: 1px solid #5e0e174f;
  font-size: 1.15rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 550px) {
  .hero { flex: 0 0 auto; }
  .frame { inset-block: 1.05rem; }
  .ascii-field { padding-block: 3.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ascii-name { background-position: 50% 50%; animation: none; }
  .contact, .languages a { transition: none; }
}
