/* =============================================================
   Vesali — editorial theme
   Sections: tokens · base · layout · components · header · hero
   · cards · conversations · portfolio · newsletter · footer
   · search · paper article · archive · responsive
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  --paper:        #f6f1e7;
  --paper-2:      #f1e8d6;   /* warmer "manuscript" cream (article) */
  --surface:      #fcf9f2;
  --surface-2:    #f3eee2;
  --ink:          #16293f;
  --ink-soft:     #45566a;
  --muted:        #6f7d8b;
  --teal:         #1f7a70;
  --teal-deep:    #175f57;
  --gold:         #cd9a34;
  --red:          #c1402e;
  --navy:         #0f2440;
  --navy-2:       #0b1c33;
  --line:         rgba(22, 41, 63, .12);
  --line-strong:  rgba(22, 41, 63, .22);
  --shadow:       0 18px 50px -28px rgba(15, 36, 64, .45);
  --shadow-sm:    0 6px 20px -14px rgba(15, 36, 64, .5);

  --font-serif:  "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:   "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:   "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --type-h1: 68px;
  --type-h2: 42px;
  --type-h3: 28px;
  --type-h4: 22px;
  --type-body: 17px;
  --type-small: 14px;

  --wrap:   1140px;
  --narrow: 760px;
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

:root[data-theme="dark"] {
  --paper:        #0e1a2b;
  --paper-2:      #10202f;
  --surface:      #16273c;
  --surface-2:    #132335;
  --ink:          #f1ead9;
  --ink-soft:     #c6d0dc;
  --muted:        #93a2b4;
  --teal:         #55b7aa;
  --teal-deep:    #3f9c90;
  --gold:         #e2b45c;
  --red:          #e0705f;
  --navy:         #081524;
  --navy-2:       #060f1b;
  --line:         rgba(241, 234, 217, .13);
  --line-strong:  rgba(241, 234, 217, .24);
  --shadow:       0 20px 55px -30px rgba(0, 0, 0, .7);
  --shadow-sm:    0 8px 24px -16px rgba(0, 0, 0, .7);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .vesali-typewriter-target::after { animation: none !important; opacity: .72; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: 1.62;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); line-height: 1.1; font-weight: 800; margin: 0 0 .5em; }
h1 { font-size: var(--type-h1); }
h2 { font-size: var(--type-h2); }
h3 { font-size: var(--type-h3); }
h4 { font-size: var(--type-h4); }
p { margin: 0 0 1.1em; }
a { color: var(--teal-deep); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--teal); }
img { max-width: 100%; height: auto; display: block; }
strong { color: var(--ink); }

::selection { background: color-mix(in srgb, var(--gold) 40%, transparent); color: var(--ink); }

:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.screen-reader-text {
  position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px;
  overflow: hidden; word-wrap: normal !important;
}
.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 999; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 8px; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wrap.narrow { width: min(100% - 40px, var(--narrow)); }
.section { padding: clamp(48px, 7vw, 92px) 0; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; border-color: var(--teal); color: var(--teal-deep); }
.btn-ghost:hover { background: color-mix(in srgb, var(--teal) 10%, transparent); transform: translateY(-2px); }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14.5px; color: var(--teal-deep); }
.link-arrow .ico { transition: transform .25s var(--ease); }
.link-arrow:hover .ico { transform: translateX(4px); }
.link-arrow.accent { color: var(--gold); }
.link-arrow.is-video { color: var(--red); }
.link-arrow.on-dark { color: var(--teal); }

.accent-rule { display: block; width: 66px; height: 3px; border-radius: 3px; background: var(--gold); margin: 20px 0; }
.center-rule { margin-inline: auto; }

/* ---------- Tags / kickers ---------- */
.tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; padding: 5px 11px; border-radius: 6px;
}
.tag.is-essay     { background: var(--gold); color: #241a05; }
.tag.is-interview { background: var(--teal); }
.tag.is-video     { background: var(--red); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand-link { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark {
  font-family: var(--font-serif); font-weight: 800; font-size: 21px; letter-spacing: .02em;
  border: 2px solid var(--ink); border-radius: 8px; padding: 2px 9px; line-height: 1.25;
}
.brand-name { font-family: var(--font-serif); font-size: 21px; font-weight: 700; color: var(--ink); }

.primary-nav { margin-left: auto; }
.nav-list { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  font-size: 15px; font-weight: 500; color: var(--ink-soft); position: relative; padding: 6px 0;
}
.nav-list a:hover, .nav-list .current-menu-item > a { color: var(--ink); }
.nav-list .current-menu-item > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--ink); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-divider { width: 1px; height: 26px; background: var(--line-strong); margin: 0 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 0; background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.theme-toggle {
  background: var(--navy); color: #fff;
}
.theme-toggle:hover { background: var(--navy-2); transform: rotate(-8deg); }
.theme-toggle .ico-sun-wrap { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun-wrap { display: inline-grid; }
:root[data-theme="dark"] .theme-toggle .ico-moon-wrap { display: none; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 88% 0%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--paper));
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
}
.hero-title {
  font-size: clamp(calc(var(--type-h1) * .58), 6vw, var(--type-h1)); font-weight: 800; letter-spacing: -.01em; margin: 0;
}
.hero-lede { font-size: 18px; max-width: 42ch; color: var(--ink-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-visual { position: relative; min-height: 440px; }
.hero-collage { position: absolute; inset: 0; }
.collage-tile { position: absolute; border-radius: 6px; opacity: .9; }
.tile-a { width: 120px; height: 150px; left: 4%; top: 30%; background: color-mix(in srgb, var(--gold) 45%, #d8c9a8); transform: rotate(-6deg); }
.tile-b { width: 90px; height: 120px; left: 18%; bottom: 8%; background: color-mix(in srgb, var(--teal) 35%, #a9c4bf); transform: rotate(5deg); }
.tile-c { width: 70px; height: 90px; left: 2%; bottom: 20%; background: color-mix(in srgb, var(--red) 40%, #d8b3aa); transform: rotate(9deg); }
.hero-portrait {
  position: relative; z-index: 2; margin-left: auto; width: min(100%, 420px); aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-img--placeholder {
  display: block; width: 100%; height: 100%;
  background:
    radial-gradient(90% 70% at 50% 15%, color-mix(in srgb, var(--ink) 22%, transparent), transparent 60%),
    linear-gradient(160deg, var(--navy), #33455c 70%, #55606f);
}

/* ---------- Section head ---------- */
.section-head { display: flex; align-items: center; gap: 24px; margin-bottom: 40px; }
.section-title { font-size: clamp(calc(var(--type-h2) * .62), 3.4vw, var(--type-h2)); margin: 0; white-space: nowrap; }
.section-title.on-dark { color: #fff; }
.head-line { flex: 1; height: 1px; background: var(--line-strong); }
.head-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14.5px; color: var(--teal-deep); white-space: nowrap; }
.head-link .ico { transition: transform .25s var(--ease); }
.head-link:hover .ico { transform: translateX(4px); }

/* ---------- Cards (Recent commentary) ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card--lead { grid-row: span 1; }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.thumb-fallback, .pcard-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 54px; font-weight: 800; color: color-mix(in srgb, var(--ink) 30%, transparent);
  background: linear-gradient(140deg, var(--surface-2), color-mix(in srgb, var(--teal) 12%, var(--surface-2)));
}
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin: 0; letter-spacing: .01em; }
.card-meta.on-dark { color: color-mix(in srgb, #fff 70%, transparent); }
.card-meta .dot { margin: 0 7px; }
.card-title { font-size: clamp(calc(var(--type-h3) * .7), 1.9vw, var(--type-h3)); font-weight: 700; line-height: 1.2; margin: 0; }
.card--lead .card-title { font-size: clamp(calc(var(--type-h3) * .78), 2.2vw, var(--type-h3)); }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--teal-deep); }
.vesali-typewriter-target { position: relative; }
.vesali-typewriter-target::after {
  display: inline-block;
  width: .72em;
  height: 2px;
  margin-left: .16em;
  vertical-align: .1em;
  background: currentColor;
  content: "";
  animation: vesali-title-cursor var(--vesali-typewriter-cursor-blink, 1.05s) steps(1, end) infinite;
}
@keyframes vesali-title-cursor {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}
.card-excerpt { font-size: 15px; color: var(--ink-soft); margin: 0; }
.card-more { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: var(--teal-deep); margin-top: auto; padding-top: 4px; }
.card-more.is-video { color: var(--red); }
.card-more .ico { transition: transform .25s var(--ease); }
.card-more:hover .ico { transform: translateX(4px); }

/* ---------- Conversations (dark band) ---------- */
.conversations { background: var(--navy); color: color-mix(in srgb, #fff 82%, transparent); }
:root[data-theme="dark"] .conversations { background: var(--navy-2); }
.conv-grid { display: grid; grid-template-columns: .8fr 1.4fr 1fr; gap: 34px; align-items: start; }
.conv-lede { color: color-mix(in srgb, #fff 70%, transparent); font-size: 15.5px; max-width: 30ch; }
.conv-feature { }
.conv-media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: #1b3350; }
.conv-media img { width: 100%; height: 100%; object-fit: cover; }
.conv-media--short { aspect-ratio: 3 / 4; }
.play-badge { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.play-badge .ico { filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); opacity: .95; }
.conv-text { padding-top: 16px; }
.conv-title { font-size: clamp(calc(var(--type-h2) * .7), 2.4vw, var(--type-h2)); color: #fff; line-height: 1.18; margin: 6px 0 10px; }
.conv-title--sm { font-size: clamp(calc(var(--type-h3) * .7), 2vw, var(--type-h3)); }
.conv-title a { color: #fff; }
.conv-title a:hover { color: var(--gold); }
.conv-excerpt { color: color-mix(in srgb, #fff 72%, transparent); font-size: 15px; margin-bottom: 14px; }
.conv-short { border-left: 1px solid color-mix(in srgb, #fff 14%, transparent); padding-left: 34px; }

/* ---------- Portfolio (Public work) ---------- */
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pcard { display: flex; flex-direction: column; }
.pcard-media { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-sm); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.pcard-media:hover img { transform: scale(1.05); }
.pcard-fallback { position: absolute; inset: 0; }
.pcard-media.is-video .pcard-fallback  { background: linear-gradient(150deg, #2a3340, #4a4030); }
.pcard-media.is-interview .pcard-fallback { background: linear-gradient(150deg, #16323a, #2f5048); }
.pcard-body { padding-top: 16px; }
.pcard-kicker { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); }
:root[data-theme="dark"] .pcard-kicker { color: var(--gold); }
.pcard-title { font-size: clamp(calc(var(--type-h4) * .8), 1.8vw, var(--type-h4)); font-weight: 700; line-height: 1.25; margin: 8px 0 8px; }
.pcard-title a { color: var(--ink); }
.pcard-title a:hover { color: var(--teal-deep); }
.pcard-text { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 12px; }

/* ---------- Newsletter ---------- */
.newsletter { padding-top: 0; }
.news-card {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 26px;
  padding: 30px 34px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden;
}
.news-ribbon { position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
  background: repeating-linear-gradient(45deg, var(--red) 0 7px, var(--paper) 7px 14px, var(--teal) 14px 21px, var(--paper) 21px 28px); }
.news-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 14px; color: var(--teal-deep); background: color-mix(in srgb, var(--teal) 12%, transparent); margin-left: 8px; }
.news-title { font-size: clamp(calc(var(--type-h4) * .9), 2vw, var(--type-h3)); margin: 0 0 4px; }
.news-text { margin: 0; font-size: 15px; color: var(--ink-soft); }
.news-form { display: flex; gap: 10px; }
.news-form input {
  font-family: var(--font-sans); font-size: 15px; padding: 12px 16px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--paper); color: var(--ink); min-width: 240px;
}
.news-form input:focus { outline: none; border-color: var(--teal); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 60px 0 34px; background: var(--surface-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; }
.footer-tag { font-size: 14px; color: var(--muted); margin-top: 12px; max-width: 30ch; }
.footer-head { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-list a { font-size: 14.5px; color: var(--ink-soft); }
.footer-list a:hover { color: var(--teal-deep); }
.footer-note { font-size: 14px; color: var(--muted); margin: 0; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.copyright { font-size: 13px; color: var(--muted); margin: 0; }
.footer-legal { display: flex; gap: 22px; }
.footer-legal a { font-size: 13px; color: var(--muted); }
.footer-legal a:hover { color: var(--ink); }

/* ---------- Search overlay ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 200; background: color-mix(in srgb, var(--navy) 55%, transparent); backdrop-filter: blur(6px); display: grid; place-items: start center; padding-top: 14vh; }
.search-overlay[hidden] { display: none; }
.search-panel { width: min(100% - 40px, 640px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; animation: pop .25s var(--ease); }
@keyframes pop { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.search-form { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--muted); }
.search-field { flex: 1; border: 0; background: transparent; font-family: var(--font-sans); font-size: 18px; color: var(--ink); }
.search-field:focus { outline: none; }

/* =============================================================
   PAPER ARTICLE (single post) — typewriter editorial layout
   ============================================================= */
.vesali-article { background: var(--paper-2); }
.paper {
  position: relative; width: min(100% - 32px, 1000px); margin: 34px auto 0;
  background:
    linear-gradient(0deg, color-mix(in srgb, var(--ink) 2%, transparent), color-mix(in srgb, var(--ink) 2%, transparent)),
    var(--paper-2);
  border: 1px solid var(--line); border-radius: 4px;
  padding: clamp(30px, 5vw, 64px) clamp(22px, 5vw, 74px) clamp(40px, 5vw, 70px);
  box-shadow: var(--shadow-sm);
}
/* registration crop marks + rules */
.paper-mark { position: absolute; width: 26px; height: 26px; opacity: .8; }
.paper-mark::before, .paper-mark::after { content: ""; position: absolute; background: var(--teal-deep); }
.paper-mark::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-.5px); }
.paper-mark::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-.5px); }
.mark-tl { left: 18px; top: 18px; }
.mark-tr { right: 18px; top: 18px; }
.mark-bl { left: 18px; bottom: 18px; }
.paper-rule { position: absolute; left: 44px; top: 60px; bottom: 60px; width: 1px; background: color-mix(in srgb, var(--red) 55%, transparent); opacity: .5; }
.paper-folio { position: absolute; left: 30px; bottom: 120px; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: color-mix(in srgb, var(--red) 75%, transparent); }

.paper-inner { position: relative; z-index: 1; max-width: 720px; margin-inline: auto; }
.paper-masthead { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em; color: var(--ink); padding-bottom: 22px; margin-bottom: 30px; }
.mast-vol { color: var(--ink); }
.mast-vol { border-bottom: 2px solid var(--red); padding-bottom: 2px; }

.paper-head { text-align: center; }
.paper-kicker { display: inline-block; font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .22em; color: var(--ink); background: color-mix(in srgb, var(--teal) 26%, transparent); padding: 4px 12px; }
.paper-title { font-size: clamp(calc(var(--type-h1) * .56), 6.5vw, var(--type-h1)); font-weight: 800; line-height: 1.04; margin: 26px 0 0; }
.paper-title.vesali-typewriter-target::after { vertical-align: .12em; }
.paper-dek { font-family: var(--font-mono); font-size: 16px; line-height: 1.7; color: var(--ink); max-width: 34ch; margin: 30px auto 0; }

.paper-sep { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 30px 0; color: var(--gold); }
.paper-sep::before, .paper-sep::after { content: ""; height: 1px; width: 42%; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--red) 60%, transparent) 0 6px, transparent 6px 11px); }
.paper-sep span { font-size: 18px; color: var(--red); }

.paper-byline { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; font-family: var(--font-mono); font-size: 13.5px; color: var(--ink); }
.byline-avatar img { width: 30px; height: 30px; border-radius: 999px; }
.byline-avatar { display: inline-flex; }
.byline-rt { display: inline-flex; align-items: center; gap: 6px; }
.paper-byline .dot { color: var(--gold); }

.paper-layout { position: relative; margin-top: 34px; }
.paper-body { font-family: var(--font-mono); font-size: 15.5px; line-height: 1.95; color: var(--ink); }
.paper-body p { margin: 0 0 1.4em; }
.paper-body h2 { font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--red); display: inline-block; padding-bottom: 3px; margin: 2em 0 .9em; }
.paper-body h3 { font-family: var(--font-mono); font-size: 17px; font-weight: 600; color: var(--ink); margin: 1.6em 0 .7em; }
.paper-body a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px; }
.paper-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); font-family: var(--font-serif); font-size: 22px; font-style: italic; color: var(--ink); }
.paper-body ul, .paper-body ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.paper-body li { margin-bottom: .5em; }
.paper-body img { border-radius: 4px; margin: 1.6em auto; }
.paper-figure { margin: 0 0 2em; }
.paper-figure img { border-radius: 4px; width: 100%; }
.paper-body code { font-family: var(--font-mono); background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 1px 6px; border-radius: 4px; }

.has-dropcap > p:first-of-type::first-letter {
  float: left; font-family: var(--font-serif); font-weight: 800; color: var(--teal-deep);
  font-size: 5.4em; line-height: .78; margin: 6px 14px 0 0;
}

/* floating action rail */
.paper-rail { position: absolute; top: 0; right: -132px; }
.rail-inner {
  position: sticky; top: 96px; display: flex; flex-direction: column; gap: 6px;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface)); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 8px; box-shadow: var(--shadow-sm);
}
.rail-btn {
  display: grid; justify-items: center; gap: 5px; width: 66px; padding: 12px 4px; border: 0; border-radius: 12px;
  background: transparent; color: var(--ink); cursor: pointer; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.rail-btn:hover { background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal-deep); }
.rail-btn.is-active { color: var(--teal-deep); }

.paper-foot { margin-top: 40px; }
.paper-sep--foot { margin-bottom: 26px; }
.share-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-label { font-family: var(--font-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-right: 4px; }
.share-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.share-btn:hover { transform: translateY(-3px); background: var(--teal); color: #fff; }
.paper-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 24px 0 0; }
.paper-tags li { font-family: var(--font-mono); font-size: 12px; }
.paper-tags a { padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-soft); }

.copy-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--paper); font-size: 14px; padding: 11px 20px; border-radius: 999px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); z-index: 300;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Prose (pages / interviews) ---------- */
.prose { font-size: 18px; line-height: 1.75; color: var(--ink-soft); }
.prose h2 { font-size: clamp(calc(var(--type-h2) * .65), 3vw, var(--type-h2)); margin: 1.6em 0 .6em; }
.prose h3 { font-size: clamp(calc(var(--type-h3) * .7), 2.4vw, var(--type-h3)); margin: 1.4em 0 .5em; }
.prose blockquote { margin: 1.5em 0; padding-left: 22px; border-left: 3px solid var(--gold); font-family: var(--font-serif); font-style: italic; font-size: 23px; color: var(--ink); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.narrow .page-head, .archive-head { margin-bottom: 30px; }
.page-title { font-size: clamp(calc(var(--type-h1) * .48), 5vw, var(--type-h1)); }
.page-figure { margin: 0 0 30px; border-radius: var(--radius); overflow: hidden; }

/* ---------- Interview embed / PDF ---------- */
.embed-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow-sm); }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf-reader { margin-top: 40px; }
.pdf-object { width: 100%; height: 78vh; border: 1px solid var(--line-strong); border-radius: var(--radius); }

/* ---------- Archive extras ---------- */
.archive-lede, .conv-lede { margin-top: 12px; }
.no-results { font-size: 17px; }
.pagination { margin-top: 46px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); color: var(--ink-soft); font-weight: 600; font-size: 14px;
}
.pagination .page-numbers.current { background: var(--teal); color: #fff; border-color: var(--teal); }
.pagination a.page-numbers:hover { border-color: var(--teal); color: var(--teal-deep); }

.error-code { font-family: var(--font-serif); font-size: clamp(80px, 16vw, 150px); font-weight: 900; color: color-mix(in srgb, var(--teal) 30%, transparent); line-height: .9; margin: 0; }
.error-404 { padding-top: 90px; }
.error-text { max-width: 42ch; margin: 0 auto 26px; }

/* ---------- Comments ---------- */
.comments-wrap { padding: 20px 0 70px; }
.comments-title { font-size: 26px; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 30px; }
.comment-list .comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment-body { font-size: 15.5px; }
.comment-form { display: grid; gap: 14px; }
.comment-form input:not([type="submit"]), .comment-form textarea {
  width: 100%; font-family: var(--font-sans); font-size: 15px; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.comment-form textarea:focus, .comment-form input:focus { outline: none; border-color: var(--teal); }

/* ---------- Widgets ---------- */
.widget-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 1080px) {
  .paper-rail { position: static; margin-top: 30px; }
  .rail-inner { position: static; flex-direction: row; justify-content: center; }
  .paper-folio { display: none; }
}
@media (max-width: 960px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .conv-grid { grid-template-columns: 1fr 1fr; }
  .conv-intro { grid-column: 1 / -1; }
  .conv-short { border-left: 0; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .header-inner { height: 68px; gap: 0; }
  .header-actions { margin-left: auto; gap: 4px; }
  .header-divider { height: 24px; margin: 0 2px; }
  .primary-nav {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    z-index: 110;
    visibility: hidden;
    pointer-events: none;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 180ms;
    box-shadow: 0 8px 8px -7px color-mix(in srgb, var(--navy) 42%, transparent);
    backdrop-filter: saturate(145%) blur(18px);
    -webkit-backdrop-filter: saturate(145%) blur(18px);
  }
  .primary-nav.is-open { visibility: visible; pointer-events: auto; opacity: 1; transform: translateY(0); }
  .nav-list { flex-direction: column; gap: 0; padding: 6px; }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-list li:last-child { border-bottom: 0; }
  .nav-list a { display: flex; align-items: center; min-height: 48px; padding: 10px 12px; border-radius: 8px; font-size: 16px; }
  .nav-list a:hover, .nav-list .current-menu-item > a { background: color-mix(in srgb, var(--teal) 9%, transparent); }
  .nav-toggle { display: inline-grid; }
  .nav-toggle[aria-expanded="true"] { background: color-mix(in srgb, var(--teal) 12%, transparent); }
  .cards-3 { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { min-height: 380px; order: -1; }
  .hero-portrait { margin-inline: auto; }
  .section-head { flex-wrap: wrap; gap: 12px; }
  .head-line { display: none; }
  .news-card { grid-template-columns: 1fr; text-align: left; gap: 16px; }
  .news-icon { display: none; }
  .news-form { flex-direction: column; }
  .news-form input { min-width: 0; width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .header-inner { height: 64px; }
  .brand-mark { font-size: 20px; padding-inline: 8px; }
  .header-divider { height: 22px; }
  .icon-btn { width: 40px; height: 40px; }
  .theme-toggle { flex: 0 0 40px; }
  .primary-nav { top: 72px; left: 12px; right: 12px; }
  .cards-4 { grid-template-columns: 1fr; }
  .conv-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .paper { padding-left: 20px; padding-right: 20px; }
  .paper-rule, .paper-mark { display: none; }
  .brand-name { display: none; }
}

@media (hover: none) and (pointer: coarse) {
  .icon-btn:hover { background: transparent; transform: none; }
  .theme-toggle:hover { background: var(--navy); transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .primary-nav { transition: none; }
}

/* =============================================================
   CURRICULUM VITAE — editorial profile page
   ============================================================= */
.vesali-cv-page {
  padding: clamp(28px, 5vw, 72px) 0 100px;
  background: var(--paper);
}
.vesali-cv-shortcode {
  display: block;
  width: 100%;
  padding: clamp(28px, 5vw, 72px) 0 100px;
  background: var(--paper);
}
.cv-wrap { width: min(100% - 40px, 1180px); margin-inline: auto; }
.cv-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 66px);
  color: #fff;
  background: var(--navy);
  border-radius: 2px;
  box-shadow: 0 24px 70px -38px rgba(15, 36, 64, .7);
}
.cv-hero::after {
  position: absolute;
  width: 360px;
  height: 360px;
  right: -150px;
  bottom: -210px;
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  border-radius: 50%;
  content: "";
  transform: rotate(-18deg);
}
.cv-hero__top,
.cv-hero__grid,
.cv-section__head,
.cv-entry,
.cv-hero__aside,
.cv-status,
.cv-hero__top { display: flex; }
.cv-hero__top { align-items: center; justify-content: space-between; gap: 20px; }
.cv-kicker,
.cv-label,
.cv-index__label,
.cv-status {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cv-kicker { color: var(--gold); }
.cv-status { align-items: center; gap: 9px; color: color-mix(in srgb, #fff 68%, transparent); }
.cv-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 20%, transparent); }
.cv-hero__grid { position: relative; z-index: 1; align-items: end; justify-content: space-between; gap: 42px; margin-top: clamp(70px, 10vw, 130px); }
.cv-hero__intro { max-width: 720px; }
.cv-hero h1 { margin: 0; color: #fff; font-size: clamp(52px, 9vw, 112px); line-height: .88; letter-spacing: -.065em; }
.cv-role { margin: 22px 0 0; color: var(--gold); font-family: var(--font-mono); font-size: clamp(16px, 2vw, 22px); letter-spacing: .02em; }
.cv-intro { max-width: 46ch; margin: 22px 0 0; color: color-mix(in srgb, #fff 70%, transparent); font-size: 17px; line-height: 1.55; }
.cv-hero__aside { flex: 0 0 180px; align-items: flex-end; flex-direction: column; gap: 20px; }
.cv-portrait { width: 110px; height: 110px; overflow: hidden; border: 3px solid var(--gold); border-radius: 50%; }
.cv-portrait img { width: 100%; height: 100%; object-fit: cover; }
.cv-contact { display: grid; gap: 7px; min-width: 180px; color: color-mix(in srgb, #fff 74%, transparent); font-size: 13px; text-align: right; }
.cv-contact a { color: #fff; }
.cv-contact .cv-label { margin-bottom: 3px; color: var(--teal); }
.cv-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(28px, 6vw, 90px); margin-top: clamp(40px, 7vw, 84px); }
.cv-index { position: sticky; top: 92px; align-self: start; display: grid; gap: 12px; }
.cv-index__label { margin-bottom: 10px; color: var(--muted); }
.cv-index a { display: flex; align-items: baseline; gap: 12px; min-height: 36px; color: var(--ink-soft); font-family: var(--font-mono); font-size: 12px; transition: color .2s var(--ease), transform .2s var(--ease); }
.cv-index a span { font-family: var(--font-sans); font-size: 14px; }
.cv-index a:hover { color: var(--teal-deep); transform: translateX(4px); }
.cv-content { min-width: 0; }
.cv-section { padding: 0 0 clamp(56px, 7vw, 92px); }
.cv-section + .cv-section { padding-top: clamp(46px, 6vw, 74px); border-top: 1px solid var(--line-strong); }
.cv-section__head { align-items: center; gap: 14px; margin-bottom: 34px; }
.cv-section__number { flex: 0 0 auto; color: var(--red); font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.cv-section__head h2 { flex: 0 0 auto; margin: 0; color: var(--ink); font-size: clamp(25px, 3.2vw, 38px); letter-spacing: -.04em; }
.cv-rule { flex: 1; height: 1px; margin-top: 7px; background: var(--line-strong); }
.cv-timeline { display: grid; }
.cv-entry { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px; padding: 24px 0; border-top: 1px solid var(--line); }
.cv-entry:first-child { border-top: 0; padding-top: 0; }
.cv-entry time { color: var(--muted); font-family: var(--font-mono); font-size: 12px; line-height: 1.4; }
.cv-entry h3 { margin: 0 0 5px; color: var(--ink); font-size: clamp(18px, 2vw, 25px); line-height: 1.15; }
.cv-entry__org { margin: 0; color: var(--teal-deep); font-size: 14px; font-weight: 600; }
.cv-entry ul { display: grid; gap: 6px; margin: 13px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.cv-entry li { position: relative; padding-left: 16px; }
.cv-entry li::before { position: absolute; top: .75em; left: 0; width: 6px; height: 1px; background: var(--gold); content: ""; }
.cv-entry--compact { grid-template-columns: 92px minmax(0, 1fr); padding: 20px 0; }
.cv-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 42px; }
.cv-entry--compact:nth-child(-n + 2) { border-top: 0; padding-top: 0; }
.cv-entry--compact p { margin: 10px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.cv-toolkit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px; }
.cv-list-block { padding: 20px 0; border-top: 1px solid var(--line); }
.cv-list-block .cv-label { display: block; margin-bottom: 16px; color: var(--teal-deep); }
.cv-list-block ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--ink); font-size: 16px; }
.cv-list-block li { display: flex; align-items: baseline; gap: 10px; }
.cv-list-block li::before { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); content: ""; }
.cv-publications { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: cv-publication; }
.cv-publications li { display: grid; grid-template-columns: 42px 1fr; gap: 15px; padding: 17px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; line-height: 1.55; counter-increment: cv-publication; }
.cv-publications li::before { color: var(--red); content: counter(cv-publication, decimal-leading-zero); font-family: var(--font-mono); font-size: 11px; }
.cv-empty { padding: 100px 0; color: var(--muted); }
.cv-page-template .site-main { padding-bottom: 0; }
.cv-section[data-cv-reveal], .cv-index[data-cv-reveal], .cv-hero[data-cv-reveal] { animation: cv-rise .65s var(--ease) both; }
.cv-layout .cv-index[data-cv-reveal] { animation-delay: 80ms; }
.cv-content .cv-section:nth-child(1) { animation-delay: 120ms; }
.cv-content .cv-section:nth-child(2) { animation-delay: 170ms; }
.cv-content .cv-section:nth-child(3) { animation-delay: 220ms; }
.cv-content .cv-section:nth-child(4) { animation-delay: 270ms; }
.cv-content .cv-section:nth-child(5) { animation-delay: 320ms; }
@keyframes cv-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 820px) {
  .cv-layout { grid-template-columns: 1fr; gap: 36px; }
  .cv-index { position: static; display: flex; flex-wrap: wrap; gap: 8px 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line-strong); }
  .cv-index__label { flex: 0 0 100%; margin: 0; }
  .cv-index a { min-height: 30px; }
  .cv-entry-grid { column-gap: 24px; }
}

@media (max-width: 560px) {
  .cv-wrap { width: min(100% - 32px, 1180px); }
  .cv-hero { padding: 26px 22px 32px; }
  .cv-hero__top { align-items: flex-start; flex-direction: column; gap: 12px; }
  .cv-hero__grid { align-items: flex-start; flex-direction: column; gap: 26px; margin-top: 70px; }
  .cv-hero h1 { font-size: clamp(48px, 16vw, 76px); }
  .cv-hero__aside { align-items: flex-start; }
  .cv-contact { text-align: left; }
  .cv-entry, .cv-entry--compact { grid-template-columns: 1fr; gap: 10px; }
  .cv-entry-grid, .cv-toolkit-grid { grid-template-columns: 1fr; }
  .cv-entry--compact:nth-child(2) { border-top: 1px solid var(--line); padding-top: 20px; }
  .cv-section__head { align-items: flex-start; flex-wrap: wrap; }
  .cv-rule { flex-basis: 100%; order: 5; }
}

@media (prefers-reduced-motion: reduce) {
  .cv-index a { transition: none; }
  .cv-section[data-cv-reveal], .cv-index[data-cv-reveal], .cv-hero[data-cv-reveal] { animation: none; }
}

/* =============================================================
   CV REFINEMENT — compact editorial system + scroll choreography
   ============================================================= */
:root {
  --cv-ease-out: cubic-bezier(.23, 1, .32, 1);
  --cv-ease-in-out: cubic-bezier(.77, 0, .175, 1);
}

.vesali-cv-page,
.vesali-cv-shortcode {
  position: relative;
  background-color: var(--paper);
  background-image: url('../img/cv-editorial-texture.webp');
  background-position: top center;
  background-size: 760px auto;
  background-blend-mode: multiply;
}

.cv-wrap {
  width: min(calc(100% - 40px), 1040px);
}

.cv-hero {
  border-radius: 18px;
  box-shadow: 0 30px 80px -44px rgba(15, 36, 64, .78);
}

.cv-hero::before {
  position: absolute;
  inset: 0;
  background: url('../img/cv-editorial-texture.webp') center / 620px auto;
  mix-blend-mode: screen;
  opacity: .13;
  content: "";
  pointer-events: none;
}

.cv-hero__top {
  position: relative;
  z-index: 1;
}

.cv-status {
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
}

.cv-hero__grid {
  margin-top: clamp(54px, 7vw, 88px);
}

.cv-hero h1 {
  max-width: 720px;
  font-size: clamp(44px, 6.6vw, 78px);
  line-height: .92;
}

.cv-role {
  font-size: clamp(14px, 1.5vw, 18px);
}

.cv-layout {
  grid-template-columns: 148px minmax(0, 700px);
  justify-content: center;
  gap: clamp(34px, 5vw, 68px);
}

.cv-index {
  gap: 7px;
  padding-top: 4px;
}

.cv-index__label {
  margin-bottom: 14px;
}

.cv-index__track {
  position: absolute;
  top: 29px;
  bottom: 4px;
  left: -10px;
  width: 1px;
  background: var(--line-strong);
}

.cv-index__track span {
  display: block;
  width: 1px;
  height: 28%;
  background: var(--teal);
  transform-origin: top;
  transition: transform 180ms var(--cv-ease-out);
}

.cv-index a {
  position: relative;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 7px;
  text-decoration: none;
  transition: color 180ms ease-out, background-color 180ms ease-out, transform 180ms var(--cv-ease-out);
}

.cv-index a.is-active {
  color: var(--teal-deep);
  background: color-mix(in srgb, var(--teal) 9%, transparent);
}

.cv-index a.is-active::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -11px;
  width: 3px;
  border-radius: 3px;
  background: var(--gold);
  content: "";
}

.cv-section {
  scroll-margin-top: 112px;
  padding-bottom: clamp(48px, 6vw, 72px);
}

.cv-section + .cv-section {
  padding-top: clamp(38px, 5vw, 60px);
}

.cv-section__head {
  gap: 12px;
  margin-bottom: 26px;
}

.cv-section__head h2 {
  font-size: clamp(23px, 2.5vw, 32px);
}

.cv-timeline {
  position: relative;
  padding-left: 14px;
}

.cv-timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 4px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.cv-entry {
  position: relative;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0 22px 20px;
  border-top: 0;
}

.cv-entry::before {
  position: absolute;
  top: 28px;
  left: -14px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 4px var(--paper);
  content: "";
}

.cv-entry:first-child {
  padding-top: 16px;
}

.cv-entry:first-child::before {
  top: 22px;
}

.cv-entry time {
  padding-top: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}

.cv-entry h3 {
  font-size: clamp(17px, 1.7vw, 22px);
}

.cv-entry__org {
  font-size: 13px;
}

.cv-entry ul {
  margin-top: 10px;
  font-size: 14px;
}

.cv-entry-grid {
  gap: 12px;
}

.cv-entry--compact {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 76%, #fff 24%);
  transition: transform 180ms var(--cv-ease-out), border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.cv-entry--compact:first-child,
.cv-entry--compact:nth-child(2) {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.cv-entry--compact::before {
  display: none;
}

.cv-entry--compact h3 {
  font-size: 17px;
}

.cv-entry--compact p {
  font-size: 13px;
}

.cv-toolkit-grid {
  gap: 14px;
}

.cv-list-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 76%, #fff 24%);
}

.cv-list-block ul {
  gap: 10px;
  font-size: 14px;
}

.cv-publications li {
  padding: 15px 0;
  font-size: 13px;
}

.cv-motion-ready [data-cv-reveal] {
  animation: none !important;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms ease-out, transform 520ms var(--cv-ease-out);
}

.cv-motion-ready [data-cv-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .cv-entry--compact:hover {
    border-color: color-mix(in srgb, var(--teal) 50%, var(--line));
    box-shadow: 0 12px 28px -24px rgba(15, 36, 64, .7);
    transform: translateY(-2px);
  }
}

@media (max-width: 820px) {
  .cv-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cv-index {
    position: static;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 0 16px 12px;
    border-bottom: 1px solid var(--line-strong);
  }

  .cv-index__label {
    flex: 0 0 auto;
    margin: 0 8px 0 0;
  }

  .cv-index__track {
    top: 2px;
    bottom: auto;
    left: 0;
    width: calc(100% - 12px);
    height: 1px;
  }

  .cv-index__track span {
    width: 28%;
    height: 1px;
    transform-origin: left;
  }

  .cv-index a {
    min-height: 30px;
    padding: 5px 7px;
  }

  .cv-index a.is-active::before {
    top: auto;
    right: 7px;
    bottom: -17px;
    left: 7px;
    width: auto;
    height: 3px;
  }
}

@media (max-width: 560px) {
  .vesali-cv-page,
  .vesali-cv-shortcode {
    background-size: 560px auto;
  }

  .cv-wrap {
    width: min(calc(100% - 32px), 1040px);
  }

  .cv-hero {
    border-radius: 14px;
  }

  .cv-entry,
  .cv-entry--compact {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cv-entry--compact {
    padding: 16px;
  }
}

[data-theme="dark"] .vesali-cv-page,
[data-theme="dark"] .vesali-cv-shortcode {
  background-image: none;
}

[data-theme="dark"] .cv-hero::before {
  opacity: .04;
}

@media (prefers-reduced-motion: reduce) {
  .cv-motion-ready [data-cv-reveal] {
    opacity: 1;
    transform: none;
    transition: opacity 180ms ease-out;
  }

  .cv-index a,
  .cv-index__track span,
  .cv-entry--compact {
    transition: none;
  }
}
