/* Layout: sun-bleached paper page, the brush logo as the star; expanded ink-black sans for structure, one blue brush swash for accent */
:root {
  --bg: #f6f3ef;
  --fg: #111111;
  --muted: #5d5f66;
  --line: rgba(17, 17, 17, 0.16);
  --accent: #1d4fd8;
  --haze-a: rgba(110, 160, 255, 0.38);
  --haze-b: rgba(255, 205, 160, 0.34);
  --card: rgba(255, 255, 255, 0.6);
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --logo: url("/assets/logo.png");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0b0e; --fg: #f4f1ec; --muted: #9a9ca4; --line: rgba(244, 241, 236, 0.16);
    --accent: #7fa3ff; --haze-a: rgba(50, 95, 220, 0.34); --haze-b: rgba(255, 150, 100, 0.10);
    --card: rgba(18, 20, 26, 0.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b0e; --fg: #f4f1ec; --muted: #9a9ca4; --line: rgba(244, 241, 236, 0.16);
  --accent: #7fa3ff; --haze-a: rgba(50, 95, 220, 0.34); --haze-b: rgba(255, 150, 100, 0.10);
  --card: rgba(18, 20, 26, 0.6); color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 16px; line-height: 1.6; font-variation-settings: "wdth" 100;
  padding-inline: 20px; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.haze { position: fixed; inset: -20vmax; z-index: -1; pointer-events: none; filter: blur(60px); }
.haze::before, .haze::after { content: ""; position: absolute; border-radius: 50%; }
.haze::before { width: 70vmax; height: 55vmax; left: 30%; top: 0; background: radial-gradient(closest-side, var(--haze-a), transparent); animation: drift 26s ease-in-out infinite alternate; }
.haze::after { width: 55vmax; height: 45vmax; left: 5%; top: 35%; background: radial-gradient(closest-side, var(--haze-b), transparent); animation: drift 34s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-8vmax, 6vmax) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .haze::before, .haze::after { animation: none; } }

.wrap { max-width: 1040px; margin: 0 auto; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.caps { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125; text-transform: uppercase; letter-spacing: 0.02em; }

/* Logo, recolored by theme through a mask */
.logo { display: inline-block; background: var(--fg); aspect-ratio: 922 / 278; max-width: 100%;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.bar .mark .logo { height: 38px; }
.wordmark .logo { display: block; width: min(100%, 860px); }
.avatar .logo { width: 80%; }

/* Brush swash, echoing the long tail of the logo */
.swash { display: block; width: min(320px, 70%); height: 22px; color: var(--accent); }
.swash path { fill: currentColor; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 20px; }
.bar .mark { text-decoration: none; display: inline-flex; }
.bar nav { display: flex; gap: 22px; flex-wrap: wrap; }
.bar nav a { text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.bar nav a:hover { color: var(--fg); }

.hero { padding-block: clamp(48px, 10vw, 120px) clamp(48px, 8vw, 88px); display: grid; gap: 24px; }
.wordmark { margin: 0 0 0 -1.5%; line-height: 0; }
.hero p.lede { font-size: clamp(20px, 3vw, 30px); max-width: 24ch; margin: 0; line-height: 1.15; text-wrap: balance; }
.coords { display: flex; gap: 24px; flex-wrap: wrap; }

section { padding-block: 56px; border-top: 2px solid var(--fg); }
section h2 { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125; text-transform: uppercase; font-size: clamp(22px, 3.4vw, 32px); letter-spacing: 0.01em; line-height: 1.05; margin: 0 0 10px; text-wrap: balance; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; }
.split p { margin: 0 0 14px; max-width: 60ch; font-size: 17px; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; gap: 16px; } }

.next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--fg); border-radius: 18px; overflow: hidden; background: var(--card); backdrop-filter: blur(8px); }
.next > div { padding: 20px; display: grid; gap: 6px; }
.next > div + div { border-left: 1px solid var(--line); }
.next strong { font-weight: 700; font-size: 18px; }
@media (max-width: 640px) { .next { grid-template-columns: 1fr; } .next > div + div { border-left: 0; border-top: 1px solid var(--line); } }

.roster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
@media (max-width: 820px) { .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.roster a { border: 2px solid var(--fg); border-radius: 18px; padding: 20px 18px; text-decoration: none; display: grid; gap: 18px; background: var(--card); transition: background .2s, color .2s, transform .2s; }
.roster a:hover { background: var(--fg); color: var(--bg); transform: rotate(-1.5deg); }
.roster a:hover .go { color: inherit; }
.roster .name { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125; text-transform: uppercase; font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
.roster .go { color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .roster a:hover { transform: none; } }

footer { border-top: 2px solid var(--fg); padding-block: 28px 48px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.bio { max-width: 460px; margin: 0 auto; padding-block: 44px 64px; display: grid; gap: 26px; justify-items: center; text-align: center; }
.bio > * { width: 100%; }
.avatar { width: 120px !important; height: 120px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--fg);
  background: radial-gradient(circle at 30% 30%, var(--haze-b), transparent 60%), radial-gradient(circle at 70% 70%, var(--haze-a), transparent 70%), var(--card);
  font-family: var(--display); font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125; font-size: 36px; }
.bio h1 { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125; text-transform: uppercase; font-size: clamp(26px, 8vw, 36px); line-height: 1.05; margin: 0; text-wrap: balance; }
.bio .sub { margin: 8px 0 0; color: var(--muted); }
.bio .swash { margin: 10px auto 0; width: 140px; height: 14px; }
.links { display: grid; gap: 10px; text-align: left; }
.link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 22px; border: 2px solid var(--fg); border-radius: 999px; text-decoration: none; background: var(--card); backdrop-filter: blur(8px); font-weight: 700; transition: background .2s, color .2s, transform .15s; }
.link:hover { background: var(--fg); color: var(--bg); transform: translateY(-1px); }
.link.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.link.primary:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.link .arrow { font-family: var(--mono); font-size: 14px; }
.link.soon { border: 2px dashed var(--line); color: var(--muted); cursor: default; }
.link.soon:hover { background: var(--card); color: var(--muted); transform: none; }
.link .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.email { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 22px; border: 1px dashed var(--line); border-radius: 999px; text-align: left; }
.email span { user-select: all; overflow-wrap: anywhere; min-width: 0; }
.email button { font: inherit; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: var(--fg); border: 0; color: var(--bg); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.back { text-decoration: none; }
.back:hover { color: var(--fg); }

/* Photo avatars and email links */
.avatar.photo { overflow: hidden; padding: 0; }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.email a { text-decoration: none; overflow-wrap: anywhere; min-width: 0; }
.loading { padding-block: 120px; text-align: center; }

/* ───────── Editor (/edit) ───────── */
.editor { padding-block: 24px 80px; display: grid; gap: 32px; }
.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .editor-grid { grid-template-columns: 1fr; } }
.panel { border: 2px solid var(--fg); border-radius: 18px; padding: 24px; background: var(--card); backdrop-filter: blur(8px); display: grid; gap: 18px; min-width: 0; }
.panel h2 { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-variation-settings: "wdth" 125; text-transform: uppercase; font-size: 20px; margin: 0; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select { font: inherit; color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--fg); outline: none; }
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: 13px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.btn { font: inherit; font-weight: 700; border: 2px solid var(--fg); background: var(--fg); color: var(--bg); padding: 12px 22px; border-radius: 999px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--fg); }
.btn:disabled { opacity: .5; cursor: progress; }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.status { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.status.ok { color: var(--accent); }
.status.err { color: #c2372b; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 2px solid var(--fg); background: transparent; color: var(--fg); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.preview { border: 2px dashed var(--line); border-radius: 18px; padding: 0 16px; position: sticky; top: 16px; }
.preview .bio { padding-block: 28px; }
.preview .link, .preview a { pointer-events: none; }
.photo-row { display: flex; align-items: center; gap: 16px; }
.photo-row .avatar { width: 72px !important; height: 72px; font-size: 22px; flex: none; }
.team-list { display: grid; gap: 8px; }
.team-list div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.team-list span { overflow-wrap: anywhere; min-width: 0; }
.team-list button { font: inherit; font-size: 12px; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.login { max-width: 440px; margin: 0 auto; padding-block: 48px 80px; display: grid; gap: 24px; text-align: center; }
.login form { display: grid; gap: 14px; text-align: left; }
