/* ============================================================
   anujshah.com — layout, components, responsive
   Built on top of tokens.css. All visual values reference --*
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg-1);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }
::selection { background: var(--fg-1); color: var(--bg); }

/* Native unstyled button reset */
button {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Focus — visible only when keyboard */
:focus { outline: none; }
:focus-visible {
  outline: 1px solid var(--fg-1);
  outline-offset: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  background: var(--fg-1);
  color: var(--bg);
  padding: var(--s-3) var(--s-4);
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  z-index: 200;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Page shell ---------- */

main {
  min-height: 100vh;
  padding-top: 88px; /* clears fixed nav */
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--s-7) var(--s-5) var(--s-9);
}

/* Top breathing room on desktop (tightened from 96px) */
@media (min-width: 720px) {
  main { padding-top: 56px; }
  .page { padding: var(--s-8) var(--s-7) var(--s-10); }
}

@media (min-width: 1080px) {
  .page { padding: var(--s-9) var(--s-9) var(--s-10); }
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
  .nav { padding: var(--s-4) var(--s-7); }
}
@media (min-width: 1080px) {
  .nav { padding: var(--s-4) var(--s-9); }
}

.nav-wordmark {
  display: flex;
  align-items: center;
  height: 40px;
}
.nav-wordmark img {
  height: 22px;
  filter: invert(1);
  opacity: 0.95;
  display: block;
}
@media (min-width: 720px) {
  .nav-wordmark img { height: 28px; }
}

.nav-links {
  display: flex;
  gap: var(--s-5);
}
@media (min-width: 720px) {
  .nav-links { gap: var(--s-6); }
}

.nav-link {
  font-size: var(--t-micro);
  font-weight: var(--w-regular);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color var(--dur) var(--ease);
  text-decoration: none;
}
.nav-link:hover,
.nav-link.is-active { color: var(--fg-1); }

/* ---------- Eyebrow / labels ---------- */

.eyebrow {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: var(--w-regular);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  margin-top: var(--s-10);
  padding: var(--s-8) var(--s-5) var(--s-7);
}
@media (min-width: 720px) {
  .footer { padding: var(--s-8) var(--s-7) var(--s-7); }
}
@media (min-width: 1080px) {
  .footer { padding: var(--s-8) var(--s-9) var(--s-7); }
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-7);
  }
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.footer-email {
  font-size: var(--t-h4);
  font-weight: var(--w-light);
  color: var(--fg-1);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-3);
  padding-bottom: var(--s-1);
  align-self: flex-start;
  transition: border-color var(--dur) var(--ease);
}
.footer-email:hover { border-bottom-color: var(--fg-1); }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
@media (min-width: 720px) {
  .footer-links { text-align: right; align-items: flex-end; }
}
.footer-link {
  font-size: var(--t-body-sm);
  font-weight: var(--w-light);
  color: var(--fg-2);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.footer-link:hover { color: var(--fg-1); }
.footer-link .arr { opacity: 0.5; margin-left: 4px; }

.footer-meta {
  max-width: 1180px;
  margin: var(--s-7) auto 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
  gap: var(--s-4);
}

/* ---------- Home ---------- */

.hero {
  padding-top: var(--s-7);
  padding-bottom: var(--s-9);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  max-width: 960px;
}
@media (min-width: 720px) {
  .hero { padding-top: var(--s-8); padding-bottom: var(--s-10); }
}

.hero-name {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-widest);
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: var(--w-regular);
  margin: 0;
}

.hero-stance {
  font-size: clamp(40px, 6.5vw, 88px);
  font-weight: var(--w-thin);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-display);
  color: var(--fg-1);
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}

.hero-nuance {
  font-size: var(--t-body);
  font-weight: var(--w-light);
  line-height: var(--lh-loose);
  color: var(--fg-2);
  max-width: 52ch;
  margin: 0;
}

.hero-cta {
  margin-top: var(--s-3);
  font-size: var(--t-caption);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-1);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-1);
  padding-bottom: var(--s-1);
  align-self: flex-start;
  transition: opacity var(--dur) var(--ease);
}
.hero-cta:hover { opacity: 0.7; }
.hero-cta .arr { margin-left: 6px; display: inline-block; transition: transform var(--dur) var(--ease); }
.hero-cta:hover .arr { transform: translateX(4px); }

/* "Now" section */
.now {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  padding: var(--s-7) 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 720px) {
  .now {
    grid-template-columns: 200px 1fr;
    gap: var(--s-7);
    padding: var(--s-8) 0;
  }
}

.now-meta {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.now-date {
  font-size: var(--t-caption);
  color: var(--fg-3);
  font-weight: var(--w-light);
}
.now-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  max-width: 58ch;
}
.now-body p {
  font-size: var(--t-h4);
  font-weight: var(--w-light);
  line-height: 1.55;
  color: var(--fg-1);
  margin: 0;
}
@media (min-width: 720px) {
  .now-body p { font-size: 22px; }
}

/* Selected writing */
.selected {
  padding-top: var(--s-7);
  border-top: 1px solid var(--line);
}
.selected-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--s-6);
  gap: var(--s-4);
}
.selected-list {
  display: flex;
  flex-direction: column;
}

.essay-link {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  text-align: left;
  transition: opacity var(--dur) var(--ease);
}
.essay-link:last-child { border-bottom: 1px solid var(--line); }
.essay-link:hover { opacity: 0.85; }
.essay-link:hover .essay-title { color: var(--fg-2); }
.essay-link:hover .essay-arr { transform: translateX(4px); color: var(--fg-1); }

@media (min-width: 720px) {
  .essay-link {
    grid-template-columns: 140px 1fr auto;
    gap: var(--s-6);
    align-items: baseline;
    padding: var(--s-6) 0;
  }
}

.essay-date {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.essay-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  max-width: 58ch;
}
.essay-title {
  font-size: var(--t-h3);
  font-weight: var(--w-extralight);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--fg-1);
  margin: 0;
  transition: color var(--dur) var(--ease);
}
@media (min-width: 720px) {
  .essay-title { font-size: 30px; }
}
.essay-pull {
  font-size: var(--t-body-sm);
  font-weight: var(--w-light);
  line-height: var(--lh-loose);
  color: var(--fg-2);
  margin: 0;
  font-style: italic;
}
.essay-arr {
  font-size: var(--t-h4);
  color: var(--fg-3);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
  display: none;
}
@media (min-width: 720px) {
  .essay-arr { display: inline; }
}

.read-all {
  margin-top: var(--s-7);
  display: inline-block;
  font-size: var(--t-caption);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-1);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-3);
  padding-bottom: var(--s-1);
  transition: border-color var(--dur) var(--ease);
}
.read-all:hover { border-bottom-color: var(--fg-1); }
.read-all .arr { margin-left: 6px; display: inline-block; transition: transform var(--dur) var(--ease); }
.read-all:hover .arr { transform: translateX(4px); }

/* ---------- Blogs index ---------- */

.blogs-head {
  padding-top: var(--s-7);
  padding-bottom: var(--s-8);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  max-width: 760px;
}
@media (min-width: 720px) {
  .blogs-head { padding-top: var(--s-8); padding-bottom: var(--s-9); }
}
.blogs-title {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: var(--w-thin);
  letter-spacing: var(--tr-display);
  line-height: var(--lh-tight);
  margin: 0;
}
.blogs-frame {
  font-size: var(--t-body);
  font-weight: var(--w-light);
  line-height: var(--lh-loose);
  color: var(--fg-2);
  margin: 0;
  max-width: 56ch;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-5);
}
.tag-label {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-right: var(--s-3);
}
.tag-btn {
  font-size: var(--t-caption);
  letter-spacing: var(--tr-wide);
  color: var(--fg-3);
  padding: 0;
  transition: color var(--dur) var(--ease);
  white-space: nowrap;
}
.tag-btn:hover { color: var(--fg-1); }
.tag-btn.is-active { color: var(--fg-1); border-bottom: 1px solid var(--fg-1); padding-bottom: 2px; }
.tag-sep {
  color: var(--fg-4);
  font-size: var(--t-caption);
}

.archive-list {
  display: flex;
  flex-direction: column;
}

.archive-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  text-align: left;
  transition: opacity var(--dur) var(--ease);
}
.archive-row:hover { opacity: 0.85; }
.archive-row:hover .archive-title { color: var(--fg-2); }

@media (min-width: 720px) {
  .archive-row {
    grid-template-columns: 140px 1fr 120px;
    gap: var(--s-6);
    align-items: baseline;
    padding: var(--s-6) 0;
  }
}

.archive-date {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.archive-main {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  max-width: 58ch;
}
.archive-title {
  font-size: var(--t-h3);
  font-weight: var(--w-extralight);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--fg-1);
  margin: 0;
  transition: color var(--dur) var(--ease);
}
.archive-desc {
  font-size: var(--t-body-sm);
  font-weight: var(--w-light);
  line-height: var(--lh-loose);
  color: var(--fg-2);
  margin: 0;
}
.archive-time {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .archive-time { text-align: right; }
}

.empty-state {
  padding: var(--s-8) 0;
  text-align: center;
  color: var(--fg-3);
  font-size: var(--t-body-sm);
  font-style: italic;
}

/* ---------- Post template ----------
   Post sits inside .page and uses the same full content width as .archive-list
   on the Blogs page. The body itself stays in a 65ch reading column. */

.post {
  padding-top: var(--s-7);
}
@media (min-width: 720px) {
  .post { padding-top: var(--s-8); }
}

.post-back {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: var(--s-7);
  transition: color var(--dur) var(--ease);
  display: inline-block;
  text-decoration: none;
}
.post-back:hover { color: var(--fg-1); }

/* Post header: featured image (if any) sits LEFT of meta + title on desktop.
   Mobile stacks image above. Posts without a hero render title full-width. */
.post-header {
  margin-bottom: var(--s-7);
}
.post-header-text {
  min-width: 0;
}
.post-hero {
  margin: 0 0 var(--s-5);
}
.post-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
@media (min-width: 720px) {
  .post-header.has-hero {
    display: grid;
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: var(--s-7);
    align-items: center;
  }
  .post-header.has-hero .post-hero {
    margin: 0;
  }
}
@media (min-width: 1080px) {
  .post-header.has-hero {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: var(--s-8);
  }
}

.post-meta {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: var(--s-4);
}
.post-meta .sep { color: var(--fg-4); }

.post-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: var(--w-extralight);
  letter-spacing: var(--tr-display);
  line-height: var(--lh-snug);
  margin: 0 0 var(--s-7);
  text-wrap: balance;
}

.post-lead {
  font-size: 22px;
  font-weight: var(--w-light);
  line-height: 1.5;
  color: var(--fg-1);
  margin: 0 0 var(--s-6);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.005em;
}

/* Block layout (not flex) so floated figures inside can wrap text properly. */
.post-body {
  display: block;
}
.post-body::after {
  content: "";
  display: block;
  clear: both;
}
.post-body > * {
  margin-top: 0;
  margin-bottom: var(--s-6);
}
.post-body > *:last-child {
  margin-bottom: 0;
}
.post-body p {
  font-size: 18px;
  font-weight: var(--w-light);
  line-height: 1.85;
  color: var(--fg-2);
}
.post-body p:first-of-type::first-letter {
  /* a very quiet first-line ornament — bigger but not dropped */
  font-weight: var(--w-light);
}

/* Inline images in posts — float right on desktop so prose wraps around them. */
.post-image {
  margin: 0 0 var(--s-5) var(--s-6);
  float: right;
  width: 42%;
  max-width: 360px;
  shape-outside: margin-box;
}
.post-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-1);
}
/* Alternate sides for a less repetitive rhythm */
.post-image:nth-of-type(2n) {
  float: left;
  margin: 0 var(--s-6) var(--s-5) 0;
}
/* On phones, no float — full width inline. */
@media (max-width: 720px) {
  .post-image,
  .post-image:nth-of-type(2n) {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: var(--s-4) 0;
  }
}

/* Plain <img> tags in post bodies — base styling.
   Width is left alone so the author's width="225" HTML attribute (or natural
   image size) wins, with max-width as a safety cap. */
.post-body p img,
.post-body figure:not(.post-image) img,
.post-body > img {
  max-width: 50%;
  height: auto;
  display: block;
  margin: var(--s-3) 0 var(--s-5) var(--s-6);
  border-radius: var(--r-1);
  shape-outside: margin-box;
  /* Default: float right if author didn't pick an alignment. */
  float: right;
}

/* WordPress standard alignment classes — author's choice wins.
   These are more specific than the base rule so they always override. */
.post-body img.alignright,
.post-body p img.alignright {
  float: right;
  margin: var(--s-3) 0 var(--s-5) var(--s-6);
}
.post-body img.alignleft,
.post-body p img.alignleft {
  float: left;
  margin: var(--s-3) var(--s-6) var(--s-5) 0;
}
.post-body img.aligncenter,
.post-body p img.aligncenter {
  display: block;
  float: none;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}
.post-body img.alignnone,
.post-body p img.alignnone {
  float: none;
  display: inline-block;
  margin: var(--s-3) 0;
}

/* Paragraphs that contain only a floated image: collapse so they don't
   inject a blank gap in the flow. */
.post-body p:has(> img:only-child) {
  margin: 0;
  line-height: 0;
}

/* Mobile: any aligned image becomes full width inline. */
@media (max-width: 720px) {
  .post-body p img,
  .post-body figure:not(.post-image) img,
  .post-body > img,
  .post-body img.alignleft,
  .post-body img.alignright,
  .post-body img.aligncenter,
  .post-body img.alignnone,
  .post-body p img.alignleft,
  .post-body p img.alignright,
  .post-body p img.aligncenter,
  .post-body p img.alignnone {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: var(--s-4) 0;
    display: block;
  }
  .post-body p:has(> img:only-child) { line-height: inherit; }
}

.post-signoff {
  font-style: italic;
  font-size: var(--t-body-sm);
  color: var(--fg-3);
  margin: var(--s-7) 0 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.pager {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
}
@media (min-width: 720px) {
  .pager { grid-template-columns: 1fr 1fr; gap: var(--s-7); }
}
.pager-btn {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  text-align: left;
  color: var(--fg-1);
  text-decoration: none;
  transition: opacity var(--dur) var(--ease);
}
.pager-btn:hover { opacity: 0.75; }
.pager-btn.right { text-align: right; align-items: flex-end; }
.pager-key {
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
}
.pager-title {
  font-size: var(--t-h4);
  font-weight: var(--w-light);
  line-height: 1.3;
  max-width: 32ch;
}

/* ---------- Contact ----------
   Contact is wrapped in .page (which owns outer padding), so .contact only
   adds the in-page padding-top that matches .blogs-head, and the centering. */

.contact {
  max-width: 880px;
  padding-top: var(--s-7);
  min-height: calc(100vh - 88px - 240px); /* clear nav + footer to feel one-screen */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 720px) {
  .contact { padding-top: var(--s-8); }
}

.contact-eyebrow {
  margin-bottom: var(--s-5);
}
.contact-head {
  font-size: clamp(56px, 9vw, 128px);
  font-weight: var(--w-thin);
  letter-spacing: var(--tr-display);
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}
.contact-open {
  font-size: var(--t-body);
  font-weight: var(--w-light);
  line-height: var(--lh-loose);
  color: var(--fg-2);
  max-width: 56ch;
  margin: 0 0 var(--s-8);
}

.contact-email-wrap {
  padding: var(--s-7) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-7);
}
.contact-email-label {
  display: block;
  margin-bottom: var(--s-3);
}
.contact-email {
  display: inline-block;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: var(--w-extralight);
  letter-spacing: -0.01em;
  color: var(--fg-1);
  text-decoration: none;
  line-height: 1.1;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: var(--s-2);
  transition: border-color var(--dur) var(--ease);
  overflow-wrap: anywhere;
}
.contact-email:hover { border-bottom-color: var(--fg-1); }
.contact-copy-hint {
  display: inline-block;
  margin-left: var(--s-4);
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--fg-3);
  vertical-align: middle;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.contact-copy-hint:hover { color: var(--fg-1); }
.contact-copy-hint.is-copied { color: var(--fg-1); }

.contact-secondary {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-7);
}
@media (min-width: 560px) {
  .contact-secondary { flex-direction: row; gap: var(--s-6); align-items: center; }
}
.contact-link {
  font-size: var(--t-h4);
  font-weight: var(--w-light);
  color: var(--fg-1);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-3);
  padding-bottom: var(--s-1);
  align-self: flex-start;
  transition: border-color var(--dur) var(--ease);
}
.contact-link:hover { border-bottom-color: var(--fg-1); }
.contact-link .arr { opacity: 0.5; margin-left: 6px; }

.contact-expect {
  font-size: var(--t-body-sm);
  font-weight: var(--w-light);
  line-height: var(--lh-loose);
  color: var(--fg-3);
  max-width: 56ch;
  margin: 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Entry fade (cheap, respects reduced motion) ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeIn var(--dur-slow) var(--ease) forwards;
}
@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HEADLESS ADDITIONS — Comments, Subscribe, form states
   ============================================================ */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------- Form status (shared) ---------- */
.form-status {
  margin: var(--s-3) 0 0;
  font-size: var(--t-body-sm);
  font-weight: var(--w-light);
  line-height: var(--lh-normal);
}
.form-status.is-ok  { color: var(--fg-2); }
.form-status.is-err { color: #C9A382; }

/* ---------- Comments ---------- */
.comments {
  margin-top: var(--s-9);
  padding-top: var(--s-7);
  border-top: 1px solid var(--line);
}
.comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-5);
}
.comments-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-7) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
.comment {
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
.comment:first-child {
  padding-top: 0;
  border-top: 0;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-caption);
  color: var(--fg-3);
  margin-bottom: var(--s-3);
  letter-spacing: var(--tr-wide);
}
.comment-meta .sep { color: var(--fg-4); }
.comment-name {
  color: var(--fg-2);
  font-weight: var(--w-regular);
  text-transform: uppercase;
  letter-spacing: var(--tr-wider);
  font-size: var(--t-micro);
}
.comment-body {
  font-size: var(--t-body);
  font-weight: var(--w-light);
  line-height: var(--lh-loose);
  color: var(--fg-2);
}
.comment-body p { margin: 0 0 var(--s-3) 0; }
.comment-body p:last-child { margin-bottom: 0; }

/* ---------- Comment form ---------- */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
}
.comment-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 560px) {
  .comment-form-row { grid-template-columns: 1fr 1fr; }
}

.comment-input,
.comment-textarea,
.subscribe-input {
  width: 100%;
  background: transparent;
  color: var(--fg-1);
  border: 0;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font);
  font-weight: var(--w-light);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  padding: var(--s-3) 0;
  transition: border-color var(--dur) var(--ease);
  outline: none;
  border-radius: 0;
}
.comment-input::placeholder,
.comment-textarea::placeholder,
.subscribe-input::placeholder {
  color: var(--fg-4);
}
.comment-input:focus,
.comment-textarea:focus,
.subscribe-input:focus {
  border-bottom-color: var(--fg-2);
}
.comment-textarea {
  resize: vertical;
  min-height: 6em;
  line-height: var(--lh-loose);
}

.comment-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-top: var(--s-2);
}

/* ---------- Subscribe ---------- */
.footer-subscribe {
  padding-bottom: var(--s-6);
  margin-bottom: var(--s-6);
  border-bottom: 1px solid var(--line);
}
.subscribe {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 420px;
}
.subscribe-form {
  display: flex;
  align-items: flex-end;
  gap: var(--s-3);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: var(--s-1);
  transition: border-color var(--dur) var(--ease);
}
.subscribe-form:focus-within { border-bottom-color: var(--fg-2); }
.subscribe-input {
  border-bottom: 0;
  padding: var(--s-2) 0;
  flex: 1;
}
.subscribe-btn {
  background: transparent;
  border: 0;
  color: var(--fg-2);
  font-family: var(--font);
  font-size: var(--t-h4);
  padding: 0 var(--s-2) var(--s-2) var(--s-2);
  cursor: pointer;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.subscribe-btn:hover { color: var(--fg-1); transform: translateX(2px); }
.subscribe-btn:disabled { opacity: 0.4; cursor: default; }


/* ---------- Hover preview (cursor-following thumbnail) ---------- */
.hover-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: auto;
  margin: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 150;
  transition: opacity 0.18s var(--ease);
  will-change: transform, opacity;
}
.hover-preview.is-visible { opacity: 1; }
.hover-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* No hover on touch devices — hide entirely */
@media (hover: none), (max-width: 720px) {
  .hover-preview { display: none; }
}
