/* Colors and fonts: change these to make the page yours. */
:root {
  --bg: #f5efe6;
  --card: #fcf8f2;
  --raised: #ede5d8;
  --ink: #1f1b17;
  --ink-2: #5c5348;
  --ink-3: #776d61;
  --line: rgba(31, 27, 23, 0.1);
  --accent: #a84a24;      /* terracotta: the brush stroke and focus ring */
  --jade: #2f7d6b;        /* the status dot */
  --font-body: "Familjen Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Syne", var(--font-body);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #161412;
  --card: #1d1a17;
  --raised: #27231f;
  --ink: #efe9de;
  --ink-2: #b0a89c;
  --ink-3: #8f877b;
  --line: rgba(239, 233, 222, 0.09);
  --accent: #e0794c;
  --jade: #4cb49a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161412;
    --card: #1d1a17;
    --raised: #27231f;
    --ink: #efe9de;
    --ink-2: #b0a89c;
    --ink-3: #8f877b;
    --line: rgba(239, 233, 222, 0.09);
    --accent: #e0794c;
    --jade: #4cb49a;
    color-scheme: dark;
  }
}

@font-face {
  font-family: "Familjen Grotesk";
  src: url("fonts/familjen-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Syne";
  src: url("fonts/syne-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

.page { width: min(480px, 100% - 32px); margin: 0 auto; padding: 48px 0 40px; display: grid; gap: 32px; }

/* Profile */
.profile { position: relative; display: grid; justify-items: center; text-align: center; gap: 12px; }
.avatar { width: 96px; height: 96px; border-radius: 50%; margin-bottom: 4px; }
.profile h1 { position: relative; font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1.1; letter-spacing: -0.01em; padding-bottom: 8px; }
/* Signature: one terracotta brush stroke under the name */
.brush { position: absolute; left: -4px; right: -4px; bottom: -4px; width: calc(100% + 8px); height: 12px; fill: var(--accent); opacity: 0.85; }
.bio { color: var(--ink-2); font-size: 17px; max-width: 26rem; margin-top: 4px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--jade); }

.theme-toggle {
  position: absolute; top: -24px; right: 0;
  display: grid; place-items: center; width: 40px; height: 40px;
  color: var(--ink-2); background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.theme-toggle:hover { background: var(--raised); color: var(--ink); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* Featured print: the one rich thing on the page */
.featured-card {
  display: block; text-decoration: none; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: border-color 150ms var(--ease), transform 120ms var(--ease);
}
.featured-card:hover { border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.featured-card:active { transform: scale(0.99); }
.featured-card img { width: 100%; aspect-ratio: 10 / 7; object-fit: cover; }
.featured-text { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 16px 20px 20px; }
.featured-kicker { font-size: 13px; color: var(--accent); }
.featured-card h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.2; margin-top: 2px; }
.featured-meta { font-size: 14px; color: var(--ink-3); margin-top: 4px; }
.featured-price { font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 500; flex: none; }

/* Links */
.links { display: grid; gap: 8px; }
.links a {
  display: grid; gap: 2px; padding: 14px 20px; min-height: 64px; align-content: center;
  text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 120ms var(--ease);
}
.links a:hover { background: var(--raised); }
.links a:active { transform: scale(0.99); }
.link-title { font-size: 16px; font-weight: 500; }
.link-meta { font-size: 14px; color: var(--ink-3); }

/* Latest */
.latest { display: grid; gap: 12px; }
.latest h2 { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.latest-grid a { display: grid; gap: 8px; text-decoration: none; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.latest-grid img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; transition: opacity 150ms var(--ease); }
.latest-grid a:hover img { opacity: 0.88; }
.latest-grid a:hover span { color: var(--ink); }

/* Socials */
.socials { display: grid; justify-items: center; gap: 16px; padding-top: 8px; }
.socials ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.socials a { font-size: 15px; color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.socials a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.fineprint { font-size: 13px; color: var(--ink-3); }

@media (max-width: 400px) {
  .page { padding-top: 40px; gap: 28px; }
  .profile h1 { font-size: 28px; }
  .featured-text { padding: 14px 16px 16px; }
  .links a { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
