/* roy.io: one page, self-hosted fonts. Colours and type follow roytomeij.com; the roys.blog card borrows its wordmark. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  /* Weight axis only, like roytomeij.com (next/font): renders at Fraunces' default optical size. */
  src: url("/assets/fonts/fraunces-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Bungee";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  /* Subset to the glyphs of "roys.blog". */
  src: url("/assets/fonts/bungee-wordmark.woff2") format("woff2");
}

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --faint: #78716c;
  --quiet: #a8a29e;
  --border: #e7e5e4;
  --accent: #b45309;
  --heading: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 72px 20px;
}

.page > * {
  width: 100%;
  max-width: 540px;
}

/* Intro */

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.portrait {
  display: block;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
}

.roles {
  margin: 0;
  /* Shrinks a little on very narrow phones so the line never wraps around a dot. */
  font-size: clamp(11.5px, 3.6vw, 14px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent);
}

.name {
  margin: 0;
  font-family: var(--heading);
  font-weight: 600;
  font-size: clamp(44px, 12vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* Site cards */

.sites {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.avatar {
  flex: none;
  display: block;
  width: 52px;
  height: 52px;
}

.avatar-rt {
  border-radius: 12px;
}

.card-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  line-height: 1.2;
}

.card-title-rt {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.card-title-blog {
  font-family: "Bungee", var(--body);
  font-size: 19px;
}

.card-desc {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.arrow {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--quiet);
  transition: transform 0.25s ease, color 0.2s ease;
}

/* Other links: three across, two on narrow phones */

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.link svg {
  flex: none;
  fill: currentColor;
}

.link svg.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

/* Interaction */

.card:hover,
.link:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px -14px rgba(180, 83, 9, 0.35);
}

.card:hover {
  transform: translateY(-2px);
}

.card:hover .arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}

.card:focus-visible,
.link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .link,
  .arrow {
    transition: none;
  }

  .card:hover,
  .card:hover .arrow {
    transform: none;
  }
}

/* Phones: no full-height centring, half the space above and below */

@media (max-width: 599px) {
  .page {
    min-height: 0;
    padding-top: 44px;
    padding-bottom: 44px;
  }
}
