/* Chino Esinaulo: personal site */

:root {
  --bg: #f6f5f0;
  --surface: #ffffff;
  --ink: #13201e;
  --muted: #586763;
  --line: #e2e0d8;
  --primary: #0f5c55;
  --primary-ink: #ffffff;
  --accent: #bb4121;
  --tint: #e7efec;
  --radius: 14px;
  --max: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1615;
    --surface: #15201e;
    --ink: #eaf0ed;
    --muted: #98aaa5;
    --line: #26332f;
    --primary: #5cc2b3;
    --primary-ink: #0e1615;
    --accent: #ff7a52;
    --tint: #1a2a27;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1615;
  --surface: #15201e;
  --ink: #eaf0ed;
  --muted: #98aaa5;
  --line: #26332f;
  --primary: #5cc2b3;
  --primary-ink: #0e1615;
  --accent: #ff7a52;
  --tint: #1a2a27;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.brand span { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
@media (max-width: 520px) { .brand span { display: none; } .nav { gap: 14px; font-size: 14px; } }

/* Hero */
.hero { padding: 88px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: center; }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 18px; }
.hero h1 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(36px, 5.4vw, 60px); line-height: 1.06; margin: 0 0 24px;
}
.hero h1 em { font-style: italic; color: var(--primary); }
.lede { font-size: 19px; color: var(--muted); max-width: 40ch; margin: 0 0 32px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--primary); transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-ghost { color: var(--primary); background: transparent; }
.portrait {
  aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, var(--tint), var(--surface));
  border: 1px solid var(--line);
  display: grid; place-items: center; position: relative;
}
.portrait .monogram { font-family: var(--serif); font-size: 96px; color: var(--primary); opacity: .9; }
.portrait .note { position: absolute; bottom: 14px; font-size: 12px; color: var(--muted); }
@media (max-width: 860px) {
  .hero { padding: 56px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .portrait { max-width: 280px; }
}
@media (max-width: 520px) { .portrait { max-width: 200px; } .portrait .monogram { font-size: 64px; } }

/* Sections */
section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 38px); margin: 0; letter-spacing: -.01em; }
.section-head p { margin: 0; color: var(--muted); }

/* Work cards */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; min-height: 260px; transition: border-color .15s ease, transform .15s ease;
}
a.card:hover { border-color: var(--primary); transform: translateY(-2px); }
.card .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.card .num { color: var(--accent); font-weight: 600; letter-spacing: .06em; }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .more { margin-top: auto; color: var(--primary); font-weight: 600; font-size: 15px; }
.card.soon { background: transparent; border-style: dashed; min-height: 160px; }
.card.soon h3 { font-size: 20px; color: var(--muted); }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } .card { padding: 22px; min-height: 0; } }

/* Writing */
.writing-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.writing-list li { border-bottom: 1px solid var(--line); }
.writing-list a { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 22px 0; text-decoration: none; }
.writing-list .t { font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.writing-list a:hover .t { color: var(--primary); }
.writing-list .s { color: var(--muted); font-size: 15px; grid-column: 1; }
.writing-list .d { color: var(--muted); font-size: 14px; grid-column: 2; grid-row: 1; white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-left: 8px; vertical-align: middle; font-family: var(--sans); }
@media (max-width: 560px) { .writing-list a { grid-template-columns: 1fr; } .writing-list .d { grid-column: 1; grid-row: auto; } }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.about-grid p { margin: 0 0 16px; }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { text-align: right; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Contact */
.contact { text-align: center; padding: 96px 0; }
.contact h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4vw, 46px); margin: 0 0 14px; letter-spacing: -.01em; }
.contact p { color: var(--muted); margin: 0 auto 28px; max-width: 46ch; }
.contact .cta { justify-content: center; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Case study */
.cs-hero { padding: 56px 0 24px; }
.back { font-size: 15px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
.cs-meta { margin: 28px 0 12px; font-size: 14px; color: var(--muted); }
.cs-meta strong { color: var(--accent); font-weight: 600; }
.cs-hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.1; letter-spacing: -.02em; margin: 0; max-width: 22ch; }
.cs-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; padding: 40px 0 72px; border-top: 0; }
.cs-body article p { margin: 0 0 22px; font-size: 18px; }
.cs-body article p:first-child::first-line { font-weight: 600; }
.panel { position: sticky; top: 88px; align-self: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel dl { margin: 0; }
.panel dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-top: 22px; }
.panel dt:first-child { margin-top: 0; }
.panel dd { margin: 6px 0 0; font-size: 15px; }
.panel ul { margin: 6px 0 0; padding-left: 18px; font-size: 15px; }
.panel li { margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--tint); }
@media (max-width: 860px) { .cs-body { grid-template-columns: 1fr; gap: 32px; } .panel { position: static; } }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 32px 0 64px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pager a:hover { border-color: var(--primary); }
.pager small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.pager span { font-family: var(--serif); font-size: 18px; }
.pager .next { text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

.draft-banner { background: var(--accent); color: #fff; text-align: center; font-size: 13px; padding: 6px 16px; }

.cs-note { font-size: 14px !important; color: var(--muted); margin-top: -10px !important; }
.card .status { font-size: 12px; font-weight: 600; color: var(--primary); background: var(--tint); border-radius: 999px; padding: 2px 10px; }
@media (max-width: 520px) { .nav { gap: 12px; font-size: 13px; } .nav a[href$="#writing"] { display: none; } .brand strong { font-size: 16px; } }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

/* How I work */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.principle .num { color: var(--accent); font-weight: 600; letter-spacing: .06em; font-size: 13px; }
.principle h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; margin: 0; }
.principle p { margin: 0; color: var(--muted); font-size: 15px; }
.principle a { margin-top: auto; padding-top: 6px; color: var(--primary); font-weight: 600; font-size: 15px; text-decoration: none; }
.principle a:hover { text-decoration: underline; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } .principle { padding: 22px; } }
.nav a { white-space: nowrap; }
@media (max-width: 520px) { .nav a[href$="#how"] { display: none; } }
.more-writing { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.more-writing span { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.more-writing a { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.more-writing a:hover { color: var(--primary); }

/* Illustrations */
.card .thumb { width: calc(100% + 56px); max-width: none; height: auto; aspect-ratio: 16 / 9; margin: -28px -28px 4px; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line); }
.card { overflow: hidden; min-height: 0; }
@media (max-width: 760px) { .card .thumb { width: calc(100% + 44px); margin: -22px -22px 4px; } }
.cs-figure { width: 100%; height: auto; aspect-ratio: 16 / 9; margin-top: 36px; border-radius: var(--radius); border: 1px solid var(--line); }
.about-single { grid-template-columns: 1fr; max-width: 68ch; }

/* Hero: your words lead (portrait left, first sentence as the headline) */
.hero-words { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 72px; }
.hero-words .portrait { aspect-ratio: 11 / 15; }
.hero-words .portrait img { object-position: center 25%; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.hero-copy .eyebrow, .hero-copy h1 { margin: 0; }
.hero-words h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; text-wrap: balance; }
.hero-copy .lede { max-width: 54ch; margin: 0; display: flex; flex-direction: column; gap: 14px; line-height: 1.6; }
.hero-copy .lede p { margin: 0; }
.hero-copy .cta { align-items: center; }
@media (max-width: 860px) {
  .hero-words { grid-template-columns: 1fr; gap: 32px; }
  .hero-words .portrait { max-width: 280px; }
}
@media (max-width: 520px) { .hero-words .portrait { max-width: 200px; } }

/* Reading and using (19 Oct) */
.shelf { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.shelf-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.shelf-col h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.shelf-list { list-style: none; margin: 0; padding: 0; }
.shelf-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.shelf-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.shelf-list strong { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.3; }
.shelf-list em { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 2px; }
.shelf-list p { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.shelf-list .now { background: var(--tint); border-radius: 10px; padding: 14px 16px; border-bottom: 0; margin-bottom: 4px; }
.shelf-list .label { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.shelf-more { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.shelf-more a { color: var(--primary); font-weight: 600; text-decoration: none; }
.shelf-more a:hover { text-decoration: underline; }
@media (max-width: 760px) { .shelf { grid-template-columns: 1fr; } .shelf-col { padding: 22px; } }
@media (max-width: 520px) { .nav a[href$="#shelf"] { display: none; } }

/* Phone: give card text more breathing room (feedback 19 Oct) */
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .card h3, .principle h3 { font-size: 21px; line-height: 1.25; }
  .card { gap: 12px; }
}
