/* Personal datasheet - shared stylesheet for both audience builds.
   Tokens first; audience accent switches on <html data-audience>. */

:root {
  --paper: #fafaf9;
  --ink: #1c1917;
  --muted: #57534e;
  --hairline: #e0ddd9;
  --card: #ffffff;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --measure: 68ch;
}

html[data-audience="ic"] {
  --accent: #0f766e;
  --accent-soft: #0f766e22;
}

html[data-audience="builder"] {
  --accent: #b45309;
  --accent-soft: #b4530922;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14120f;
    --ink: #e8e5e1;
    --muted: #a49e96;
    --hairline: #2b2723;
    --card: #1b1815;
  }
  html[data-audience="ic"] { --accent: #2dd4bf; --accent-soft: #2dd4bf22; }
  html[data-audience="builder"] { --accent: #fbbf24; --accent-soft: #fbbf2422; }
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0 auto;
  padding: 0 24px;
  max-width: 1020px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.masthead-role {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: right;
}

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

.hero { padding: 72px 0 56px; text-align: center; }

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.positioning {
  margin: 0 auto 40px;
  max-width: var(--measure);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
}

/* the signature: a personal spec block, set like a datasheet header table */

.spec-block {
  margin: 0 auto;
  max-width: 720px;
  text-align: left;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
}

.spec-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 11px 18px;
}

.spec-row + .spec-row { border-top: 1px solid var(--hairline); }

.spec-row dt {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-top: 3px;
}

.spec-row dd {
  margin: 0;
  font-size: 15.5px;
}

/* ---------- tile grid ---------- */

.section-label {
  margin: 0 0 22px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.work { padding: 32px 0 8px; border-top: 1px solid var(--hairline); }

.tile-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

/* odd tile count: center the orphan card instead of leaving it hugging the left */
@media (min-width: 707px) {
  .tile-grid > li:nth-child(odd):last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 477px;
  }
}

.tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 22px 18px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--card);
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}

.tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tile-thumb {
  display: inline-flex;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tile-thumb svg { width: 100%; height: 100%; }

.tile-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tile-summary {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--muted);
  flex-grow: 1;
}

.tile-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
}

/* ---------- working with me (builder only) ---------- */

.working { padding: 40px 0 8px; margin-top: 32px; border-top: 1px solid var(--hairline); }

.working-intro { max-width: var(--measure); margin: 0 auto 26px; color: var(--muted); text-align: center; }

.working-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.working-item {
  padding: 20px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--card);
}

.working-item h3 { margin: 0 0 8px; font-size: 16px; font-weight: 650; }

.working-item p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------- tile subpage ---------- */

.tile-page { padding: 48px 0 16px; }

.crumb {
  margin-bottom: 40px;
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
}

.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--accent); }

.tile-header { text-align: center; }

.tile-header h1 {
  margin: 0 auto 12px;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 24ch;
}

.tile-header .tile-meta {
  border-top: 0;
  padding-top: 0;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--accent);
}

.prose { max-width: var(--measure); margin: 0 auto; padding-bottom: 24px; }

.prose h2 {
  margin: 40px 0 12px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.prose p { margin: 0 0 18px; }

.prose ul { margin: 0 0 18px; padding-left: 22px; }

.prose li { margin-bottom: 8px; }

.prose strong { font-weight: 650; }

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

.contact {
  margin-top: 48px;
  padding: 36px 0 44px;
  border-top: 1px solid var(--hairline);
  text-align: center;
}

.contact-heading {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.contact-links {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  font-size: 16px;
}

.contact-links a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.colophon {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- small screens & motion ---------- */

@media (max-width: 560px) {
  .hero { padding: 48px 0 40px; }
  .spec-row { grid-template-columns: 1fr; gap: 2px; padding: 10px 16px; }
  .masthead-role { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
  .tile:hover { transform: none; }
}
