@media (prefers-reduced-motion: reduce){
html {
  scroll-behavior: auto;
}

*,
*::before,
*::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
    }
}

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

/* === Back to top === */
.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 90;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--cream);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* === BREADCRUMB === */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.45rem;

    margin: 0 0 var(--space-4);
    padding: 0;

    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.breadcrumb::-webkit-scrollbar {
    display: none;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    color: var(--cream-dim);
    margin: 0;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 0.45rem;
    color: var(--rule);
}

.breadcrumb a {
    display: inline-flex;
    align-items: center;
    color: var(--cream-dim);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--teal);
}

.breadcrumb li[aria-current="page"] {
    color: var(--cream);
    font-weight: 600;
}

@media (max-width: 768px) {
.breadcrumb {
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  }
}

/* === ARTICLE SECTION === */
.post-hero {
    padding: 2.5rem 32px 0;
    position: relative;
    overflow: hidden;
}

.post-hero .breadcrumb {
    justify-content: flex-start;
}

.post-title {
    font-size: clamp(1.8rem, 4.4vw, 2.7rem);
    max-width: 22ch;
}

.post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.4rem;
    margin: 1.2rem 0 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.post-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff5d3a, #ffb238);
    flex-shrink: 0;
}

.post-author-name {
    font-weight: 700;
    font-size: 0.92rem;
    display: block;
}

.post-author-date {
    font-size: 0.8rem;
    color: var(--cream-dim);
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--cream-dim);
    font-family: var(--font-mono);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .post-hero {
        padding: 1.5rem 16px;
    }

    .post-title {
        max-width: 100%;
        font-size: clamp(2rem, 8vw, 2.6rem);
    }

    .post-meta-bar {
        gap: 0.9rem;
    }
}

/* === POST LAYOUT === */
.post-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 820px);
    justify-content: center;
    gap: 1rem;
    align-items: start;
    padding: 0 32px 1rem;
}

.post-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-content {
    width: 100%;
    padding-top: 0;
    padding-right: 20px;
    padding-bottom: 48px;
    padding-left: 20px;
}

.content-wrap {
  max-width: 740px;
  margin: 0 auto;
  width: 100%;
}

.post-content > p {
    color: var(--cream);
    font-size: 1.05rem;
    margin: 0 0 1.3rem;
    line-height: 1.75;
}

.post-content > p:first-child {
    font-size: 1.12rem;
    color: var(--cream-dim);
}

.post-item {
  margin: 4rem 0;
  scroll-margin-top: 90px;
}

.post-item:first-child {
  margin-top: 0;
}

.post-item h2 {
  font-size: 1.8rem;
  line-height: 1.3;
  margin: 0 0 1.2rem;
}

.post-item h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--primary);
}

.post-item p {
  color: var(--cream);
  font-size: 1.06rem;
  line-height: 1.9;
  margin: 0 0 1.5rem;
}

.post-item p:last-child {
  margin-bottom: 0;
}

.post-item figure {
    margin: 2rem 0 2.5rem;
}

.post-item .item-photo {
    aspect-ratio: 16/9;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 0.6rem;
}

.post-item figcaption {
  margin-top: .85rem;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--cream-dim);
  text-align: left;
  border-left:3px solid rgba(255,255,255,.15);
  padding-left:12px;
}

.post-item figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    0 12px 35px rgba(0,0,0,.28);
  transition: transform .3s ease,
  box-shadow .3s ease;
}

.post-item figure img:hover {
  transform: translateY(-2px);
  box-shadow:
        0 18px 45px rgba(0,0,0,.35);
}

.article-image {
  margin: 2rem 0 2.5rem;
}

.article-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 35px rgba(0,0,0,.28);
  transition: .3s ease;
}

.article-image img:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}

.article-image figcaption {
    margin-top: .9rem;
    max-width: 85%;
    margin-inline: auto;
    color: var(--cream-dim);
    font-size: .8rem;
    line-height: 1.6;
    text-align: center;
    font-style: italic;
}

.study-card {
  margin:2rem 0;
  padding:1.6rem;
  background:var(--panel);
  border:1px solid var(--rule);
  border-radius:18px;
}

.study-number {
  font-size:.8rem;
  font-weight:700;
  letter-spacing:.15em;
  color:var(--yellow);
  margin-bottom:.6rem;
}

.study-card h3 {
  margin:0;
  font-size:1.3rem;
  line-height:1.35;
}

.study-year {
  margin-top:.35rem;
  color:var(--cream-dim);
  font-size:.9rem;
}

.study-card p:first-of-type{
  margin-top:1.3rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .post-sidebar {
    position: static;
    order: -1;
    top: auto;
    padding: 0 24px;
    box-sizing: border-box;
  }

  .tocToggle-wrap,
  .toc-card {
    width: 100%;
    box-sizing: border-box;
  }

  .content-wrap {
    max-width: 100%;
  }

  .post-content {
    padding-left: 48px;
    padding-right: 48px;
  }
}

/* SISI KIRI SIDEBAR */
.sidebar-widget,
.toc-card,
.share-card {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: 1rem;
    padding: 1rem;
}

.sidebar-widget h2,
.toc-card h2,
.share-card h2 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cream-dim);
    margin: 0 0 0.8rem;
    font-weight: 700;
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toc-list a {
    font-size: 0.86rem;
    color: var(--cream-dim);
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
}

.toc-list a:hover {
    color: var(--cream);
    background: var(--panel-2);
}

.toc-list a.is-active {
    color: var(--red);
    border-left-color: var(--red);
    font-weight: 700;
    background: var(--panel-2);
}

.tocToggle-wrap {
    display: none;
}

.share-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
}

.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--rule);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    border-color: var(--red);
}

.copy-note {
    font-size: 0.78rem;
    color: var(--teal);
    font-family: var(--font-mono);
    margin-top: 0.6rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .tocToggle-wrap {
        display: block;
        margin-bottom: 0.75rem;
    }

    #tocToggle {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--panel);
        border: 1px solid var(--rule);
        border-radius: 1rem;
        padding: 0.8rem 1.1rem;
        font-weight: 700;
        font-size: 0.88rem;
        box-shadow: var(--shadow);
    }

    #tocToggle svg {
        transition: transform 0.2s ease;
    }

    #tocToggle[aria-expanded="true"] svg {
        transform: rotate(180deg);
    }

    .toc-card {
        display: none;
    }

    .toc-card.is-open {
        display: block;
        margin-top: 0.6rem;
    }

    .share-card {
        display: none;
    }
}

/* === BACA JUGA (inline related) === */
.inline-related {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 2rem 0;
    padding: 1rem 1.2rem;
    background: var(--panel);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--teal);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
}

.inline-related:hover {
    border-color: var(--teal);
    background: var(--panel-2);
    transform: translateX(2px);
}

.related-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--teal-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-icon img {
    width: 20px;
    height: 20px;
    filter: invert(56%) sepia(23%) saturate(638%) hue-rotate(122deg) brightness(90%);
}

.related-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--teal);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.related-title {
    display: block;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--cream);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .inline-related {
        padding: 0.9rem 1rem;
        gap: 0.7rem;
    }

    .related-title {
        font-size: 0.9rem;
    }
}

/* === CALLOUT === */
.callout-info,
.callout-warning {
    margin: 2rem 0;
    padding: 1.5rem 1.8rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid;
    background: var(--panel);
}

.callout-info {
    border-left-color: var(--blue);
}

.callout-info strong {
    color: var(--blue);
}

.callout-warning {
    border-left-color: var(--yellow);
}

.callout-warning strong {
    color: var(--yellow);
}

.callout-info p,
.callout-warning p {
    margin-bottom: 0.8rem;
}

.callout-info p:last-child,
.callout-warning p:last-child {
    margin-bottom: 0;
}

/* === TABLE === */
/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.comparison-table thead {
    background: var(--panel-2);
}

.comparison-table th {
    padding: 1rem 1.2rem;
    text-align: left;
    color: var(--cream);
    font-weight: 700;
    border: 1px solid var(--rule);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table td {
    padding: 1.2rem;
    color: var(--cream-dim);
    border: 1px solid var(--rule);
    line-height: 1.7;
}

.comparison-table tbody tr:nth-child(odd) {
    background: rgba(95, 184, 168, 0.05);
}

.comparison-table tbody tr:hover {
    background: rgba(95, 184, 168, 0.1);
}

/* === FOOTER (BLOG) === */
footer .footer-brand {
  max-width: none;
  margin: 0;
  padding: 0;
}

footer .footer-links {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 28px;
  align-items: start;
}

footer .footer-col {
  min-width: 0;
}

footer .footer-col h5 {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cream);
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}

footer .footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

footer .footer-col ul li {
  margin: 0;
}

footer .footer-col ul a {
  color: var(--cream-dim);
  font-size: 0.87rem;
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.12s ease;
}

footer .footer-col ul a:hover {
  color: var(--teal);
}

footer .footer-bottom {
  border-top: 1px solid var(--rule);
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

footer .footer-bottom p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cream-dim);
  margin: 0;
}

@media (max-width: 768px) {
footer .footer-links {
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
  padding: 40px 24px 28px;
}

footer .footer-col ul {
  align-items: left;
}

footer .footer-bottom {
  padding: 18px 20px;
  }
}

/* ==========================
   BLOG CARD
========================== */

.blog-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:28px;
}

.post-card{
    display:flex;
    flex-direction:column;
    overflow:hidden;
    text-decoration:none;
    color:inherit;

    background:var(--panel);
    border:1px solid var(--rule);
    border-radius:22px;

    box-shadow:var(--shadow-sm);

    transition:
        transform .35s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.post-card:hover{
    transform:translateY(-8px);
    border-color:var(--teal);
    box-shadow:var(--shadow);
}

/* gambar */

.post-card-media{
    position:relative;
    aspect-ratio:16/10;
    overflow:hidden;
    background:var(--panel-2);
}

.post-card-media img{
    width:100%;
    height:100%;
    object-fit:cover;

    transition:transform .5s ease;
}

.post-card:hover .post-card-media img{
    transform:scale(1.08);
}

/* badge */

.post-card-tag{

    position:absolute;

    top:14px;
    left:14px;

    display:inline-flex;

    padding:.45rem .8rem;

    border-radius:999px;

    background:rgba(0,0,0,.55);

    backdrop-filter:blur(8px);

    color:#fff;

    font-size:.72rem;

    font-weight:700;

    letter-spacing:.04em;
}

/* isi */

.post-card-body{

    display:flex;

    flex-direction:column;

    flex:1;

    padding:1.4rem;
}

.post-card-meta{

    display:flex;

    gap:.5rem;

    align-items:center;

    font-size:.78rem;

    color:var(--cream-dim);

    font-family:var(--font-mono);

    margin-bottom:.9rem;
}

.post-card-meta .dot{
    opacity:.45;
}

.post-card-title{

    font-size:1.25rem;

    line-height:1.35;

    color:var(--cream);

    margin:0 0 .7rem;

    transition:color .25s;
}

.post-card:hover .post-card-title{
    color:var(--teal);
}

.post-card-excerpt{

    flex:1;

    color:var(--cream-dim);

    line-height:1.75;

    margin:0;
}

/* mobile */

@media(max-width:768px){

.blog-grid{

grid-template-columns:1fr;

gap:22px;

}

.post-card-body{

padding:1.2rem;

}

}

/* === ACADEMY SECTION === */
/* === PAGE: BLOG HOME === */
/* === KATEGORI === */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 16px;
}
.lang-card {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.lang-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: 0.3s;
    border-radius: 12px;
}
.lang-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.lang-card:hover::before {
    opacity: 1;
}

.lang-card.html::before {
    background: linear-gradient(135deg, rgba(226, 104, 92, 0.08), transparent);
}
.lang-card.html {
    border-color: rgba(226, 104, 92, 0.2);
}
.lang-card.html:hover {
    border-color: rgba(226, 104, 92, 0.5);
}

.lang-card.css::before {
    background: linear-gradient(135deg, rgba(111, 168, 216, 0.08), transparent);
}
.lang-card.css {
    border-color: rgba(111, 168, 216, 0.2);
}
.lang-card.css:hover {
    border-color: rgba(111, 168, 216, 0.5);
}

.lang-card.js::before {
    background: linear-gradient(135deg, rgba(227, 179, 65, 0.08), transparent);
}
.lang-card.js {
    border-color: rgba(227, 179, 65, 0.2);
}
.lang-card.js:hover {
    border-color: rgba(227, 179, 65, 0.5);
}

.lang-card.python::before {
    background: linear-gradient(135deg, rgba(95, 184, 168, 0.08), transparent);
}
.lang-card.python {
    border-color: rgba(95, 184, 168, 0.2);
}
.lang-card.python:hover {
    border-color: rgba(95, 184, 168, 0.5);
}

.lang-card.kotlin::before {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), transparent);
}
.lang-card.kotlin {
    border-color: rgba(167, 139, 250, 0.2);
}
.lang-card.kotlin:hover {
    border-color: rgba(167, 139, 250, 0.5);
}

.lang-card.webdev::before {
    background: linear-gradient(135deg, rgba(95, 184, 168, 0.08), transparent);
}
.lang-card.webdev {
    border-color: rgba(95, 184, 168, 0.15);
}

.lang-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.lang-icon.ic-html {
    background: rgba(226, 104, 92, 0.12);
}
.lang-icon.ic-css {
    background: rgba(111, 168, 216, 0.12);
}
.lang-icon.ic-js {
    background: rgba(227, 179, 65, 0.12);
}
.lang-icon.ic-python {
    background: rgba(95, 184, 168, 0.12);
}
.lang-icon.ic-kotlin {
    background: rgba(167, 139, 250, 0.12);
}
.lang-icon.ic-web {
    background: rgba(95, 184, 168, 0.08);
}

.lang-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--cream);
}
.lang-count {
    font-family: "JetBrains Mono", monospace;
    font-size: 11.5px;
    color: var(--cream-dim);
}
.lang-arrow {
    font-size: 13px;
    color: var(--cream-dim);
    margin-top: auto;
    transition: 0.15s;
}
.lang-card:hover .lang-arrow {
    color: var(--teal);
    transform: translateX(4px);
}

/* divider */
hr.divider {
    border: none;
    height: 1px;
    background: var(--rule);
    margin: 56px 0;
}