/* aurelhubert.com — the only stylesheet.
   System fonts, so nothing loads but this file. One accent, used for hover
   and focus only; everything else is ink on a warm off-white, inverted in
   dark mode. */

:root {
  color-scheme: light dark;

  --ground:   #f7f6f3;
  --ink:      #16171a;
  --ink-soft: #5d6068;
  --hair:     #d6d3cc;
  --accent:   #2f4fd6;

  --name:  clamp(2.5rem, 9vw, 4.75rem);
  --intro: clamp(1.125rem, 2.6vw, 1.375rem);
  --col:   40rem;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:   #111214;
    --ink:      #ececee;
    --ink-soft: #9a9ea8;
    --hair:     #34363c;
    --accent:   #93a6ff;
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* One column, vertically centred on tall screens, top-weighted on short ones. */
.page {
  min-height: 100vh;
  min-height: 100svh;
  max-width: var(--col);
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 7rem) clamp(1.5rem, 6vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.name {
  margin: 0;
  font-size: var(--name);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
  /* optical alignment: pull the first letter's side bearing back */
  margin-left: -0.04em;
}

.intro {
  margin: 0;
  font-size: var(--intro);
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* --- links --- */

.links {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--hair);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: color 200ms var(--ease), text-decoration-color 200ms var(--ease);
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

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

/* Arrows are decoration: the empty alt text keeps screen readers from
   announcing "north east arrow" after every link. */
.links a::after,
.back::before {
  display: inline-block;
  color: var(--ink-soft);
  transition: color 200ms var(--ease), transform 200ms var(--ease);
}

.links a::after {
  content: "\2197";
  content: "\2197" / "";
  margin-left: 0.3em;
}

.back::before {
  content: "\2190";
  content: "\2190" / "";
  margin-right: 0.35em;
}

/* the way back is not an outbound link */
.links .back::after { content: none; }

.links a:hover::after { color: var(--accent); transform: translate(0.12em, -0.12em); }
.back:hover::before   { color: var(--accent); transform: translateX(-0.2em); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
