/* richardsondaniel.com
   Dark, editorial, typographic. Tokens first, then base, layout, sections. */

/* Self-hosted latin subsets: Instrument Serif and Inter (SIL Open Font License) */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/InstrumentSerif-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/assets/fonts/Inter.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --canvas: #0b0b0c;
  --surface: #141416;
  --surface-hover: #19191c;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);

  --text: #f2efe8;
  --text-2: #a7a39b;
  --text-3: #8a857d; /* muted, still AA on canvas at small sizes */

  --accent: #e8a33d;
  --accent-soft: rgba(232, 163, 61, 0.14);

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shell: 1120px;
  --gutter: clamp(16px, 5vw, 32px);
  --section-gap: clamp(72px, 12vw, 128px);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(16px, 1.05vw + 12px, 18px);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

::selection { background: var(--accent); color: var(--canvas); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--canvas);
  font-weight: 500;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.accent { color: var(--accent); }

/* Underline links that animate in from the left */
.hero__links a,
.site-footer__links a,
.card__link,
.also a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s var(--ease), color 0.2s ease;
}
.hero__links a:hover,
.site-footer__links a:hover,
.card__link:hover {
  background-size: 100% 1px;
  color: var(--accent);
}

/* ---------- labels and headings ---------- */

.label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
}

.section__heading {
  max-width: 20ch;
  text-wrap: balance;
  margin-bottom: clamp(36px, 6vw, 56px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.prose {
  max-width: 60ch;
  color: var(--text-2);
}
.prose + .prose { margin-top: 1em; }

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled {
  background: rgba(11, 11, 12, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--hairline);
}

.site-nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.monogram {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--accent);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.monogram:hover { border-color: var(--accent); background: var(--accent-soft); }

.site-nav__links {
  display: flex;
  gap: 36px;
  font-size: 15px;
  color: var(--text-2);
}
.site-nav__links a { transition: color 0.2s ease; }
.site-nav__links a:hover { color: var(--text); }

.site-nav__toggle {
  display: none;
  appearance: none;
  padding: 8px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.site-nav__panel {
  border-top: 1px solid var(--hairline);
  background: rgba(11, 11, 12, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-nav__panel nav {
  display: flex;
  flex-direction: column;
  padding-block: 8px 20px;
}
.site-nav__panel a {
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.2;
}
.site-nav__panel a:last-child { border-bottom: 0; }

@media (max-width: 719px) {
  .site-nav__links { display: none; }
  .site-nav__toggle { display: inline-flex; }
}
@media (min-width: 720px) {
  .site-nav__panel { display: none !important; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow-x: clip;
  padding-top: clamp(24px, 6vw, 56px);
  padding-bottom: var(--section-gap);
}

/* soft warm glow behind the portrait */
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -20% auto auto;
  width: min(70vw, 760px);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(232, 163, 61, 0.09), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero__inner {
  display: grid;
  gap: 32px;
  align-items: end;
}

.hero__figure {
  justify-self: center;
  width: min(72vw, 320px);
}
.hero__figure img {
  width: 100%;
  filter: grayscale(1) contrast(1.04);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
}

.hero__text { position: relative; }

.hero__name {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.5rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.hero__name span { display: block; }

.hero__line {
  max-width: 34ch;
  text-wrap: pretty;
  margin-top: clamp(24px, 4vw, 36px);
  font-size: clamp(1.125rem, 1.6vw + 0.6rem, 1.5rem);
  line-height: 1.45;
  color: var(--text-2);
}
.hero__line .accent { color: var(--text); }

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 32px;
  font-size: 15px;
  color: var(--text);
}
.hero__links a { padding-bottom: 2px; }

@media (min-width: 880px) {
  .hero { padding-top: clamp(40px, 7vw, 96px); }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
    gap: 0;
  }
  .hero__text { grid-column: 1; grid-row: 1; z-index: 1; padding-bottom: 12px; }
  .hero__figure {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 100%;
    max-width: 440px;
    margin-left: -12%;
  }
}

/* ---------- sections ---------- */

.section {
  padding-block: 0 var(--section-gap);
}

/* Now */
.now {
  display: grid;
  gap: 18px;
  max-width: 44ch;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw + 0.6rem, 2.25rem);
  line-height: 1.22;
  letter-spacing: -0.005em;
}
.now li { color: var(--text); }
.now li + li { color: var(--text-2); }

/* Work cards */
.cards {
  display: grid;
  gap: 16px;
}
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.2vw, 36px);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease);
}
.card:hover {
  background: var(--surface-hover);
  border-color: var(--hairline-strong);
}

.card__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 2.4vw + 0.8rem, 2.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.card__role {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.card__desc {
  margin-top: 20px;
  color: var(--text);
}

.card__outcome {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-size: 0.94em;
  color: var(--text-2);
}

.card__link {
  align-self: flex-start;
  display: inline-flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 24px;
  font-size: 14px;
  color: var(--text-2);
  background-position: 0 calc(100% - 0px);
}
/* reserve spacing when a card has no link so outcomes line up */
.card__outcome:last-child { margin-bottom: 0; }

/* Proof */
.stats {
  display: grid;
  gap: 32px;
  padding-block: clamp(8px, 2vw, 16px) clamp(48px, 8vw, 80px);
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}
.stats li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline-strong);
}
.stats__num {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}
.stats__cap {
  max-width: 24ch;
  font-size: 15px;
  color: var(--text-2);
}

.quotes {
  display: grid;
  gap: 16px;
}
@media (min-width: 960px) {
  .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
.quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.quote blockquote p {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1vw + 0.9rem, 1.4rem);
  line-height: 1.35;
  color: var(--text);
}
.quote blockquote p::before { content: "\201C"; color: var(--accent); }
.quote blockquote p::after { content: "\201D"; color: var(--accent); }
.quote__by {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

/* Background timeline */
.timeline {
  border-top: 1px solid var(--hairline);
}
.timeline li {
  display: grid;
  gap: 6px;
  padding-block: 24px;
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 720px) {
  .timeline li {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 32px;
    padding-block: 28px;
  }
}
.timeline__years {
  font-size: 14px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}
.timeline__body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.2vw + 1rem, 1.65rem);
  line-height: 1.2;
}
.timeline__body p {
  max-width: 62ch;
  margin-top: 6px;
  color: var(--text-2);
}

.also {
  margin-top: clamp(48px, 7vw, 72px);
}
.also__title {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.also ul {
  display: grid;
  gap: 14px;
}
@media (min-width: 880px) {
  .also ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
}
.also li {
  font-size: 15px;
  color: var(--text-2);
}
.also li span {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  color: var(--text);
}

/* Contact */
.section--contact .section__heading { max-width: 16ch; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent);
  color: #16110a;
}
.btn--primary:hover { background: #f0b457; }
.btn--ghost {
  border: 1px solid var(--hairline-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--text-2); }

/* ---------- footer ---------- */

.site-footer {
  padding-block: 40px 48px;
  border-top: 1px solid var(--hairline);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
}
.site-footer__name {
  font-family: var(--serif);
  font-size: 24px;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 15px;
  color: var(--text-2);
}
.site-footer__note {
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- reveal motion ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s var(--ease) var(--reveal-delay, 0ms),
    transform 0.5s var(--ease) var(--reveal-delay, 0ms);
}
.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

.nowrap { white-space: nowrap; }
