/* Shared visual polish and interaction states for every theme template. */
:root {
  --shadow-soft: 0 18px 50px rgba(24, 45, 60, .08);
  --ease-editorial: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-padding-top: 7rem; }
body::before {
  position: fixed;
  z-index: 100;
  inset: 0 auto auto 0;
  width: var(--scroll-progress, 0%);
  height: 3px;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, #6b9a8c, #c5aa77);
  box-shadow: 0 1px 8px rgba(45, 99, 93, .22);
  transition: width .12s linear;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(247, 246, 241, .88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: rgba(247, 246, 241, .97);
  box-shadow: 0 8px 28px rgba(24, 45, 60, .07);
}
.header-inner { transition: height .3s ease; }
.site-header.is-scrolled .header-inner { height: 72px; }
.brand { transition: transform .25s var(--ease-editorial); }
.brand:hover { transform: translateY(-1px); }
.brand .monogram { transition: color .25s ease, background .25s ease, transform .4s var(--ease-editorial); }
.brand:hover .monogram { color: var(--paper); background: var(--ink); transform: rotate(-8deg); }
.nav-links a { position: relative; padding: 10px 0; }
.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease-editorial);
}
.nav-links a:hover::after,
.nav-links .current-menu-item > a::after,
.nav-links .current_page_item > a::after { transform: scaleX(1); }
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a { color: var(--teal-dark); }
.menu-toggle span:not(.screen-reader-text) { transition: transform .24s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

.hero { position: relative; isolation: isolate; }
.hero::before {
  position: absolute;
  z-index: -1;
  top: 4%;
  left: -14vw;
  width: min(52vw, 700px);
  aspect-ratio: 1;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle, rgba(219, 228, 219, .58), rgba(247, 246, 241, 0) 69%);
}
.hero-copy, .hero-portrait { position: relative; z-index: 1; }
.hero-portrait {
  transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .45s var(--ease-editorial);
  will-change: transform;
}
.portrait-frame { box-shadow: 0 22px 55px rgba(24, 45, 60, .13); }
.portrait-frame img { transition: transform .9s var(--ease-editorial), filter .5s ease; }
.hero-portrait:hover .portrait-frame img { transform: scale(1.025); filter: saturate(.9); }
.portrait-note { text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }

.page-intro,
.article-header,
.book-single-copy { position: relative; }
.archive-page, .standard-page, .article-page, .book-single, .not-found {
  background-image: radial-gradient(ellipse at 88% 4%, rgba(88, 135, 127, .09), transparent 27rem);
}
.page-intro h1::after {
  display: block;
  width: 54px;
  height: 2px;
  margin-top: 22px;
  content: "";
  background: linear-gradient(90deg, var(--teal), rgba(88, 135, 127, 0));
  transform-origin: left;
  animation: title-rule .8s .2s both var(--ease-editorial);
}
@keyframes title-rule { from { opacity: 0; transform: scaleX(.1); } to { opacity: 1; transform: scaleX(1); } }

.theme-card, .blog-card, .contact-card, .cv-panel, .no-results, .empty-feature {
  transition: transform .35s var(--ease-editorial), box-shadow .35s ease, background-color .35s ease, border-color .35s ease;
}
.theme-card:hover, .blog-card:hover, .contact-card:hover, .cv-panel:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}
.theme-card { background: rgba(255, 255, 255, .18); }
.theme-card::after {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 25px;
  height: 1px;
  content: "";
  background: var(--teal);
  transition: width .35s var(--ease-editorial);
}
.theme-card:hover::after { width: 48px; }
.blog-card { position: relative; overflow: hidden; background: rgba(255, 255, 255, .3); }
.blog-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  content: "";
  background: var(--teal);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .35s var(--ease-editorial);
}
.blog-card:hover { border-color: #b9c9c1; background: rgba(255, 255, 255, .68); }
.blog-card:hover::before { transform: scaleY(1); }
.blog-card h2 a, .blog-card h3 a { transition: color .2s ease; }
.blog-card .text-link span, .theme-card a span, .hero-actions a span, .row-heading .text-link span {
  display: inline-block;
  transition: transform .25s var(--ease-editorial);
}
.blog-card a:hover span, .theme-card a:hover span, .hero-actions a:hover span, .row-heading a:hover span { transform: translateX(4px); }

.feature-book { position: relative; overflow: hidden; }
.feature-book::before, .feature-book::after {
  position: absolute;
  width: 280px;
  aspect-ratio: 1;
  border: 1px solid rgba(88, 135, 127, .14);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.feature-book::before { top: -195px; right: -80px; }
.feature-book::after { right: -130px; bottom: -235px; width: 370px; }
.book-feature-inner { position: relative; z-index: 1; }
.book-feature-cover, .book-cover, .book-single-cover {
  transform: perspective(1000px) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform .45s var(--ease-editorial), box-shadow .35s ease;
  will-change: transform;
}
.book-feature-cover:hover, .book-cover:hover, .book-single-cover:hover { box-shadow: 14px 20px 35px rgba(24, 45, 60, .2); }
.book-cover img, .book-feature-cover img, .book-single-cover img { transition: transform .7s var(--ease-editorial), filter .4s ease; }
.book-cover:hover img, .book-feature-cover:hover img, .book-single-cover:hover img { transform: scale(1.035); filter: saturate(1.05); }
.books-grid { align-items: start; }
.book-card { padding: 18px; margin: -18px; border: 1px solid transparent; transition: border-color .3s ease, background-color .3s ease, transform .35s var(--ease-editorial); }
.book-card:hover { border-color: var(--line); background: rgba(255, 255, 255, .45); transform: translateY(-4px); }

.publication-row { position: relative; transition: background-color .3s ease, padding .3s var(--ease-editorial); }
.publication-row::before {
  position: absolute;
  inset: 0 auto 0 -18px;
  width: 2px;
  content: "";
  background: var(--teal);
  transform: scaleY(0);
  transition: transform .28s var(--ease-editorial);
}
.publication-row:hover { padding-right: 12px; padding-left: 12px; background: rgba(255, 255, 255, .45); }
.publication-row:hover::before { transform: scaleY(1); }
.pub-info h2 a { background-image: linear-gradient(var(--teal), var(--teal)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; transition: background-size .32s var(--ease-editorial); }
.pub-info h2 a:hover { background-size: 100% 1px; }
.copy-citation { border: 1px solid rgba(45, 99, 93, .3); padding: 8px 12px; transition: color .2s ease, background .2s ease, transform .2s ease; }
.copy-citation:hover { color: white; background: var(--teal-dark); transform: translateY(-2px); }
.filters input, .filters select { transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.filters input:focus, .filters select:focus { border-color: var(--teal); background: rgba(255, 255, 255, .72); box-shadow: 0 0 0 4px rgba(88, 135, 127, .1); outline: 0; }
.filters .button { transition: transform .2s ease, box-shadow .2s ease; }
.results-count { letter-spacing: .08em; text-transform: uppercase; }
.no-results { border: 1px solid transparent; }
.no-results:hover, .empty-feature:hover { border-color: #aec0b7; box-shadow: var(--shadow-soft); }

.article-header h1, .book-single h1 { text-wrap: balance; }
.article-header { margin-bottom: 46px; }
.article-header .eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.article-header .eyebrow::before { width: 23px; height: 1px; content: ""; background: var(--teal); }
.article-featured-image { overflow: hidden; box-shadow: var(--shadow-soft); }
.article-featured-image img { transition: transform .8s var(--ease-editorial); }
.article-featured-image:hover img { transform: scale(1.02); }
.citation-box { border-left: 2px solid var(--teal); box-shadow: 0 8px 24px rgba(24, 45, 60, .045); }
.prose { text-wrap: pretty; }
.prose h2 { margin: 2.2em 0 .7em; padding-bottom: .35em; border-bottom: 1px solid var(--line); font-size: 1.65em; }
.prose h3 { margin: 1.8em 0 .5em; font-size: 1.25em; }
.prose p, .prose li { text-wrap: pretty; }
.prose blockquote { background: rgba(233, 238, 233, .7); padding: 18px 23px; }
.prose hr { width: 52px; margin: 2.6em 0; border: 0; border-top: 1px solid var(--teal); }
.prose img { box-shadow: var(--shadow-soft); }
.prose table { width: 100%; margin: 1.5em 0; font-size: .84em; }
.prose th, .prose td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { color: var(--ink); background: rgba(233, 238, 233, .75); font-weight: 600; }
.contact-card, .cv-panel { border: 1px solid rgba(45, 99, 93, .12); }
.contact-email { transition: color .25s ease, border-color .25s ease; }
.contact-email:hover { color: var(--teal-dark); border-color: var(--teal-dark); }
.cv-icon { position: relative; transition: color .25s ease, background .25s ease, transform .3s var(--ease-editorial); }
.cv-panel:hover .cv-icon { color: white; background: var(--teal-dark); transform: translateY(-3px) rotate(-4deg); }
.back-link { transition: color .2s ease, transform .2s ease; }
.back-link:hover { color: var(--teal-dark); transform: translateX(-4px); }
.reference-note { position: relative; }
.reference-note::before { display: block; width: 32px; height: 1px; margin-bottom: 16px; content: ""; background: var(--teal); }

/* About page: editorial biography layout and a warmer portrait presentation. */
.about-page { padding-bottom: 112px; }
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .45fr);
  align-items: end;
  gap: 42px;
  padding: 80px 0 46px;
  border-bottom: 1px solid var(--line);
}
.about-hero .eyebrow { margin-bottom: 18px; }
.about-hero h1 { margin: 0; font: 400 clamp(58px, 8vw, 94px)/.98 var(--serif); letter-spacing: -.055em; }
.about-hero-role { margin: 23px 0 0; color: #65747a; font: italic 17px/1.5 var(--serif); }
.about-hero-role span { color: var(--teal); padding-inline: 3px; }
.about-hero-note { justify-self: end; margin: 0 0 7px; padding-left: 19px; border-left: 1px solid var(--teal); color: #68777a; font: 15px/1.65 var(--serif); }
.about-layout { grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr); align-items: start; gap: clamp(50px, 8vw, 112px); padding: 65px 0 104px; }
.about-portrait { position: relative; isolation: isolate; width: 100%; max-width: 370px; margin: 0; background: transparent; }
.about-portrait::before {
  position: absolute;
  z-index: -1;
  top: -15px;
  right: -15px;
  width: 76%;
  height: 76%;
  border: 1px solid #9db5ae;
  content: "";
  transition: transform .45s var(--ease-editorial);
}
.about-portrait:hover::before { transform: translate(5px, -5px); }
.about-photo-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: .78;
  background: #e9eee9;
  border-radius: 48% 48% 3px 3px;
  box-shadow: 0 22px 55px rgba(24, 45, 60, .1);
  transform: perspective(1050px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .45s var(--ease-editorial), box-shadow .35s ease;
  will-change: transform;
}
.about-photo-frame::after {
  position: absolute;
  inset: 38% 0 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 44%, rgba(24, 45, 60, .22));
}
.about-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 27%;
  filter: saturate(.88) contrast(1.02);
  mix-blend-mode: multiply;
  transition: transform .8s var(--ease-editorial), filter .4s ease;
}
.about-photo-frame:hover { box-shadow: 0 28px 65px rgba(24, 45, 60, .16); }
.about-photo-frame:hover img { transform: scale(1.035); filter: saturate(.98) contrast(1.03); }
.about-photo-monogram { position: absolute; z-index: 1; top: 17px; right: 17px; color: var(--teal-dark); font: italic 14px var(--serif); }
.about-portrait-caption { display: flex; align-items: center; gap: 13px; padding: 18px 2px 0; }
.portrait-caption-mark { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid #9db5ae; border-radius: 50%; color: var(--teal-dark); font: 13px var(--serif); }
.about-portrait-caption > span:last-child { display: grid; gap: 4px; }
.about-portrait-caption strong { font: 500 14px var(--serif); }
.about-portrait-caption small { color: #748185; font-size: 9px; letter-spacing: .04em; }
.about-copy { padding-top: 6px; }
.about-copy > p:first-child { color: #334a53; font-size: clamp(18px, 2vw, 21px); line-height: 1.8; }
.about-copy h2:first-of-type { margin-top: 1.5em; }
.about-cv-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 30px; min-width: 190px; margin-top: 25px; padding: 13px 15px; border: 1px solid #b8c8c0; color: var(--ink); font-size: 11px; letter-spacing: .04em; transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease; }
.about-cv-link b { color: var(--teal-dark); font-size: 15px; font-weight: 400; transition: transform .25s var(--ease-editorial); }
.about-cv-link:hover { color: white; background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.about-cv-link:hover b { color: #b4cec2; transform: translate(2px, -2px); }
.about-focus { padding-top: 53px; border-top: 1px solid var(--line); }
.about-focus-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 30px; }
.about-focus-heading h2 { max-width: 670px; margin: 0; font: 400 clamp(34px, 4.5vw, 54px)/1.07 var(--serif); letter-spacing: -.035em; }
.about-focus-heading > p { max-width: 210px; margin: 0 0 5px; color: #718084; font: 13px/1.6 var(--serif); }
.about-focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.about-focus-card { position: relative; display: flex; min-height: 170px; flex-direction: column; justify-content: space-between; padding: 19px 20px 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .25); transition: transform .35s var(--ease-editorial), background .35s ease, border-color .35s ease, box-shadow .35s ease; }
.about-focus-card:hover { transform: translateY(-5px); border-color: #adc1b7; background: rgba(255, 255, 255, .72); box-shadow: var(--shadow-soft); }
.about-focus-number { color: #88a69b; font: italic 14px var(--serif); }
.about-focus-title { max-width: 245px; padding-right: 16px; font: 400 20px/1.3 var(--serif); }
.about-focus-arrow { position: absolute; right: 19px; bottom: 18px; color: var(--teal-dark); transition: transform .25s var(--ease-editorial); }
.about-focus-card:hover .about-focus-arrow { transform: translate(3px, -3px); }

.site-footer { background-image: radial-gradient(ellipse at 6% 100%, rgba(88, 135, 127, .2), transparent 34rem), linear-gradient(120deg, #182d3c, #203b47); }
.footer-brand .monogram { transition: transform .35s var(--ease-editorial), background .25s ease; }
.footer-brand:hover .monogram { background: rgba(255, 255, 255, .12); transform: rotate(8deg); }
.footer-links a { position: relative; transition: color .2s ease; }
.footer-links a::after { position: absolute; right: 0; bottom: -4px; left: 0; height: 1px; content: ""; background: #97b8aa; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.footer-links a:hover { color: white; }
.footer-links a:hover::after { transform: scaleX(1); }

@media (max-width: 640px) {
  .site-header.is-scrolled .header-inner { height: 64px; }
  .site-header.is-scrolled .primary-navigation { top: 64px; }
  .hero::before { top: -8%; left: -35vw; width: 90vw; }
  .theme-card:hover, .blog-card:hover, .contact-card:hover, .cv-panel:hover, .book-card:hover { transform: translateY(-2px); }
  .publication-row:hover { padding-right: 0; padding-left: 8px; }
  .publication-row::before { left: -8px; }
  .book-card { padding: 12px; margin: -12px; }
  .prose table { display: block; overflow-x: auto; }
  .feature-book::before { top: -220px; right: -180px; }
  .about-page { padding-bottom: 80px; }
  .about-hero { grid-template-columns: 1fr; gap: 19px; padding: 56px 0 30px; }
  .about-hero h1 { font-size: clamp(55px, 14vw, 72px); }
  .about-hero-note { justify-self: start; margin-left: 1px; font-size: 13px; }
  .about-layout { grid-template-columns: 1fr; gap: 35px; padding: 43px 0 70px; }
  .about-portrait { width: min(82%, 330px); justify-self: center; }
  .about-portrait::before { top: -11px; right: -11px; }
  .about-focus { padding-top: 38px; }
  .about-focus-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 22px; }
  .about-focus-heading h2 { font-size: 39px; }
  .about-focus-heading > p { max-width: 280px; }
  .about-focus-grid { grid-template-columns: 1fr; gap: 10px; }
  .about-focus-card { min-height: 128px; padding: 16px; }
  .about-focus-card:hover { transform: translateY(-2px); }
}
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
@media (min-width: 783px) { body.admin-bar .site-header { top: 32px; } }
@media (hover: none), (prefers-reduced-motion: reduce) {
  .hero-portrait, .about-photo-frame, .book-feature-cover, .book-cover, .book-single-cover { transform: none !important; }
  .theme-card:hover, .blog-card:hover, .contact-card:hover, .cv-panel:hover, .book-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  body::before { transition: none; }
  .page-intro h1::after { animation: none; }
}
