:root {
  --bg: #11100e;
  --ink: #f3eee4;
  --muted: #9a9488;
  --line: rgba(243, 238, 228, 0.12);
  --accent: #d26a3a;
  --pad: clamp(1.25rem, 4vw, 2.75rem);
}

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

html,
body {
  min-height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman",
    serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
}

.noise,
.rails {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.rails {
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 72px,
    var(--line) 72px,
    var(--line) 73px
  );
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.55;
}

.noise {
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.skip {
  position: absolute;
  left: var(--pad);
  top: 0.5rem;
  transform: translateY(-150%);
  color: var(--bg);
  background: var(--ink);
  padding: 0.4rem 0.7rem;
  z-index: 4;
}

.skip:focus {
  transform: none;
}

.top,
main,
.links {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: var(--pad);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.mark {
  margin: 0;
  color: var(--ink);
}

.top-end {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.place {
  margin: 0;
}

.langs {
  display: flex;
  gap: 0.4rem;
}

.langs button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.12rem;
  margin: 0;
  line-height: 0;
  cursor: pointer;
  opacity: 0.4;
  color: inherit;
}

.langs button[aria-pressed="true"] {
  opacity: 1;
}

.langs button:hover,
.langs button:focus-visible {
  opacity: 1;
}

.langs svg {
  display: block;
  width: 1.2rem;
  height: 0.86rem;
  border-radius: 1px;
  box-shadow: 0 0 0 1px var(--line);
}

html[lang="en"] .t-pt,
html:not([lang="en"]) .t-en {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--pad) 3rem;
  max-width: 18ch;
}

.kicker {
  margin: 0 0 1.1rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(3.4rem, 12vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

h1 span {
  display: block;
}

.family {
  white-space: nowrap;
}

.role {
  margin: 1.6rem 0 0;
  max-width: 22rem;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.35;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.railway {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}

.railway:hover,
.railway:focus-visible {
  color: var(--accent);
}

.links {
  display: flex;
  gap: 1.6rem;
  padding: var(--pad);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 1px solid var(--line);
}

.links a {
  color: var(--muted);
  text-decoration: none;
}

.links a:hover,
.links a:focus-visible {
  color: var(--ink);
}

@media (max-width: 640px) {
  .family {
    white-space: normal;
  }

  main {
    max-width: none;
    padding-bottom: 2rem;
  }

  .links {
    flex-wrap: wrap;
    gap: 1rem 1.4rem;
  }

  .place {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .kicker,
  h1,
  .role {
    animation: rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  h1 {
    animation-delay: 80ms;
  }

  .role {
    animation-delay: 160ms;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .noise,
  .rails,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #111;
  }

  .role,
  .links a,
  .place,
  .top {
    color: #333;
  }

  .railway {
    color: #111;
  }
}
