/* wiredcanuck.com — Pierre Roman */
/* Layout: left-aligned, asymmetric; one deep-navy hero carrying the WiredCanuck network mark, white and ice-blue everywhere else */
:root {
  --navy: #0a2647;
  --blue: #0078d4;      /* WiredCanuck logo blue */
  --blue-strong: #005a9e;
  --sky: #7cc4ff;
  --ice: #eef5fc;
  --white: #ffffff;
  --slate: #586779;

  --ink: #15202d;
  --bg: var(--white);
  --surface: var(--ice);
  --muted: var(--slate);
  --line: #d8e2ed;
  --accent: var(--blue);
  --accent-strong: var(--blue-strong);
  --on-accent: #ffffff;
  --danger: #c42b1c;

  --hero-bg: var(--navy);
  --hero-fg: #f3f8fd;
  --hero-muted: #b9cbe0;
  --hero-dim: #6d8bb0;
  --hero-accent: var(--sky);

  --f-sans: "Archivo", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  /* type scale (1.25) */
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-lg: 1.3125rem;
  --t-xl: 1.75rem;
  --t-2xl: 2.5rem;
  --t-hero: clamp(3rem, min(9vw, 11.5vh), 6.5rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6eef7;
    --bg: #0b1a2e;
    --surface: #11243d;
    --muted: #9fb2c8;
    --line: #22395a;
    --accent: #4aa3ef;
    --accent-strong: #7cc4ff;
    --on-accent: #06121f;
    --danger: #ff8a7a;
    --hero-bg: #071427;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e6eef7;
  --bg: #0b1a2e;
  --surface: #11243d;
  --muted: #9fb2c8;
  --line: #22395a;
  --accent: #4aa3ef;
  --accent-strong: #7cc4ff;
  --on-accent: #06121f;
  --danger: #ff8a7a;
  --hero-bg: #071427;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--t-base);
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 64ch; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; font-variation-settings: "wdth" 112; letter-spacing: -0.01em; }
.brand img { width: 34px; height: auto; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 6px; font-size: var(--t-sm); font-weight: 500; }
.nav a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .nav-cta { background: var(--accent); color: var(--on-accent); border-radius: 6px; box-shadow: none; }
.nav .nav-cta:hover { background: var(--accent-strong); color: var(--on-accent); }

/* ---------- hero (the one loud thing) ---------- */
.hero { background: var(--hero-bg); color: var(--hero-fg); position: relative; overflow: hidden; }
.hero .wrap { padding-top: clamp(32px, min(5vw, 6vh), 64px); padding-bottom: clamp(40px, min(5.5vw, 7vh), 72px); display: grid; gap: clamp(22px, min(3vw, 3.6vh), 36px); }
.trace {
  font-family: var(--f-mono);
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  line-height: 1.6;
  color: var(--hero-muted);
  margin: 0;
  white-space: pre-wrap;
  min-height: 10.6em;
}
.trace .cmd { color: var(--hero-fg); }
.trace .hop { display: block; opacity: 0; transform: translateX(-6px); }
.trace .hop.on { opacity: 1; transform: none; transition: opacity .25s, transform .25s; }
.trace .ms { color: var(--hero-dim); }
.trace .done { color: var(--hero-accent); }
.trace .caret { display: inline-block; width: .6em; height: 1.1em; background: var(--hero-accent); vertical-align: -0.18em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-name {
  margin: 0;
  font-size: var(--t-hero);
  line-height: .92;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-variation-settings: "wdth" 125;
  color: var(--hero-fg);
}
.hero-name .cable-rule { display: block; height: 6px; width: 0; background: var(--hero-accent); margin-top: .18em; border-radius: 3px; }
.hero.resolved .cable-rule { width: 2.4em; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.hero-sub { max-width: 46ch; font-size: var(--t-lg); line-height: 1.45; color: var(--hero-muted); margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .reveal { opacity: 0; transform: translateY(8px); }
.hero.resolved .reveal { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
.hero.resolved .reveal.d2 { transition-delay: .15s; }
.hero.resolved .reveal.d3 { transition-delay: .3s; }

/* WiredCanuck network mark, the hero's one visual */
.hero .wrap { position: relative; z-index: 1; }
.hero-mark {
  position: absolute; right: max(-60px, calc((100vw - var(--max)) / 2 - 60px)); top: 50%;
  width: min(46vw, 560px); height: auto; transform: translateY(-50%) scale(.92); opacity: 0;
  pointer-events: none; filter: drop-shadow(0 0 40px rgba(0, 120, 212, .35));
}
.hero.resolved .hero-mark { opacity: 1; transform: translateY(-50%) scale(1); transition: opacity 1s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
@media (max-width: 760px) { .hero-mark { width: 70vw; right: -22vw; top: 28%; opacity: 0; } .hero.resolved .hero-mark { opacity: .35; } }

/* footer logo */
.foot-logo { width: 132px; height: auto; display: block; }
.foot-logo.dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .foot-logo.light { display: none; } :root:not([data-theme="light"]) .foot-logo.dark { display: block; } }
:root[data-theme="dark"] .foot-logo.light { display: none; }
:root[data-theme="dark"] .foot-logo.dark { display: block; }
.site-footer .wrap { align-items: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 var(--t-base)/1 var(--f-sans);
  padding: 15px 22px; border-radius: 8px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--blue); color: #ffffff; }
.btn-primary:hover { background: #1a8ae6; }
.btn-ghost { border-color: var(--hero-dim); color: var(--hero-fg); }
.btn-ghost:hover { border-color: var(--hero-accent); }
.btn-ink { background: var(--accent); color: var(--on-accent); }
.btn-ink:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- sections ---------- */
main section { padding: clamp(56px, 8vw, 104px) 0; }
main section + section { border-top: 1px solid var(--line); }
h2 { font-size: var(--t-2xl); line-height: 1.1; letter-spacing: -0.02em; font-weight: 750; font-variation-settings: "wdth" 115; margin: 0 0 20px; }
h3 { font-size: var(--t-lg); line-height: 1.25; font-weight: 650; margin: 0 0 6px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lede { font-size: var(--t-lg); line-height: 1.5; color: var(--ink); }
.muted { color: var(--muted); }

.split { display: grid; gap: clamp(32px, 5vw, 72px); grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .split { grid-template-columns: 5fr 7fr; align-items: start; }
  .split.flip { grid-template-columns: 7fr 5fr; }
}

/* photo placeholders */
.photo {
  aspect-ratio: 4 / 5; border-radius: 10px; background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--ink) 5%, transparent) 14px 15px),
    var(--surface);
  border: 1.5px dashed var(--line); display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: var(--t-sm); padding: 20px; position: relative; overflow: hidden;
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo.wide { aspect-ratio: 3 / 2; }
.photo-caption { font-size: var(--t-sm); color: var(--muted); margin-top: 8px; }

/* signal list (talks, shows, writing) */
.signals { list-style: none; margin: 0; padding: 0; }
.signals li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 6px 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.signals li:last-child { border-bottom: 1px solid var(--line); }
.signals .when { font-size: var(--t-sm); color: var(--muted); padding-top: 3px; }
.signals p { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .signals li { grid-template-columns: 1fr; } }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-strong); vertical-align: 2px; margin-left: 6px; }

/* quotes */
.quotes { display: grid; gap: 40px; }
@media (min-width: 860px) { .quotes { grid-template-columns: 1fr 1fr; } }
blockquote { margin: 0; padding-left: 22px; border-left: 3px solid var(--accent); }
blockquote p { font-size: var(--t-lg); line-height: 1.5; }
blockquote footer { font-size: var(--t-sm); color: var(--muted); }

/* topics */
.topics { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.topics li { padding: 22px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.topics li p { margin: 0; color: var(--muted); max-width: 62ch; }

/* gallery */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .gallery { grid-template-columns: 2fr 1fr 1fr; } .gallery .photo:first-child { grid-row: span 2; aspect-ratio: auto; } }
.gallery .photo { aspect-ratio: 1; }

/* facts */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.facts dt { color: var(--muted); font-size: var(--t-sm); padding-top: 2px; }
.facts dd { margin: 0; }

/* ---------- form ---------- */
.form { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(20px, 4vw, 36px); }
.row { display: grid; gap: 20px; }
@media (min-width: 640px) { .row.two { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 600; font-size: var(--t-sm); }
.field .hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 14px; width: 100%;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: .82rem; min-height: 0; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-block; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: var(--t-sm); font-weight: 500; user-select: none; }
.chips input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chips input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.status { font-size: var(--t-sm); margin: 0; }
.status.ok { color: var(--ink); }
.status.bad { color: var(--danger); }
.sent { text-align: left; padding: 8px 0; }
.sent h3 { font-size: var(--t-xl); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: var(--t-sm); color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* page heading for inner pages */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 40px); }
.page-head h1 { margin: 0 0 16px; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; font-weight: 800; font-variation-settings: "wdth" 122; }
.page-head h1::after { content: ""; display: block; width: 3.2ch; height: 5px; background: var(--accent); border-radius: 3px; margin-top: 18px; }
main .page-head + section { border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .trace .hop, .hero .reveal { opacity: 1 !important; transform: none !important; }
  .hero-mark { opacity: 1 !important; transform: translateY(-50%) !important; }
}

/* speaking record */
.find-head { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: 12px; }
@media (min-width: 860px) { .find-head { grid-template-columns: 6fr 5fr; } }
.find-photo { margin: 0; }
.find-photo img, .gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.find-photo img { aspect-ratio: 16 / 9; }
.group-title { font-size: var(--t-sm); font-weight: 650; color: var(--accent); margin: 40px 0 0; padding-bottom: 10px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn-outline { border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--on-accent); }
.photo.has-img { border: 0; background: var(--surface); }
.gallery figure { margin: 0; aspect-ratio: 1; min-width: 0; }
@media (min-width: 860px) { .gallery figure:first-child { grid-row: span 2; aspect-ratio: auto; } }
a.tag { text-decoration: none; }
a.tag:hover { background: var(--accent); color: var(--on-accent); }

/* blog posts */
.posts .when { font-variant-numeric: tabular-nums; }
.posts h3 a { text-decoration: none; }
.posts h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
