:root {
  --ink: #16181d;
  --muted: #5b6270;
  --line: #e6e8ec;
  --bg: #ffffff;
  --soft: #f7f8fa;
  --accent: #1d4ed8;
  --accent-dark: #163fae;
  --maxw: 720px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  z-index: 10;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.nav a.brand { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.brand-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: block; }
.nav .links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font-size: 15px;
}
.nav .links a:hover { color: var(--accent); }

/* Layout */
main { padding: 56px 0 40px; }
section { margin: 0 0 52px; }
h1 { font-size: 40px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 18px; }
h2 { font-size: 25px; letter-spacing: -0.01em; margin: 44px 0 14px; }
h3 { font-size: 20px; margin: 0 0 8px; }
p { margin: 0 0 18px; }
.lead { font-size: 21px; color: var(--ink); }
.muted { color: var(--muted); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Hero */
.hero { padding-top: 8px; }
.hero h1 { font-size: 44px; }
.hero .sub { font-size: 20px; color: var(--muted); max-width: 640px; }
.hero-grid { display: flex; gap: 34px; align-items: center; }
.hero-text { flex: 1; min-width: 0; }
.hero-photo { width: 235px; height: auto; border-radius: 14px; flex-shrink: 0; display: block; }

/* Portrait on article/about pages */
.about-photo { width: 210px; height: auto; border-radius: 14px; float: right; margin: 4px 0 18px 26px; }

@media (max-width: 600px) {
  .hero-grid { flex-direction: column; gap: 22px; align-items: flex-start; }
  .hero-photo { width: 190px; order: -1; }
  .about-photo { float: none; display: block; width: 180px; margin: 0 0 20px; }
}

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 8px; }
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--soft); text-decoration: none; }

/* Client logos strip */
.logos { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; margin-top: 10px; }
.logos span { font-size: 17px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; white-space: nowrap; }

/* Trust strip */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  font-size: 15px;
  color: var(--muted);
  padding: 16px 0;
  margin: 34px 0 8px;
}
.trust .wrap { padding-top: 0; padding-bottom: 0; }

/* Cards */
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 8px; }
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.card h3 { margin-bottom: 6px; }
.card p { margin-bottom: 12px; color: var(--muted); font-size: 16px; }
.card a.more { font-size: 15px; font-weight: 600; }

/* Essay list */
.essay-list { list-style: none; padding: 0; margin: 0; }
.essay-list li { border-bottom: 1px solid var(--line); padding: 20px 0; }
.essay-list li:first-child { border-top: 1px solid var(--line); }
.essay-list h3 { margin-bottom: 4px; }
.essay-list p { margin: 0; color: var(--muted); font-size: 16px; }
.tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-weight: 700; }

/* Article */
.article { max-width: 680px; }
.article .meta { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.article h2 { font-size: 23px; }
.back { font-size: 15px; font-weight: 600; display: inline-block; margin-bottom: 24px; }

/* Video embed */
.video { position: relative; padding-bottom: 56.25%; height: 0; margin: 18px 0 8px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Notes timeline */
.timeline { margin-top: 10px; }
.tl-item { display: flex; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.tl-item:first-child { border-top: 1px solid var(--line); }
.tl-item img { width: 116px; height: 116px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.tl-date { font-size: 13px; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.tl-text { margin: 0; font-size: 17px; line-height: 1.55; }
@media (max-width: 560px) {
  .tl-item { gap: 14px; padding: 20px 0; }
  .tl-item img { width: 84px; height: 84px; }
  .tl-text { font-size: 16px; }
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  padding: 30px 0 48px;
  margin-top: 20px;
}
footer p { margin: 0 0 8px; }
footer .flinks a { color: var(--muted); margin-right: 16px; }
footer .flinks a:hover { color: var(--accent); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  h1, .hero h1 { font-size: 33px; }
  .nav .links a { margin-left: 14px; }
  main { padding-top: 40px; }
}
