/* iansolberg.us
   One stylesheet, no build step, no webfonts. Dark by default on purpose.
   Colour now comes from assets/css/tokens.css, which every page loads first;
   this file maps its own role names onto those tokens and keeps the layout. */

:root {
  /* surfaces. --canvas-inset is only ever ink sitting on the accent fill, so it
     is the fill's ink token. --surface and --surface-hover are panels one step
     off the page; tokens.css has no panel colour, so they are derived from the
     page and the ink instead of being pinned to a literal, which is what lets
     them follow the theme. Literals stay first as the pre-color-mix fallback,
     the same shape .site-header below already uses. */
  --canvas: var(--page);
  --canvas-inset: var(--on-brand);
  --surface: #161b22;
  --surface: color-mix(in srgb, var(--page) 93%, var(--heading));
  --surface-hover: #1c2129;
  --surface-hover: color-mix(in srgb, var(--page) 88%, var(--heading));

  /* lines */
  --border: var(--rule);
  --border-muted: var(--rule);

  /* text */
  --fg: var(--heading);
  --fg-muted: var(--body);
  --fg-subtle: var(--meta);

  /* accents, used sparingly. --accent is deliberately NOT redeclared here: it
     is the brand orange from tokens.css, and shadowing it would both hide the
     brand and make `--accent: var(--accent)` a self-reference. */
  --accent-quiet: var(--accent);
  --violet: #a371f7;
  --green: #3fb950;

  /* type. BOTH role names now resolve to Comic Neue (Ian, 2026-09-13: "more
     comic sans please - the little bubbles and descriptions etc"), so the
     kickers, role lines, dates, counts and status chips carry it too rather
     than only the headings and body.

     This SUPERSEDES the 2026-08-13 "monospace is for metadata only" rule, which
     existed to stop metadata competing with a serif body. With one face doing
     both jobs there is nothing to separate, and he asked for the opposite.

     --code is the one survivor and is a REAL monospace, because the `code`
     rule below sets actual code where character alignment and an unambiguous
     0/O and 1/l are the whole point. */
  --sans: var(--font-body);
  --mono: var(--font-body);
  --code: var(--font-mono);

  /* rhythm. --measure and --page are names tokens.css also uses, for the text
     measure and the page COLOUR, so the two layout values are inlined at their
     use sites instead of shadowing a token. */
  --gap: 1.5rem;

  --radius: 10px;
  --radius-sm: 6px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.prose {
  max-width: 68ch;
}

main {
  display: block;
  padding-bottom: 5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--canvas-inset);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border-muted);
  background: var(--canvas); /* fallback for browsers without color-mix */
  background: color-mix(in srgb, var(--canvas) 85%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--fg);
  text-decoration: none;
  font-size: 1rem;
}

.brand:hover {
  color: var(--fg);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--fg);
  border-bottom-color: var(--border);
}

.site-nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

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

.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 0 0 1.25rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1.22;
  letter-spacing: -0.005em;
  margin: 0 0 1.25rem;
  font-weight: 650;
  max-width: 24ch;
}

/* The masthead name is the page's h1, so the hero h1 metrics above would
   otherwise push the role line off its baseline. tokens.css owns the type. */
.hero .masthead .name {
  margin: 0;
  max-width: none;
}

/* The masthead had NO bottom margin, so the tagline butted straight onto the
 * role line. It went unnoticed while the portrait was 78px tall and became
 * obvious at 130px. Every other block in this hero already sets its own bottom
 * margin; this one was the gap in the rhythm. */
.hero .masthead {
  margin: 0 0 1.75rem;
}

/* Same for the availability pill: the tagline above it sets 1.75rem, so without
 * this the lede underneath sat tight against the fill. */
.hero .brand-fill {
  margin: 0 0 1.75rem;
}

.hero .tagline {
  font-size: clamp(1.375rem, 3.2vw, 1.875rem);
  line-height: 1.35;
  letter-spacing: 0;
  font-weight: 450;
  color: var(--fg);
  margin: 0 0 1.75rem;
  max-width: 40ch;
}

.hero .lede {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 0 2rem;
  max-width: 56ch;
}

.hero .lede strong {
  color: var(--fg);
  font-weight: 550;
}

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

.section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--border-muted);
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 2rem;
}

.section-label h2 {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin: 0;
  white-space: nowrap;
}

.section-label .rule {
  flex: 1;
  height: 1px;
  background: var(--border-muted);
}

.section-label a {
  font-size: 0.875rem;
  white-space: nowrap;
}

/* ---------- text ---------- */

h1,
h2,
h3,
h4 {
  letter-spacing: -0.005em;
}

.page-title {
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  line-height: 1.25;
  margin: 0 0 1rem;
  font-weight: 650;
}

h3 {
  font-size: 1.25rem;
  margin: 2.5rem 0 0.75rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.25rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

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

strong {
  font-weight: 600;
  color: var(--fg);
}

ul,
ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: var(--fg-subtle);
}

code {
  font-family: var(--code);
  font-size: 0.875em;
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border-muted);
  margin-block: 2.5rem;
}

.muted {
  color: var(--fg-muted);
}

/* ---------- project cards ---------- */

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease,
    transform 0.15s ease;
}

a.card:hover {
  border-color: var(--accent-quiet);
  background: var(--surface-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.card-kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

/* A kicker that is a COMMAND, not a label. Shown exactly as it is typed: real
   monospace, no uppercasing, no tracking. `PIP INSTALL OTTER` is not a thing
   anyone can run, and a install line that has to be mentally lower-cased before
   use is worse than no install line. */
.card-kicker--cmd {
  font-family: var(--code);
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent);
}

.card h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}

a.card:hover h3 {
  color: var(--accent);
}

.card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card-foot {
  margin-top: auto;
  padding-top: 0.5rem;
}

/* ---------- tags ---------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tags li {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  background: var(--canvas);
}

/* ---------- "now" list ---------- */

.now-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}

.now-list li {
  margin: 0;
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
}

.now-list .when {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding-top: 0.25rem;
}

.now-list .what {
  color: var(--fg-muted);
}

.now-list .what strong {
  display: block;
  color: var(--fg);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

@media (max-width: 34rem) {
  .now-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .now-list .when {
    padding-top: 0;
  }
}

/* ---------- project detail ---------- */

.detail-head {
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
}

.back-link {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--fg-muted);
  display: inline-block;
  margin-bottom: 1.5rem;
}

.back-link:hover {
  color: var(--accent);
}

.meta-grid {
  display: grid;
  gap: 1.25rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 3rem;
}

.meta-grid dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 0.4rem;
}

.meta-grid dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--fg);
}

.status-dot::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--green);
  margin-right: 0.5rem;
  vertical-align: 0.05em;
}

.status-dot.building::before {
  background: var(--violet);
}

.status-dot.archived::before {
  background: var(--fg-subtle);
}

/* ---------- experience ---------- */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}

.timeline li {
  margin: 0;
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--border-muted);
}

.timeline li:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline .years {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--fg-subtle);
  padding-top: 0.2rem;
}

.timeline .role {
  font-weight: 600;
  margin: 0 0 0.15rem;
  font-size: 1.0625rem;
}

.timeline .org {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  margin: 0 0 0.6rem;
}

.timeline .detail {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  margin: 0;
}

@media (max-width: 40rem) {
  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .timeline .years {
    padding-top: 0;
  }
}

/* ---------- contact ---------- */

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn:hover {
  border-color: var(--fg-subtle);
  background: var(--surface-hover);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-quiet);
  border-color: var(--accent-quiet);
  color: var(--on-brand);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--canvas-inset);
}

/* ---------- labelled contact list ---------- */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: grid;
  gap: 0.85rem;
  max-width: 68ch;
}

.contact-list li {
  margin: 0;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
}

.contact-list .label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.contact-list .pending {
  color: var(--fg-subtle);
  font-style: italic;
}

@media (max-width: 30rem) {
  .contact-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ---------- media (built for later: audio, video, downloads) ---------- */

.media-item {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 1rem;
}

.media-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.0625rem;
}

.media-item .media-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-subtle);
  margin: 0 0 1rem;
}

.media-item audio,
.media-item video {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}

.media-item audio {
  height: 2.5rem;
}

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

.site-footer {
  border-top: 1px solid var(--border-muted);
  padding-block: 2.5rem 3rem;
  color: var(--fg-subtle);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer a {
  color: var(--fg-muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ---------- print (about page doubles as a resume) ---------- */

@media print {
  :root {
    --canvas: #ffffff;
    --surface: #ffffff;
    --fg: #111111;
    --fg-muted: #333333;
    --fg-subtle: #555555;
    --border: #cccccc;
    --border-muted: #dddddd;
    --accent: #0b5cd5;
  }
  .site-header,
  .site-footer,
  .skip-link,
  .contact-row {
    display: none;
  }
  body {
    font-size: 11pt;
  }
  a {
    text-decoration: underline;
  }
  .section {
    break-inside: avoid;
  }
}
