/* =====================================================================
   HYUN ENGINES — Blog single-post styling (single.php in this theme).
   Matches the blog-post.html mockup: reading-progress bar, article header,
   hero image band, two-column layout (prose + sticky sidebar), restyled
   comment form, and a related-posts grid. Loaded only on is_singular('post')
   — see hello_elementor_child_blog_assets() in functions.php.
   ===================================================================== */

body:has(.he-blog) {
  overflow-x: hidden;
}

.he-blog,
.he-blog-related {
  --ink: #0e0f11;
  --graphite: #16191d;
  --steel: #23272e;
  --line: #2e333b;
  --paper: #f4f1eb;
  --paper-2: #eae5db;
  --fog: #9aa1ab;
  --cloud: #e9e7e2;
  --accent: #e8431b;
  --accent-2: #ff6a3d;
  --amber: #f2a93b;
  --ok: #3ba776;
  --display: "Archivo Expanded", "Archivo", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --maxw: 1180px;
  font-family: var(--body);
  color: var(--ink);
}
.he-blog *,
.he-blog-related * {
  box-sizing: border-box;
}
.he-blog a,
.he-blog-related a {
  text-decoration: none;
}

/* ---- reading progress bar ---- */
.he-blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 9999;
}

/* ---- shared width wrapper ---- */
.he-blog-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.he-blog-head .he-blog-wrap {
  max-width: 840px;
}

/* ---- article header (dark page-banner, matches .pagehead) ---- */
.he-blog-head {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 54px 0 50px;
}
.he-blog-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.16;
  mask-image: radial-gradient(circle at 80% 20%, #000, transparent 70%);
}
.he-blog-head::after {
  content: "";
  position: absolute;
  right: -160px;
  top: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 67, 27, 0.22), transparent 65%);
}
.he-blog-head .he-blog-wrap {
  position: relative;
  z-index: 2;
}
.he-blog-crumbs {
  font-size: 0.8rem;
  color: var(--fog);
  margin: 0 0 16px;
}
.he-blog-crumbs a {
  color: inherit;
}
.he-blog-crumbs a:hover {
  color: var(--accent-2);
}
.he-blog-tagrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.he-blog-tag {
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 7px;
}
.he-blog-tag-alt {
  background: var(--steel);
  border: 1px solid var(--line);
  color: var(--cloud);
}
.he-blog-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
  margin: 10px 0 12px;
  color: #fff !important;
}
.he-blog-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--fog);
  font-size: 0.86rem;
  margin-top: 14px;
}
.he-blog-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.he-blog-author b {
  color: #fff;
}
.he-blog-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--amber));
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  color: #fff;
  font-size: 0.82rem;
  flex: none;
}
.he-blog-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #3a4049;
  flex: none;
}

/* ---- hero image band ---- */
.he-blog-heromargin {
  padding: 0 24px;
}
.he-blog-heroband {
  background: linear-gradient(155deg, #1c1f24, #0e0f11);
  border: 1px solid #e7e2d7;
  border-radius: 16px;
  margin: -36px auto 0;
  max-width: 980px;
  aspect-ratio: 16 / 7;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.he-blog-heroband::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.2;
  mask-image: radial-gradient(circle at 80% 15%, #000, transparent 72%);
}
.he-blog-heroband span {
  position: relative;
  z-index: 2;
  font-family: var(--display);
  font-weight: 800;
  color: var(--fog);
  opacity: 0.5;
  font-size: 2.4rem;
  text-transform: uppercase;
  text-align: center;
  padding: 0 24px;
}
.he-blog-heroband img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  display: block;
}

/* ---- two-column layout ---- */
.he-blog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 46px;
  margin-top: 46px;
  align-items: start;
  padding-bottom: 70px;
}

/* ---- prose ---- */
.he-blog-prose {
  max-width: 720px;
}
.he-blog-prose > p:first-of-type {
  font-size: 1.16rem;
  color: #3a4049;
  margin-bottom: 24px;
  line-height: 1.6;
}
.he-blog-prose h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 800;
  margin: 38px 0 13px;
  scroll-margin-top: 90px;
  color: var(--ink);
}
.he-blog-prose h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--ink);
}
.he-blog-prose p {
  margin-bottom: 17px;
  color: #2c3137;
  line-height: 1.7;
}
.he-blog-prose ul {
  list-style: none;
  display: grid;
  gap: 11px;
  margin: 0 0 20px;
  padding: 0;
}
.he-blog-prose ul li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  align-items: flex-start;
  color: #2c3137;
}
.he-blog-prose ul li > * {
  min-width: 0;
}
.he-blog-prose ul li::before {
  content: "\2713";
  color: #fff;
  background: var(--ok);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  flex: none;
  margin-top: 3px;
}
.he-blog-prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
  color: #2c3137;
}
.he-blog-prose ol li {
  margin-bottom: 10px;
}
.he-blog-prose a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}
.he-blog-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  margin: 8px 0 22px;
}
.he-blog-prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin: 0 0 20px;
  color: #3a4049;
  font-style: italic;
}
.he-blog-prose table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e7e2d7;
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0 22px;
  display: block;
  overflow-x: auto;
}
.he-blog-prose table th {
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.82rem;
  text-align: left;
  padding: 13px 16px;
}
.he-blog-prose table td {
  padding: 12px 16px;
  border-bottom: 1px solid #ece7dc;
  font-size: 0.92rem;
  color: #2c3137;
}
.he-blog-prose table tr:last-child td {
  border-bottom: none;
}
.he-blog-prose table tr:nth-child(even) td {
  background: #faf8f3;
}

/* ---- [hyun_takeaways] callout ---- */
.he-blog-takeaways {
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  padding: 26px 28px;
  margin: 28px 0;
}
.he-blog-takeaways h3 {
  color: #fff;
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 13px;
}
.he-blog-takeaways-body ul {
  list-style: none;
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
}
.he-blog-takeaways-body li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 11px;
  align-items: flex-start;
  color: var(--cloud);
  font-size: 0.94rem;
}
.he-blog-takeaways-body li > * {
  min-width: 0;
}
.he-blog-takeaways-body li::before {
  content: "\2713";
  color: #fff;
  background: var(--accent);
  width: 21px;
  height: 21px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  flex: none;
  margin-top: 3px;
}
.he-blog-takeaways-body p {
  color: var(--cloud);
  margin: 0 0 10px;
}

/* ---- [hyun_inline_cta] callout ---- */
.he-blog-inlinecta {
  background: var(--accent);
  color: #fff;
  border-radius: 16px;
  padding: 30px;
  margin: 32px 0;
}
.he-blog-inlinecta h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
}
.he-blog-inlinecta p {
  opacity: 0.95;
  margin: 0 0 18px;
  max-width: 48ch;
  color: #fff;
}

/* ---- shared button ---- */
.he-blog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 9px;
  cursor: pointer;
  border: none;
  transition: 0.2s;
  text-decoration: none !important;
}
.he-blog-inlinecta .he-blog-btn {
  background: #fff;
  color: var(--accent) !important;
}
.he-blog-inlinecta .he-blog-btn:hover {
  background: var(--paper-2);
  color: var(--accent) !important;
}

/* ---- sidebar ---- */
.he-blog-side {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 20px;
}
.he-blog-panel {
  background: #fff;
  border: 1px solid #e7e2d7;
  border-radius: 14px;
  padding: 22px;
}
.he-blog-panel h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 14px;
  color: var(--ink);
}
.he-blog-toc-panel .hyun-toc {
  position: static;
  top: auto;
}
.he-blog-helpcard {
  background: linear-gradient(160deg, var(--accent), #b8330f);
  color: #fff;
  border: none;
}
.he-blog-helpcard h4 {
  color: #fff;
}
.he-blog-helpcard p {
  font-size: 0.86rem;
  color: #ffe;
  margin: 0 0 14px;
}
.he-blog-helpphone {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  display: block;
  margin-bottom: 12px;
  color: #fff;
}
.he-blog-helpcard .he-blog-btn {
  width: 100%;
  background: #fff;
  color: var(--accent) !important;
}
.he-blog-helpcard .he-blog-btn:hover {
  background: var(--paper-2);
  color: var(--accent) !important;
}

/* ---- related posts ---- */
.he-blog-related {
  background: var(--paper-2);
  padding: 64px 0;
}
.he-blog-related h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 24px;
  color: var(--ink);
}
.he-blog-rgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.he-blog-rcard {
  display: block;
  background: #fff;
  border: 1px solid #e7e2d7;
  border-radius: 16px;
  overflow: hidden;
  transition: 0.25s;
  color: var(--ink);
}
.he-blog-rcard:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px -24px rgba(0, 0, 0, 0.3);
}
.he-blog-rcard-ph {
  height: 130px;
  background: linear-gradient(155deg, #1c1f24, #0e0f11);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: var(--fog);
  font-family: var(--display);
  font-weight: 800;
}
.he-blog-rcard-body {
  padding: 18px;
}
.he-blog-rcard-date {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.he-blog-rcard h3 {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  margin: 8px 0 0;
  line-height: 1.25;
  color: var(--ink);
}
.he-blog-rcard:hover h3 {
  color: var(--accent);
}

/* =====================================================================
   Comments — restyled default WordPress markup (comments.php /
   comment_form() aren't overridden, just reskinned via CSS).
   ===================================================================== */
.he-blog-comments-wrap {
  background: var(--paper);
  padding: 10px 0 70px;
}
.he-blog-comments .comments-area {
  max-width: 720px;
}
.he-blog-comments .title-comments,
.he-blog-comments .comment-reply-title {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 22px;
}
.he-blog-comments .comment-list {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: grid;
  gap: 16px;
}
.he-blog-comments .comment-list .children {
  list-style: none;
  margin: 16px 0 0;
  padding: 0 0 0 30px;
  display: grid;
  gap: 16px;
}
.he-blog-comments .comment-body {
  background: #fff;
  border: 1px solid #e7e2d7;
  border-radius: 14px;
  padding: 18px 20px;
}
.he-blog-comments .comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}
.he-blog-comments .comment-author .avatar {
  border-radius: 50%;
  flex: none;
}
.he-blog-comments .comment-author .fn {
  font-style: normal;
}
.he-blog-comments .comment-metadata {
  margin: 4px 0 10px;
}
.he-blog-comments .comment-metadata a {
  color: var(--fog);
  font-size: 0.78rem;
}
.he-blog-comments .comment-content p {
  margin: 0 0 10px;
  color: #2c3137;
  font-size: 0.94rem;
  line-height: 1.6;
}
.he-blog-comments .reply a {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.he-blog-comments #respond {
  background: #fff;
  border: 1px solid #e7e2d7;
  border-radius: 16px;
  padding: 26px 28px;
}
.he-blog-comments .comment-notes,
.he-blog-comments .logged-in-as {
  color: #525964;
  font-size: 0.88rem;
  margin: 0 0 18px;
}
.he-blog-comments .comment-form p {
  margin: 0 0 16px;
}
.he-blog-comments .comment-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.he-blog-comments .comment-form input[type="text"],
.he-blog-comments .comment-form input[type="email"],
.he-blog-comments .comment-form input[type="url"],
.he-blog-comments .comment-form textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 0.92rem;
  padding: 12px 14px;
  border: 1.5px solid #d8d2c6;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.he-blog-comments .comment-form input:focus,
.he-blog-comments .comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.he-blog-comments .comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 8px;
}
.he-blog-comments .comment-form-cookies-consent label {
  margin: 0;
}
.he-blog-comments .form-submit {
  margin: 0;
}
.he-blog-comments .form-submit input,
.he-blog-comments #submit {
  background: var(--accent);
  color: #fff;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}
.he-blog-comments .form-submit input:hover,
.he-blog-comments #submit:hover {
  background: var(--accent-2);
}

/* ---- responsive ---- */
@media (max-width: 980px) {
  .he-blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .he-blog-side {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .he-blog-toc-panel {
    display: none;
  }
  .he-blog-rgrid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .he-blog-side {
    grid-template-columns: 1fr;
  }
  .he-blog-heroband {
    margin-top: -20px;
  }
  .he-blog-comments .comment-list .children {
    padding-left: 14px;
  }
}
