/* ============================================================
   pabloio — the personal page.
   A timeless, editorial paper-and-ink system. Writing is the heart.
   Fraunces (display) · Newsreader (text) · Inter (labels) · system mono (meta).
   ============================================================ */

@font-face { font-family:"Fraunces"; src:url("/assets/fonts/fraunces.woff2") format("woff2"); font-weight:300 600; font-style:normal; font-display:swap; }
@font-face { font-family:"Fraunces"; src:url("/assets/fonts/fraunces-italic.woff2") format("woff2"); font-weight:300 600; font-style:italic; font-display:swap; }
@font-face { font-family:"Newsreader"; src:url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight:400 600; font-style:normal; font-display:swap; }
@font-face { font-family:"Newsreader"; src:url("/assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight:400 600; font-style:italic; font-display:swap; }
@font-face { font-family:"Inter"; src:url("/assets/fonts/inter.woff2") format("woff2"); font-weight:400 600; font-style:normal; font-display:swap; }

:root {
  --paper:      #f3f2ee;
  --paper-2:    #eceae4;
  --ink:        #1a1a1a;
  --ink-soft:   #46443f;
  --ink-faint:  #8a877e;
  --rule:       #d8d5cb;
  --rule-soft:  #e3e0d7;
  --accent:     #6b7a1e;   /* muted olive-lime, threads to Pablo IO lime but calm on paper */
  --accent-mark:#d0ff00;   /* the brand lime, used only as a highlighter mark */
  --measure:    64ch;

  --display: "Fraunces", "Iowan Old Style", Charter, Georgia, serif;
  --text:    "Newsreader", Charter, Georgia, "Times New Roman", serif;
  --label:   "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:#171613; --paper-2:#1f1e1a; --ink:#eae7dd; --ink-soft:#b6b2a5;
    --ink-faint:#7c7a70; --rule:#33312b; --rule-soft:#28271f;
    --accent:#c8d64b; --accent-mark:#d0ff00;
  }
}
:root[data-theme="dark"] {
  --paper:#171613; --paper-2:#1f1e1a; --ink:#eae7dd; --ink-soft:#b6b2a5;
  --ink-faint:#7c7a70; --rule:#33312b; --rule-soft:#28271f;
  --accent:#c8d64b; --accent-mark:#d0ff00;
}
:root[data-theme="light"] {
  --paper:#f3f2ee; --paper-2:#eceae4; --ink:#1a1a1a; --ink-soft:#46443f;
  --ink-faint:#8a877e; --rule:#d8d5cb; --rule-soft:#e3e0d7; --accent:#6b7a1e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-mark); color: #1a1a1a; }
a { color: inherit; }
img, svg { max-width: 100%; display: block; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  font-family: var(--label); font-size: 13px;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 28px; }

.label {
  font-family: var(--label);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint);
}
.mono { font-family: var(--mono); }

/* ---------------- reveal ---------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- header ---------------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(120%) blur(7px);
  -webkit-backdrop-filter: saturate(120%) blur(7px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 920px; margin: 0 auto; padding: 15px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { font-family: var(--display); font-weight: 600; font-size: 18px; text-decoration: none; letter-spacing: .005em; }
.wordmark .dot { color: var(--accent); }
nav.links { display: flex; gap: 22px; font-family: var(--label); font-size: 13px; }
nav.links a { text-decoration: none; color: var(--ink-soft); position: relative; padding-bottom: 3px; }
nav.links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--ink); transition: width .35s ease; }
nav.links a:hover { color: var(--ink); }
nav.links a:hover::after { width: 100%; }
@media (max-width: 620px) { nav.links { gap: 15px; } nav.links a:nth-child(n+4) { display: none; } }

/* ---------------- hero ---------------- */
section.hero { padding: clamp(70px, 12vh, 116px) 0 clamp(60px, 9vh, 92px); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-faint); margin: 0 0 26px; display: flex; align-items: center; gap: 2px; }
.cursor { display: inline-block; width: 7px; height: 14px; margin-left: 5px; background: var(--accent); transform: translateY(1px); animation: blink 1.15s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .name { font-family: var(--label); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; }
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 7.6vw, 76px); line-height: 1.02;
  letter-spacing: -0.015em; margin: 0 0 30px; max-width: 13ch;
  font-variation-settings: "opsz" 120;
}
.hero h1 em { font-style: italic; color: var(--ink-soft); }
.hero .thesis { font-family: var(--display); font-size: clamp(19px, 2.7vw, 24px); font-weight: 400; max-width: 30ch; margin: 0 0 16px; line-height: 1.42; }
.hero .sub { font-size: 17px; color: var(--ink-soft); max-width: var(--measure); margin: 0 0 34px; }
.elsewhere { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.elsewhere .label { margin-right: 4px; }
.elsewhere a { font-family: var(--label); font-size: 13.5px; text-decoration: none; color: var(--ink-soft); border-bottom: 1px solid var(--rule); padding-bottom: 1px; transition: color .25s, border-color .25s; }
.elsewhere a:hover { color: var(--ink); border-color: var(--accent); }

/* ---------------- section shell ---------------- */
section.block { padding: clamp(56px, 8vh, 78px) 0; border-top: 1px solid var(--rule); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 42px; }
.section-head h2, .section-head h1 { font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(26px, 4vw, 35px); margin: 0; letter-spacing: 0; }
.section-note { font-family: var(--label); font-size: 12px; color: var(--ink-faint); max-width: 24ch; text-align: right; line-height: 1.45; }
@media (max-width: 600px) { .section-head { flex-direction: column; align-items: flex-start; gap: 6px; } .section-note { text-align: left; } }

/* ---------------- work ---------------- */
.work-group { margin-bottom: 34px; }
.work-group:last-child { margin-bottom: 0; }
.work-group > .label { display: block; margin-bottom: 6px; }
.work-row {
  display: flex; align-items: baseline; gap: 18px;
  padding: 15px 0; border-top: 1px solid var(--rule-soft);
  text-decoration: none; color: inherit;
}
.work-name { font-family: var(--display); font-size: 18.5px; font-weight: 500; flex: 0 0 auto; white-space: nowrap; position: relative; }
.work-name::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: var(--ink); transition: width .35s ease; }
.work-row:hover .work-name::after { width: 100%; }
.work-desc { font-size: 15px; color: var(--ink-soft); flex: 1 1 auto; min-width: 0; }
.work-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); flex: 0 0 auto; white-space: nowrap; }
.work-arrow { font-family: var(--label); color: var(--ink-faint); flex: 0 0 auto; transition: transform .25s, color .25s; }
.work-row:hover .work-arrow { transform: translate(3px, -3px); color: var(--accent); }
@media (max-width: 660px) {
  .work-row { flex-wrap: wrap; row-gap: 4px; }
  .work-desc { order: 3; flex-basis: 100%; }
  .work-meta { order: 2; }
}

/* ---------------- writing (home teaser) ---------------- */
.writing-lede { position: relative; font-size: 18px; max-width: var(--measure); margin: 0 0 12px; }
.writing-lede::first-letter { float: left; font-family: var(--display); font-weight: 500; font-size: 4.1em; line-height: .72; padding: 8px 14px 0 0; color: var(--ink); font-variation-settings: "opsz" 144; }
.writing-subnote { font-size: 14.5px; color: var(--ink-faint); max-width: 52ch; margin: 0 0 30px; }
.post-list { }
.post-item { display: block; padding: 24px 0; border-top: 1px solid var(--rule-soft); text-decoration: none; color: inherit; }
.post-item:first-of-type { border-top: none; padding-top: 6px; }
.post-date { font-family: var(--label); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 8px; }
.post-title {
  font-family: var(--display); font-size: clamp(20px, 2.6vw, 24px); font-weight: 500; line-height: 1.28;
  margin: 0 0 7px; display: inline;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-position: 0 100%; background-repeat: no-repeat; background-size: 0% 1px;
  transition: background-size .4s ease;
}
.post-item:hover .post-title { background-size: 100% 1px; }
.post-dek { font-size: 15.5px; color: var(--ink-soft); margin: 0; max-width: 58ch; }
.writing-footnote { font-family: var(--label); font-size: 12.5px; color: var(--ink-faint); margin: 30px 0 0; }
.writing-footnote a { color: var(--ink-soft); border-bottom: 1px solid var(--rule); text-decoration: none; }
.writing-footnote a:hover { color: var(--ink); border-color: var(--accent); }
.view-all { font-family: var(--label); font-size: 13px; color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.view-all:hover { color: var(--ink); border-color: var(--accent); }

/* ---------------- taste ---------------- */
.taste-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 44px; }
.taste-col > .label { display: block; margin: 0 0 8px; }
.taste-item { padding: 15px 0; border-top: 1px solid var(--rule-soft); }
.taste-item:first-of-type { border-top: none; }
.taste-name { font-family: var(--display); font-size: 17px; font-weight: 500; }
.taste-name a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.taste-name a:hover { border-color: var(--accent); }
.taste-by { font-family: var(--label); font-size: 12px; color: var(--ink-faint); font-weight: 400; }
.taste-note { font-style: italic; font-size: 14.5px; color: var(--ink-soft); margin: 4px 0 0; }
@media (max-width: 620px) { .taste-grid { grid-template-columns: 1fr; gap: 0; } .taste-col + .taste-col { margin-top: 30px; } }

/* ---------------- contact ---------------- */
.contact-line { font-family: var(--display); font-size: clamp(24px, 4vw, 34px); font-weight: 400; line-height: 1.24; max-width: 18ch; margin: 0 0 26px; }
.contact-addr { font-family: var(--mono); font-size: 16px; }
.contact-addr a { text-decoration: none; border-bottom: 1px solid var(--ink-faint); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.contact-addr a:hover { color: var(--accent); border-color: var(--accent); }
.contact-alt { font-family: var(--mono); font-size: 13px; color: var(--ink-faint); margin: 12px 0 0; }
.contact-alt a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.contact-alt a:hover { color: var(--ink); border-color: var(--accent); }

/* ---------------- footer ---------------- */
footer.site { border-top: 1px solid var(--rule); padding: 30px 0 56px; }
footer.site .wrap { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
footer.site span, footer.site a { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); text-decoration: none; }
footer.site a:hover { color: var(--ink); }
.footer-closing { font-family: var(--display); font-style: italic; font-size: 15px; color: var(--ink-soft); }

/* ============================================================
   ARTICLE (post page)
   ============================================================ */
.article-nav { padding: 22px 0; }
.back-link { font-family: var(--label); font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.back-link .arrow { color: var(--accent); }

article.post { padding: clamp(24px, 5vh, 48px) 0 clamp(60px, 10vh, 100px); }
article.post .post-head { max-width: var(--measure); margin: 0 auto clamp(34px, 5vh, 52px); }
article.post .post-meta { font-family: var(--label); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 18px; display: flex; gap: 14px; flex-wrap: wrap; }
article.post h1 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 5.4vw, 52px); line-height: 1.06; letter-spacing: -0.015em; margin: 0 0 18px; font-variation-settings: "opsz" 110; }
article.post .post-desc { font-family: var(--display); font-style: italic; font-size: clamp(18px, 2.4vw, 22px); color: var(--ink-soft); margin: 0; line-height: 1.42; }

.prose { max-width: var(--measure); margin: 0 auto; }
.prose > p { margin: 0 0 1.35em; }
.prose > p:first-of-type::first-letter { float: left; font-family: var(--display); font-weight: 500; font-size: 3.9em; line-height: .72; padding: 8px 14px 0 0; color: var(--ink); font-variation-settings: "opsz" 144; }
.prose h2 { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; margin: 1.9em 0 .5em; letter-spacing: -0.01em; }
.prose em { font-style: italic; }
.prose strong { font-weight: 600; }
.prose a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-position: 0 1.05em; background-repeat: no-repeat; background-size: 100% 1px; padding-bottom: 1px; }
.prose a:hover { background-size: 100% 2px; }
.prose mark { background: var(--accent-mark); color: #1a1a1a; padding: 0 2px; }

.post-foot { max-width: var(--measure); margin: clamp(40px, 6vh, 64px) auto 0; padding-top: 26px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.post-foot a { font-family: var(--label); font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.post-foot a:hover { color: var(--ink); }
.post-foot .syndicate { font-family: var(--label); font-size: 12.5px; color: var(--ink-faint); }
.post-foot .syndicate a { color: var(--ink-soft); border-bottom: 1px solid var(--rule); display: inline; }

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  * { transition-duration: .001ms !important; }
}
