/* robertoartiles.com
   A single card on a softly blurred, tinted photograph, in the spirit of the
   previous Carrd page. Type: Source Sans 3 (SIL Open Font License), self-hosted. */

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #313f47;
  --ink-soft: #7a858c;
  --line: #c8cccf;
  --card: rgba(255, 255, 255, 0.93);
  --accent: #ff7496;
  --tint-a: rgba(255, 165, 150, 0.5);
  --tint-b: rgba(0, 228, 255, 0.35);
  --base: #1c2a2a;
}

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

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  background: var(--base);
  color: var(--ink);
  font-family: "Source Sans 3", "Source Sans Pro", "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.4;
  overflow-x: hidden;
}

/* --- backdrop -------------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--base);
}

.backdrop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
  /* Overscan hides the blur's soft edges. */
  transform: scale(1.08);
  filter: blur(10px) saturate(0.85);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(60deg, var(--tint-a) 9%, var(--tint-b) 100%);
}

/* --- card ------------------------------------------------------------ */

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  padding: 3rem 2.5rem 2.75rem;
  text-align: center;
  background: var(--card);
  border-radius: 0.5rem;
  box-shadow: 0 2rem 4rem -2rem rgba(0, 0, 0, 0.55);
  animation: arrive 0.8s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.portrait {
  display: block;
  width: 10rem;
  height: 10rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px #e4e7e9;
}

h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-wrap: balance;
  /* Compensate for the trailing letter-spacing so the text looks centred. */
  padding-left: 0.16em;
}

hr {
  width: 4rem;
  height: 0;
  margin: 1.25rem auto 1.25rem;
  border: 0;
  border-top: 1px solid var(--line);
}

.links {
  list-style: none;
  margin: 0 -0.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.125rem;
  height: 3.125rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: color 0.25s ease, border-color 0.25s ease;
}

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

.links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.links svg {
  width: 52%;
  height: 52%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 404 page */
.card p {
  margin: 0;
  color: var(--ink-soft);
}

.card p a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.card p a:hover {
  color: var(--accent);
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
  .card { padding: 2.5rem 1.5rem 2.25rem; }
  .portrait { width: 8.5rem; height: 8.5rem; }
  h1 { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .links a { transition: none; }
}
