/* Fluid enhancements: local assets, native scroll, progressive motion. */
:root {
  --iz-accent: #596cdd;
  --iz-surface: #fff;
  --iz-line: rgba(91, 110, 150, .14);
  --iz-ink: #273449;
  --iz-muted: #6b778b;
  --iz-shadow: 0 18px 60px -28px rgba(35, 49, 85, .24);
  --iz-ease: cubic-bezier(.22, 1, .36, 1);
}
html[data-user-color-scheme="dark"] {
  --iz-accent: #a3b2ff;
  --iz-surface: #222b3a;
  --iz-line: rgba(178, 192, 223, .13);
  --iz-ink: #e3e9f4;
  --iz-muted: #a2aec3;
  --iz-shadow: 0 18px 60px -24px rgba(0, 0, 0, .5);
}
body { background: var(--body-bg-color); -webkit-font-smoothing: antialiased; }
::selection { background: #94a8ef55; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--iz-accent); outline-offset: 5px; border-radius: 5px; }
#navbar { transition: background-color .4s ease, box-shadow .4s ease; box-shadow: none; }
#navbar.top-nav-collapse {
  background: rgba(27, 37, 56, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -18px #0008;
}
#navbar.top-nav-collapse .navbar-brand, #navbar.top-nav-collapse .nav-link { color: #edf1ff; }
.navbar-brand { letter-spacing: -.03em; }
#navbar .nav-link { transition: opacity .25s ease, transform .35s var(--iz-ease); }
@media (hover: hover) { #navbar .nav-link:hover { transform: translateY(-2px); } }
.banner { overflow: hidden; isolation: isolate; }
.banner::before {
  content: ""; position: absolute; inset: -15%; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 18% 35%, #806be744, transparent 48%), radial-gradient(ellipse at 85% 65%, #3bbba42e, transparent 48%);
  transform: translate3d(var(--light-x, 0px), var(--light-y, 0px), 0);
  transition: opacity .5s ease;
}
.banner .full-bg-img { position: absolute; inset: 0; z-index: 1; }
.banner-text { max-width: 980px; padding-inline: 24px; }
.banner-text #subtitle { font-size: inherit; }
.banner-text .h2 { font-size: clamp(1.65rem, 3.5vw, 3rem); font-weight: 650; line-height: 1.45; letter-spacing: -.035em; text-wrap: balance; }
body:has(.index-card) .banner::after {
  content: ""; pointer-events: none; position: absolute; inset: -20%; z-index: 0;
  background: radial-gradient(ellipse at 35% 50%, #696bcf45, transparent 50%), radial-gradient(ellipse at 70% 40%, #36b9ba35, transparent 42%);
  animation: iz-aurora 18s ease-in-out infinite alternate;
}
body:has(.index-card) .banner-text { transform: translate3d(0, var(--hero-shift, 0px), 0); }
body:has(.index-card) .banner-text .h2 { font-size: clamp(2rem, 5.2vw, 4.6rem); font-weight: 700; letter-spacing: -.045em; margin-block: 18px; }
.hero-eyebrow { color: #c5cfee; font-size: .72rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; margin: 0; }
.hero-description { color: #d2dced; font-size: clamp(.9rem, 1.6vw, 1.1rem); line-height: 1.8; margin: 0 0 28px; }
.hero-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.hero-links a {
  padding: 9px 18px; border: 1px solid #ffffff30; border-radius: 999px; color: #edf3ff;
  background: #ffffff09; font-size: .8rem; backdrop-filter: blur(8px);
  transition: background .3s ease, border-color .3s ease, transform .4s var(--iz-ease);
}
.hero-links a:hover { background: #ffffff20; border-color: #ffffff65; transform: translateY(-3px); color: #fff; }
.hero-eyebrow, .hero-description, .hero-links { animation: iz-enter .9s var(--iz-ease) both; }
.hero-description { animation-delay: .1s; }
.hero-links { animation-delay: .2s; }
.effects-paused .banner::after { animation-play-state: paused !important; }
#board { border-radius: 22px; box-shadow: var(--iz-shadow); border: 1px solid var(--iz-line); }
body:has(.index-card) #board { padding: clamp(24px, 5vw, 60px) 0 32px; background: var(--iz-surface); }
body:has(.index-card) #board > .container > .row > div { max-width: 100%; flex-basis: 100%; padding-inline: clamp(16px, 4vw, 48px); }
.journal-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 0 0 30px; color: var(--iz-ink); }
.journal-heading h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.025em; margin: 6px 0 0; }
.journal-heading small { font-size: .65rem; letter-spacing: .2em; color: var(--iz-muted); }
.journal-heading a { color: var(--iz-muted); font-size: .8rem; white-space: nowrap; }
.index-card {
  position: relative; overflow: hidden; border: 1px solid var(--iz-line); border-radius: 16px;
  margin-bottom: 18px; padding: clamp(20px, 3vw, 32px); background: var(--iz-surface);
  transition: transform .55s var(--iz-ease), box-shadow .55s var(--iz-ease), border-color .35s ease, opacity .7s ease;
}
.index-card::before {
  content: ""; pointer-events: none; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(400px circle at var(--card-x, 50%) var(--card-y, 50%), #7d8cec16, transparent 70%);
  transition: opacity .4s ease;
}
.index-card:hover::before { opacity: 1; }
.index-card:hover { transform: translateY(-4px); box-shadow: var(--iz-shadow); border-color: #8394d84d; }
.index-info { padding: 0; position: relative; }
.index-header { font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.5; white-space: normal; margin-bottom: 8px; letter-spacing: -.025em; }
.index-header a { color: var(--iz-ink); transition: color .3s ease; }
.index-header a:hover { color: var(--iz-accent); }
.index-excerpt, .index-excerpt:hover { color: var(--iz-muted); margin: 0 0 20px; }
.index-excerpt > div { line-height: 1.85; -webkit-line-clamp: 2; }
.index-excerpt__noimg { max-height: 3.7em; }
.index-btm { gap: 8px; color: var(--iz-muted); font-size: .76rem; }
.index-btm .post-meta { align-items: center; }
.index-btm a { color: var(--iz-muted); }
.index-btm .post-meta:last-child a { padding: 3px 9px; margin: 2px; border-radius: 6px; background: #8191c00d; }
.motion-ready:not(.is-visible) { opacity: 0; transform: translateY(20px); }
.motion-ready:focus-within { opacity: 1; transform: none; }
.post-content { padding: clamp(26px, 4vw, 56px); max-width: 900px; }
.post-content .markdown-body, .about-content .markdown-body { font-size: 17px; line-height: 1.95; color: var(--iz-ink); overflow-wrap: break-word; }
.markdown-body p { margin-bottom: 1.35em; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { letter-spacing: -.025em; line-height: 1.5; scroll-margin-top: 90px; }
.markdown-body h1 { font-size: 1.85em; }
.markdown-body h2 { font-size: 1.5em; margin-top: 2.5em; padding-bottom: .5em; border-bottom: 1px solid var(--iz-line); }
.markdown-body h3 { font-size: 1.2em; margin-top: 2em; }
.markdown-body li { margin-block: .25em; }
.markdown-body blockquote { border-left: 3px solid #7a8fd2; background: #8299cd0a; padding: 12px 22px; border-radius: 0 10px 10px 0; color: var(--iz-muted); }
.markdown-body blockquote > :last-child { margin-bottom: 0; }
.markdown-body a:not(.headerlink):not(.anchorjs-link):not(.fancybox) { text-decoration: underline; text-decoration-color: #8297e855; text-underline-offset: 4px; transition: text-decoration-color .3s ease; }
.markdown-body a:hover { text-decoration-color: var(--iz-accent); }
.markdown-body img { border-radius: 12px; }
.markdown-body table { display: block; max-width: 100%; overflow: auto; font-size: .9em; }
.markdown-body table th, .markdown-body table td { padding: 12px 16px; border-color: var(--iz-line); }
.markdown-body pre, .markdown-body figure.highlight { border-radius: 12px; font-size: .83em; line-height: 1.75; border: 1px solid var(--iz-line); }
.markdown-body :not(pre) > code { padding: .15em .4em; border-radius: 5px; }
.post-prevnext a, #scroll-top-button { transition: background .3s ease, box-shadow .4s ease; }
#scroll-top-button { border-radius: 12px; box-shadow: var(--iz-shadow); }
.reading-progress { position: fixed; z-index: 1100; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, #8b8cf5, #64c8c3); transform: scaleX(0); transform-origin: left; pointer-events: none; }
@keyframes iz-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes iz-aurora { from { transform: translate3d(-2%, -1%, 0) rotate(-8deg); opacity: .7; } to { transform: translate3d(4%, 2%, 0) rotate(7deg); opacity: 1; } }
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: .2s; }
::view-transition-new(root) { animation-duration: .3s; }
@media (max-width: 767px) {
  #board { border-radius: 18px 18px 0 0; }
  body:has(.index-card) .banner-text .h2 { font-size: clamp(1.9rem, 7vw, 3rem); }
  .hero-description { max-width: 280px; margin-inline: auto; }
  .hero-links a { padding: 8px 13px; }
  .index-info { padding-top: 0; }
  .index-btm { row-gap: 10px; }
  .index-header { -webkit-line-clamp: unset; }
  .post-content { padding: 28px 20px; }
  .post-content .markdown-body { font-size: 16px; line-height: 1.9; }
  .markdown-body h1 { font-size: 1.65em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-ready:not(.is-visible) { opacity: 1; transform: none; }
  .banner-text, .banner::before, .index-card:hover { transform: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
