/* ---------------------------------------------------------
   Joey Farbstein — personal site
   Editorial / paper-and-ochre aesthetic.
   --------------------------------------------------------- */

:root {
  --paper: #f5f0e8;
  --paper-warm: #efe7d8;
  --bone: #e8dfd0;
  --ink: #1a1714;
  --ink-soft: #2a241e;
  --ink-mute: #6b5f52;
  --rust: #b8390d;
  --ochre: #f5a83d;
  --rule: #d8cdb8;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rust);
  transition: color 120ms ease, border-color 120ms ease;
}
a:hover { color: var(--rust); }

::selection { background: var(--ochre); color: var(--ink); }

/* ---------- Layout shell ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.wrap-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Top nav ---------- */
.nav {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1180px;
  margin: 0 auto;
}
.nav-mark {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-mark .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rust);
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.nav-links a { border: none; }
.nav-links a:hover { color: var(--rust); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 80px;
  border-bottom: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: center;
}
.hero-portrait {
  position: relative;
}
.hero-portrait img {
  display: block;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ink);
  box-shadow: 14px 14px 0 0 var(--ochre);
}
.hero-meta {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.hero-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0 0 44px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
  gap: 24px;
  flex-wrap: wrap;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--rust);
  display: inline-block;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 36px;
}
.hero h1 em {
  font-style: italic;
  color: var(--rust);
  font-feature-settings: "ss01";
}

.hero-sub {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  max-width: 760px;
  color: var(--ink-soft);
  margin: 0 0 40px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px 22px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 0;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.btn:hover { background: var(--rust); border-color: var(--rust); color: var(--paper); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Section primitives ---------- */
.section {
  padding: 96px 0;
  border-bottom: 2px solid var(--ink);
}
.section-dark {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.section-dark a { color: var(--ochre); border-bottom-color: var(--ochre); }
.section-dark a:hover { color: var(--paper); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--rust);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--rust);
}
.section-dark .eyebrow { color: var(--ochre); }
.section-dark .eyebrow::before { background: var(--ochre); }

.section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  max-width: 18ch;
}
.section h2 em { font-style: italic; color: var(--rust); }
.section-dark h2 em { color: var(--ochre); }

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0 0 36px;
}
.section-dark .lede { color: var(--bone); }

/* ---------- Stats / proof strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--paper-warm);
}
.stats.stats-2 { grid-template-columns: repeat(2, 1fr); }
.stat {
  padding: 36px 28px;
  border-right: 2px solid var(--ink);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--rust);
  margin: 0 0 10px;
}
.stat-label {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

/* ---------- Focus list (current focuses) ---------- */
.focus-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 2px solid currentColor;
}
.focus-item {
  padding: 28px 0;
  border-bottom: 2px solid currentColor;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  align-items: baseline;
}
.focus-item:nth-child(odd) { padding-right: 32px; border-right: 2px solid currentColor; }
.focus-item:nth-child(even) { padding-left: 32px; }
.focus-num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--rust);
}
.section-dark .focus-num { color: var(--ochre); }
.focus-body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.focus-body p {
  margin: 0;
  color: var(--ink-mute);
  font-size: 16px;
  line-height: 1.55;
}
.section-dark .focus-body p { color: var(--bone); }

/* ---------- Thesis pull ---------- */
.pull {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin: 0;
}
.pull-attr {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ochre);
  margin-top: 24px;
  display: block;
}

/* ---------- Two-column writing block ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}
.two-col p {
  font-size: 19px;
  line-height: 1.7;
  margin: 0 0 18px;
}

/* ---------- Paper / whitepaper card ---------- */
.paper-card {
  border: 2px solid var(--ink);
  padding: 40px;
  background: var(--paper);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: end;
}
.paper-card .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 14px;
}
.paper-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  max-width: 22ch;
}
.paper-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.55;
  max-width: 56ch;
}

/* ---------- Contact strip ---------- */
.contact {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 2px solid var(--ink);
}
.contact-cell {
  padding: 30px 22px;
  border-right: 2px solid var(--ink);
}
.contact-cell:last-child { border-right: none; }
.contact-cell .label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin: 0 0 10px;
}
.contact-cell .val {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.open-to {
  border-left: 3px solid var(--ochre);
  padding: 10px 0 10px 22px;
  margin: 0 0 36px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--bone);
  max-width: 72ch;
}
.open-to strong {
  font-weight: 500;
  color: var(--paper);
}

/* ---------- Footer ---------- */
.foot {
  padding: 40px 0;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Timeline (story / history) ---------- */
.timeline {
  border-top: 2px solid var(--ink);
}
.t-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  padding: 36px 0;
  border-bottom: 2px solid var(--ink);
  align-items: start;
}
.t-when {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--rust);
  padding-top: 6px;
}
.t-what h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.t-what p {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 64ch;
}

/* ---------- Cards grid (what I've built) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}
.card {
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 32px;
  background: var(--paper);
}
.card-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 14px;
}
.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Industries list ---------- */
.industries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}
.industries li {
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 22px 24px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  background: var(--paper-warm);
}

/* ---------- Excite grid ---------- */
.excite-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 2px solid var(--paper);
  border-left: 2px solid var(--paper);
}
.excite-item {
  border-right: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  padding: 32px;
}
.excite-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ochre);
  display: block;
  margin-bottom: 14px;
}
.excite-item h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--paper);
}
.excite-item p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--bone);
}

/* ---------- Blog index ---------- */
.post-list {
  border-top: 2px solid var(--ink);
}
.post-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 2px solid var(--ink);
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  border-left: none;
  border-right: none;
}
.post-row:hover { background: var(--paper-warm); }
.post-date {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--rust);
}
.post-body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.post-body p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}
.post-row .arrow {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--rust);
}

/* ---------- Whitepaper page ---------- */
.paper-header {
  padding: 80px 0 60px;
  border-bottom: 2px solid var(--ink);
}
.paper-header .meta {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.paper-header .meta span::before {
  content: "—";
  margin-right: 8px;
  color: var(--rust);
}
.paper-header h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 18ch;
}
.paper-header .deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}

.paper-body {
  padding: 64px 0 96px;
}
.paper-body p {
  font-size: 19px;
  line-height: 1.78;
  margin: 0 0 22px;
  color: var(--ink-soft);
}
.paper-body p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 400;
  float: left;
  line-height: 0.85;
  padding: 8px 12px 0 0;
  color: var(--rust);
}
.paper-body h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 56px 0 18px;
  color: var(--ink);
}
.paper-body h2 .num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--rust);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.paper-body blockquote {
  border-left: 3px solid var(--rust);
  margin: 32px 0;
  padding: 0 0 0 24px;
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
}

.paper-foot {
  border-top: 2px solid var(--ink);
  padding: 48px 0 80px;
}
.paper-foot .signoff {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.paper-foot .signoff::before {
  content: "—";
  margin-right: 10px;
  color: var(--rust);
}
.paper-foot h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 24px;
  max-width: 36ch;
}

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
  body { font-size: 17px; }
  .wrap, .wrap-narrow { padding: 0 22px; }
  .nav-inner { padding: 14px 22px; }
  .nav-links { gap: 16px; font-size: 11px; }

  .hero { padding: 56px 0 56px; }
  .section { padding: 64px 0; }

  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-portrait { order: -1; }
  .hero-portrait img { width: 200px; height: 200px; box-shadow: 10px 10px 0 0 var(--ochre); }

  .stats, .stats.stats-2 { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 2px solid var(--ink); }
  .stat:last-child { border-bottom: none; }

  .focus-list { grid-template-columns: 1fr; }
  .focus-item { grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0 !important; border-right: none !important; padding-left: 0 !important; padding-right: 0 !important; }

  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .paper-card { grid-template-columns: 1fr; gap: 24px; padding: 28px; }

  .contact { grid-template-columns: 1fr; }
  .contact-cell { border-right: none; border-bottom: 2px solid var(--ink); }
  .contact-cell:last-child { border-bottom: none; }

  .paper-body p:first-of-type::first-letter { font-size: 56px; }
  .paper-body p { font-size: 17px; line-height: 1.72; }

  .foot { flex-direction: column; align-items: flex-start; }

  .t-row { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .t-when { padding-top: 0; }

  .cards { grid-template-columns: 1fr; }
  .industries { grid-template-columns: repeat(2, 1fr); }
  .industries li { font-size: 17px; padding: 16px 18px; }

  .excite-grid { grid-template-columns: 1fr; }

  .post-row { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .post-row .arrow { display: none; }
}
