/* =========================================================================
   Nizam Salarzai — personal site
   Editorial paper aesthetic. Reading-first. One ink-red accent.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* paper */
  --paper:        #f5f1e8;
  --paper-deep:   #ede7d8;
  --paper-edge:   #e2dccb;
  --paper-mute:   #f9f5ec;

  /* ink */
  --ink:          #1a1714;
  --ink-soft:     #34302a;
  --ink-mute:     #6f685e;
  --ink-faint:    #a39c91;

  /* single accent — muted ink-red, oklch-tuned */
  --accent:       oklch(0.45 0.12 25);
  --accent-soft:  oklch(0.55 0.10 25);
  --accent-tint:  oklch(0.92 0.025 25);

  /* type */
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body:    'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* measure */
  --measure: 64ch;
  --maxw:    1200px;
  --gutter:  clamp(20px, 4vw, 48px);
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* paper grain — barely-there noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* =========== TYPOGRAPHY =========== */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 96, "SOFT" 30;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-weight: 400;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 60;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 500;
  font-variation-settings: "opsz" 24;
}

p { margin: 0 0 1.1em; }
p + p { text-indent: 0; }

a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: background-size 0.25s ease, color 0.2s ease;
}
a:hover {
  color: var(--accent);
  background-size: 100% 2px;
}

em, i { font-style: italic; }

::selection { background: var(--accent); color: var(--paper); }

/* meta / kicker / mono */
.kicker, .meta, .label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.kicker {
  color: var(--accent);
  display: inline-block;
}
/* thin-line label: small accent rule before the text */
.label-line {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.label-line::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

/* drop cap on first paragraph of long-form */
.dropcap::first-letter {
  font-family: var(--display);
  font-weight: 500;
  font-size: 5.2em;
  line-height: 0.85;
  float: left;
  padding: 0.05em 0.12em 0 0;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

/* deck / lede */
.dek {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 38ch;
  font-variation-settings: "opsz" 36;
}

/* pull quote */
.pull {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.25;
  color: var(--ink);
  text-align: center;
  max-width: 22ch;
  margin: 4rem auto;
  position: relative;
  font-variation-settings: "opsz" 72, "SOFT" 100;
}
.pull::before, .pull::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--ink);
  margin: 0 auto 2rem;
}
.pull::after { margin: 2rem auto 0; }

/* rules */
hr.rule {
  border: 0;
  height: 1px;
  background: var(--paper-edge);
  margin: 3rem 0;
}
hr.rule-dot {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, var(--ink-faint) 50%, transparent 50%);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  margin: 3rem 0;
}

/* =========== LAYOUT =========== */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

.measure {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

main { padding: 0 0 8rem; position: relative; z-index: 2; }

/* =========== MASTHEAD =========== */

.masthead {
  border-bottom: 1px solid var(--paper-edge);
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.masthead-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.brand {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  background: none;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 24;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand:hover { color: var(--accent); background: none; }
.brand .mark {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 400;
  border-left: 1px solid var(--paper-edge);
  padding-left: 10px;
}

.nav {
  display: flex;
  gap: 28px;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav a {
  color: var(--ink-soft);
  background: none;
  padding: 4px 0;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 -2px 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}
.nav a:hover, .nav a.active {
  color: var(--ink);
  background: none;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.masthead-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: right;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--paper-edge);
  border-radius: 2px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 820px) {
  .masthead-inner { grid-template-columns: 1fr auto; }
  .masthead-meta { display: none; }
  .nav-toggle { display: inline-block; }
  .nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 14px;
    padding: 14px 0 6px;
    align-items: flex-start;
  }
  .nav.open { display: flex; }
}

/* =========== HERO (HOME) =========== */

.hero {
  padding: clamp(4rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--paper-edge);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: end;
}

.hero-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--paper-edge);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-headline {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  color: var(--ink);
  margin: 0;
}
.hero-headline .it {
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero-headline .em { color: var(--accent); }

.hero-dek {
  font-family: var(--body);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-top: 2.2rem;
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero-foot .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* magnetic name treatment — moves slightly with cursor */
.hero-headline .word {
  display: inline-block;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-headline .word + .word { margin-left: 0.28em; }

/* =========== SECTIONS =========== */

.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--paper-edge);
}
.section:last-of-type { border-bottom: none; }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.section-head .label { color: var(--ink-mute); }
.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 400;
  font-variation-settings: "opsz" 60;
}
.section-head h2 em {
  font-weight: 300;
  font-variation-settings: "opsz" 60, "SOFT" 100;
}

/* the work-area triptych */
.areas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
}
.area {
  padding: 2rem 1.6rem 1.8rem;
  border-right: 1px solid var(--paper-edge);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
  text-decoration: none;
}
.area:last-child { border-right: none; }
.area:hover { background: var(--paper-mute); }
.area .num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.area h3 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0.4rem 0;
  font-variation-settings: "opsz" 36;
}
.area h3 em {
  font-weight: 300;
  font-variation-settings: "opsz" 36, "SOFT" 100;
}
.area p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}
.area .more {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
  padding-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
}
.area .more .arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}
.area:hover .more .arrow { transform: translateX(6px); }

@media (max-width: 760px) {
  .areas { grid-template-columns: 1fr; }
  .area { border-right: none; border-bottom: 1px solid var(--paper-edge); }
  .area:last-child { border-bottom: none; }
}

/* =========== WRITING / CLIPPINGS =========== */

.posts {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--ink);
}
.post {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 32px;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--paper-edge);
  align-items: baseline;
  position: relative;
  transition: padding-left 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}
.post:hover { padding-left: 16px; }
.post::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}
.post:hover::before { width: 8px; }

.post-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.post-title {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
}
.post-title a {
  background: none;
  color: var(--ink);
}
.post-title a:hover { color: var(--accent); background: none; }
.post-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
  align-self: center;
}
.post-summary {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0.5rem 0 0;
  max-width: 60ch;
  grid-column: 2 / 3;
}

@media (max-width: 700px) {
  .post { grid-template-columns: 1fr; gap: 6px; }
  .post-summary { grid-column: 1 / -1; }
  .post-tag { display: none; }
}

/* =========== ABOUT / LONG-FORM =========== */

.longform {
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.longform h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin: 3rem 0 1rem;
  color: var(--ink);
  font-weight: 400;
  font-variation-settings: "opsz" 60;
}
.longform h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  background: var(--accent);
  margin: 0 0 0.9rem;
}
.longform p {
  margin: 0 0 1.3em;
}
.longform p strong { font-weight: 600; color: var(--ink); }

.values {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--paper-edge);
}
.values li {
  padding: 1.1rem 0 1.1rem 2.4rem;
  border-bottom: 1px solid var(--paper-edge);
  position: relative;
  font-family: var(--body);
  color: var(--ink-soft);
  line-height: 1.55;
}
.values li::before {
  content: counter(values-counter, decimal-leading-zero);
  counter-increment: values-counter;
  position: absolute;
  left: 0;
  top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.values { counter-reset: values-counter; }

/* =========== HERO PORTRAIT (about) =========== */

.portrait-wrap {
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--paper-edge);
}
.portrait-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.portrait-wrap:hover img {
  filter: grayscale(0%) contrast(1);
  transform: scale(1.03);
}
.portrait-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(26,23,20,0.18));
  pointer-events: none;
}

/* =========== SOCIAL / FEEDS / CONNECT =========== */

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--paper-edge);
  border-left: 1px solid var(--paper-edge);
}
.social {
  border-right: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
  padding: 1.6rem 1.4rem;
  background: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.3s ease;
}
.social:hover { background: var(--paper-mute); color: var(--ink); }
.social .platform {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.social .handle {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 400;
  font-variation-settings: "opsz" 36;
  color: var(--ink);
}
.social .desc {
  font-size: 0.88rem;
  color: var(--ink-mute);
  margin: 0;
  line-height: 1.4;
}
.social .visit {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* feeds */
.feeds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 1.5rem 0 0;
}
.feed-block {
  border: 1px solid var(--paper-edge);
  background: var(--paper-mute);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--paper-edge);
}
.feed-head .platform {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.feed-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  color: var(--ink-mute);
}
.feed-block iframe { display: block; border: 0; background: var(--paper); }

/* =========== NEWSLETTER / CTA =========== */

.cta {
  padding: clamp(3rem, 6vw, 5rem) 0;
  text-align: center;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.cta .label { color: var(--ink-mute); margin-bottom: 1rem; display: inline-block; }
.cta h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  margin: 0.5rem auto 1rem;
  max-width: 18ch;
  line-height: 1.05;
}
.cta h2 em {
  font-weight: 300;
  font-variation-settings: "opsz" 96, "SOFT" 100;
}
.cta p {
  font-family: var(--body);
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 0 auto 2rem;
  font-size: 1.02rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 28px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  background-image: none;
  border-radius: 0;
}
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  background-image: none;
}
.btn .arrow { transition: transform 0.25s cubic-bezier(0.7, 0, 0.3, 1); }
.btn:hover .arrow { transform: translateX(6px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* =========== FORMS =========== */

.form { max-width: 560px; }
.form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 1.4rem 0 0.5rem;
}
.form input,
.form textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-mute);
  border: 1px solid var(--paper-edge);
  border-radius: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--paper);
}
.form textarea { min-height: 160px; resize: vertical; }
.form .actions { margin-top: 1.8rem; }

/* =========== FOOTER =========== */

footer.colophon {
  border-top: 1px solid var(--paper-edge);
  padding: 3rem 0 2.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  position: relative;
  z-index: 2;
}
.colophon-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.colophon-brand {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
  margin-bottom: 0.4rem;
  text-transform: none;
}
.colophon-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.colophon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  justify-content: flex-end;
}
.colophon-links a {
  color: var(--ink-soft);
  background: none;
}
.colophon-links a:hover { color: var(--accent); background: none; }
.colophon-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--paper-edge);
  padding-top: 1.2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .colophon-inner { grid-template-columns: 1fr; }
  .colophon-links { justify-content: flex-start; }
}

/* =========== INTERIOR PAGE HEADER (about, advocacy, tech, writing, connect) =========== */

.page-header {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--paper-edge);
}
.page-header .meta-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--paper-edge);
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  max-width: 18ch;
  margin: 0 0 1.5rem;
}
.page-header h1 em {
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.page-header .dek {
  max-width: 50ch;
  margin-top: 0.5rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.split .portrait-wrap {
  width: 280px;
  aspect-ratio: 4 / 5;
}
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split .portrait-wrap { width: 200px; }
}

/* =========== TWEAKS PANEL =========== */

#tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 240px;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 16px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  z-index: 100;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  display: none;
}
#tweaks.open { display: block; }
#tweaks h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  margin: 0 0 12px;
  color: var(--accent);
}
#tweaks .row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
#tweaks button {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: var(--paper-mute);
  border: 1px solid var(--paper-edge);
  cursor: pointer;
  color: var(--ink-soft);
  border-radius: 0;
  transition: all 0.15s ease;
}
#tweaks button:hover, #tweaks button.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
#tweaks-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 0;
  cursor: pointer;
}

/* color modes via tweaks */
body.tone-cool {
  --paper:        #f4f3ee;
  --paper-deep:   #e9e7df;
  --paper-edge:   #ddd9cd;
  --paper-mute:   #f9f8f3;
  --accent:       oklch(0.42 0.05 250);
  --accent-soft:  oklch(0.55 0.05 250);
}
body.tone-mono {
  --paper:        #f5f1e8;
  --paper-deep:   #ebe7dc;
  --paper-edge:   #ddd9cb;
  --paper-mute:   #faf6ed;
  --accent:       #1a1714;
  --accent-soft:  #34302a;
}
body.density-tight { font-size: 17px; line-height: 1.55; }
body.density-loose { font-size: 19px; line-height: 1.75; }
