:root{
    --bg:#0B0E0F;
    --panel:#13171A;
    --panel-2:#171C1F;
    --hairline:#22282C;
    --hairline-soft:#1A1F22;
    --green:#5FE6A6;
    --green-dim:#3FA77D;
    --amber:#F5A623;
    --text:#E8ECEE;
    --muted:#7C8790;
    --muted-2:#525B61;
    --mono:'JetBrains Mono', monospace;
    --sans:'Inter', sans-serif;
  }

  *{margin:0;padding:0;box-sizing:border-box;}

  html{scroll-behavior:smooth;}

  body{
    background:var(--bg);
    color:var(--text);
    font-family:var(--sans);
    overflow-x:hidden;
    -webkit-font-smoothing:antialiased;
  }

  @media (prefers-reduced-motion: reduce){
    *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important;}
  }

  a{color:inherit; text-decoration:none;}

  ::selection{background:var(--green); color:#0B0E0F;}

  :focus-visible{
    outline:2px solid var(--green);
    outline-offset:3px;
    border-radius:3px;
  }

  /* ---------- background texture ---------- */
  .grid-bg{
    position:fixed;
    inset:0;
    background-image:
      linear-gradient(var(--hairline-soft) 1px, transparent 1px),
      linear-gradient(90deg, var(--hairline-soft) 1px, transparent 1px);
    background-size:48px 48px;
    mask-image:radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 70%);
    opacity:0.5;
    z-index:0;
    pointer-events:none;
  }

  /* ---------- nav ---------- */
  .nav{
    position:sticky;
    top:0;
    z-index:50;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:20px 48px;
    background:rgba(11,14,15,0.85);
    backdrop-filter:blur(10px);
    border-bottom:1px solid var(--hairline);
  }

  .nav-logo{
    font-family:var(--mono);
    font-size:15px;
    font-weight:700;
    letter-spacing:-0.02em;
    display:flex;
    align-items:center;
    gap:10px;
  }

  .nav-logo .dot{
    width:8px;height:8px;border-radius:50%;
    background:var(--green);
    box-shadow:0 0 8px var(--green);
    animation:pulse-dot 2.4s ease-in-out infinite;
  }

  @keyframes pulse-dot{
    0%,100%{opacity:1;}
    50%{opacity:0.4;}
  }

  .nav-links{
    display:flex;
    gap:36px;
    font-family:var(--mono);
    font-size:13px;
    color:var(--muted);
  }

  .nav-links a:hover{color:var(--green);}

  .nav-links span{color:var(--muted-2); margin-right:6px;}

  @media (max-width:720px){
    .nav-links{display:none;}
    .nav{padding:18px 24px;}
  }

  /* ---------- hero ---------- */
  .hero{
    position:relative;
    z-index:1;
    min-height:88vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:0 48px;
  }

  @media (max-width:720px){
    .hero{padding:0 24px; min-height:auto; padding-top:64px; padding-bottom:48px;}
  }

  .terminal-card{
    background:var(--panel);
    border:1px solid var(--hairline);
    border-radius:10px;
    overflow:hidden;
    box-shadow:0 0 0 1px rgba(95,230,166,0.04), 0 30px 80px -20px rgba(0,0,0,0.6);
  }

  .terminal-bar{
    display:flex;
    align-items:center;
    gap:8px;
    padding:12px 16px;
    border-bottom:1px solid var(--hairline);
    background:var(--panel-2);
  }

  .terminal-bar .tdot{width:10px;height:10px;border-radius:50%;}
  .tdot.r{background:#4a4f52;}
  .tdot.y{background:#4a4f52;}
  .tdot.g{background:#4a4f52;}

  .terminal-bar .path{
    margin-left:10px;
    font-family:var(--mono);
    font-size:12px;
    color:var(--muted-2);
  }

  .terminal-body{
    padding:36px 40px 44px;
    font-family:var(--mono);
    max-width:760px;
  }

  @media (max-width:720px){
    .terminal-body{padding:24px 20px 32px;}
  }

  .boot-line{
    font-size:14px;
    color:var(--muted);
    line-height:1.9;
    opacity:0;
    animation:reveal 0.4s ease forwards;
  }

  .boot-line .ok{color:var(--green);}
  .boot-line .num{color:var(--text);}

  .boot-line.l1{animation-delay:0.1s;}
  .boot-line.l2{animation-delay:0.5s;}
  .boot-line.l3{animation-delay:0.9s;}
  .boot-line.l4{animation-delay:1.3s;}

  @keyframes reveal{
    from{opacity:0; transform:translateY(4px);}
    to{opacity:1; transform:translateY(0);}
  }

  .headline{
    font-size:clamp(34px, 5.4vw, 64px);
    font-weight:800;
    letter-spacing:-0.03em;
    line-height:1.08;
    margin:22px 0 18px;
    opacity:0;
    animation:reveal 0.5s ease forwards;
    animation-delay:1.7s;
  }

  .headline .accent{color:var(--green);}

  .sub{
    font-family:var(--sans);
    font-size:17px;
    color:var(--muted);
    max-width:560px;
    line-height:1.65;
    margin-bottom:30px;
    opacity:0;
    animation:reveal 0.5s ease forwards;
    animation-delay:2.05s;
  }

  .cursor-line{
    display:flex;
    align-items:center;
    gap:10px;
    opacity:0;
    animation:reveal 0.5s ease forwards;
    animation-delay:2.35s;
  }

  .cursor-line .prompt{color:var(--green); font-family:var(--mono); font-size:14px;}
  .cursor-line .cmd{font-family:var(--mono); font-size:14px; color:var(--text);}

  .blink{
    display:inline-block;
    width:8px;height:16px;
    background:var(--green);
    margin-left:2px;
    animation:blink 1s steps(2) infinite;
    vertical-align:-3px;
  }

  @keyframes blink{
    0%,49%{opacity:1;}
    50%,100%{opacity:0;}
  }

  .cta-row{
    margin-top:32px;
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    opacity:0;
    animation:reveal 0.5s ease forwards;
    animation-delay:2.6s;
  }

  .btn{
    font-family:var(--mono);
    font-size:14px;
    font-weight:600;
    padding:14px 26px;
    border-radius:7px;
    cursor:pointer;
    border:1px solid transparent;
    transition:transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    display:inline-flex;
    align-items:center;
    gap:8px;
  }

  .btn-primary{
    background:var(--green);
    color:#06120D;
  }

  .btn-primary:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 24px -6px rgba(95,230,166,0.45);
  }

  .btn-ghost{
    background:transparent;
    border-color:var(--hairline);
    color:var(--text);
  }

  .btn-ghost:hover{
    border-color:var(--muted);
    transform:translateY(-2px);
  }

  /* ---------- status strip ---------- */
  .status-strip{
    position:relative;
    z-index:1;
    border-top:1px solid var(--hairline);
    border-bottom:1px solid var(--hairline);
    background:var(--panel);
    display:grid;
    grid-template-columns:repeat(4, 1fr);
  }

  @media (max-width:880px){
    .status-strip{grid-template-columns:repeat(2, 1fr);}
  }

  .status-item{
    padding:26px 32px;
    border-right:1px solid var(--hairline);
  }

  .status-item:last-child{border-right:none;}

  @media (max-width:880px){
    .status-item:nth-child(2){border-right:none;}
    .status-item{border-bottom:1px solid var(--hairline);}
    .status-item:nth-last-child(-n+2){border-bottom:none;}
  }

  .status-label{
    font-family:var(--mono);
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:0.08em;
    color:var(--muted-2);
    margin-bottom:8px;
    display:flex;
    align-items:center;
    gap:6px;
  }

  .status-label .led{
    width:6px;height:6px;border-radius:50%;
    background:var(--green);
    box-shadow:0 0 6px var(--green);
  }

  .status-value{
    font-family:var(--mono);
    font-size:22px;
    font-weight:700;
    color:var(--text);
  }

  .status-value .unit{
    font-size:13px;
    color:var(--muted);
    font-weight:500;
    margin-left:4px;
  }

  /* ---------- section shared ---------- */
  .section{
    position:relative;
    z-index:1;
    padding:96px 48px;
    max-width:1180px;
    margin:0 auto;
  }

  @media (max-width:720px){
    .section{padding:64px 24px;}
  }

  .eyebrow{
    font-family:var(--mono);
    font-size:12px;
    color:var(--green);
    letter-spacing:0.1em;
    text-transform:uppercase;
    margin-bottom:14px;
    display:flex;
    align-items:center;
    gap:10px;
  }

  .eyebrow::before{
    content:'';
    width:18px;height:1px;
    background:var(--green);
  }

  .section-title{
    font-size:clamp(26px, 3.6vw, 38px);
    font-weight:800;
    letter-spacing:-0.02em;
    margin-bottom:14px;
    max-width:640px;
  }

  .section-desc{
    color:var(--muted);
    font-size:16px;
    max-width:560px;
    line-height:1.7;
    margin-bottom:52px;
  }

  /* ---------- post cards ---------- */
  .post-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:1px;
    background:var(--hairline);
    border:1px solid var(--hairline);
    border-radius:12px;
    overflow:hidden;
  }

  @media (max-width:920px){
    .post-grid{grid-template-columns:repeat(2, 1fr);}
  }

  @media (max-width:640px){
    .post-grid{grid-template-columns:1fr;}
  }

  .post-card{
    display:block;
    background:var(--panel);
    padding:30px 28px;
    transition:background 0.2s ease;
    position:relative;
    cursor:pointer;
  }

  .post-card:hover{
    background:var(--panel-2);
  }

  .post-card:hover .post-arrow{
    transform:translate(3px,-3px);
    color:var(--green);
  }

  .post-tag{
    font-family:var(--mono);
    font-size:11px;
    color:var(--amber);
    letter-spacing:0.05em;
    margin-bottom:16px;
    display:block;
  }

  .post-title{
    font-size:19px;
    font-weight:700;
    line-height:1.35;
    margin-bottom:12px;
    letter-spacing:-0.01em;
  }

  .post-excerpt{
    font-size:14px;
    color:var(--muted);
    line-height:1.6;
    margin-bottom:22px;
  }

  .post-meta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-family:var(--mono);
    font-size:12px;
    color:var(--muted-2);
  }

  .post-arrow{
    transition:transform 0.2s ease, color 0.2s ease;
    color:var(--muted);
    font-size:16px;
  }

  /* ---------- architecture footer note ---------- */
  .arch-note{
    display:flex;
    align-items:flex-start;
    gap:14px;
    background:var(--panel);
    border:1px solid var(--hairline);
    border-radius:10px;
    padding:22px 24px;
    margin-top:48px;
  }

  .arch-note .icon{
    font-family:var(--mono);
    color:var(--green);
    font-size:15px;
    margin-top:1px;
  }

  .arch-note p{
    font-size:13.5px;
    color:var(--muted);
    line-height:1.65;
    font-family:var(--mono);
  }

  .arch-note code{
    color:var(--text);
    background:var(--panel-2);
    padding:1px 6px;
    border-radius:4px;
    font-size:12.5px;
  }

  /* ---------- footer ---------- */
  .footer{
    position:relative;
    z-index:1;
    border-top:1px solid var(--hairline);
    padding:36px 48px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-family:var(--mono);
    font-size:12px;
    color:var(--muted-2);
  }

  @media (max-width:720px){
    .footer{flex-direction:column; gap:10px; padding:28px 24px; text-align:center;}
  }

  .footer .footer-status{
    display:flex;
    align-items:center;
    gap:6px;
  }


  /* ==========================================================
     BLOGS LISTING PAGE + POST DETAIL PAGES
     ========================================================== */

  /* ---------- page header (used on blogs.html & post pages) ---------- */
  .page-header{
    position:relative;
    z-index:1;
    padding:64px 48px 40px;
    border-bottom:1px solid var(--hairline);
  }

  @media (max-width:720px){
    .page-header{padding:48px 24px 32px;}
  }

  .breadcrumb{
    font-family:var(--mono);
    font-size:12.5px;
    color:var(--muted-2);
    margin-bottom:24px;
    display:flex;
    align-items:center;
    gap:8px;
  }

  .breadcrumb a{color:var(--muted); transition:color 0.15s ease;}
  .breadcrumb a:hover{color:var(--green);}
  .breadcrumb .sep{color:var(--muted-2);}
  .breadcrumb .current{color:var(--text);}

  .page-title{
    font-size:clamp(30px, 4.6vw, 48px);
    font-weight:800;
    letter-spacing:-0.03em;
    line-height:1.1;
    margin-bottom:14px;
  }

  .page-subtitle{
    color:var(--muted);
    font-size:16px;
    max-width:560px;
    line-height:1.65;
  }

  /* ---------- filter pills (blogs.html) ---------- */
  .filter-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:32px;
  }

  .filter-pill{
    font-family:var(--mono);
    font-size:12.5px;
    color:var(--muted);
    border:1px solid var(--hairline);
    background:var(--panel);
    padding:8px 16px;
    border-radius:20px;
    cursor:pointer;
    transition:border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  }

  .filter-pill:hover{
    border-color:var(--muted);
    color:var(--text);
  }

  .filter-pill.active{
    border-color:var(--green);
    color:var(--green);
    background:rgba(95,230,166,0.06);
  }

  /* ---------- blog listing grid ---------- */
  .blog-list-wrap{
    position:relative;
    z-index:1;
    padding:56px 48px 96px;
  }

  @media (max-width:720px){
    .blog-list-wrap{padding:40px 24px 72px;}
  }

  .blog-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:1px;
    background:var(--hairline);
    border:1px solid var(--hairline);
    border-radius:12px;
    overflow:hidden;
  }

  @media (max-width:980px){
    .blog-grid{grid-template-columns:repeat(2, 1fr);}
  }

  @media (max-width:640px){
    .blog-grid{grid-template-columns:1fr;}
  }

  .blog-grid .post-card{
    padding:32px 30px;
  }

  .blog-grid .post-excerpt{
    margin-bottom:26px;
  }

  /* ---------- POST DETAIL PAGE ---------- */
  .post-hero{
    position:relative;
    z-index:1;
    padding:56px 48px 0;
    max-width:760px;
    margin:0 auto;
  }

  @media (max-width:720px){
    .post-hero{padding:40px 24px 0;}
  }

  .post-tag-row{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:20px;
  }

  .post-tag-row .post-tag{margin-bottom:0;}

  .post-tag-row .read-time{
    font-family:var(--mono);
    font-size:12.5px;
    color:var(--muted-2);
  }

  .post-hero h1{
    font-size:clamp(28px, 4.4vw, 44px);
    font-weight:800;
    letter-spacing:-0.03em;
    line-height:1.16;
    margin-bottom:20px;
  }

  .post-dek{
    font-size:17px;
    color:var(--muted);
    line-height:1.7;
    margin-bottom:36px;
  }

  .post-author-row{
    display:flex;
    align-items:center;
    gap:12px;
    padding:20px 0;
    border-top:1px solid var(--hairline);
    border-bottom:1px solid var(--hairline);
    margin-bottom:44px;
    font-family:var(--mono);
    font-size:13px;
    color:var(--muted-2);
  }

  .post-author-row .avatar{
    width:32px;height:32px;
    border-radius:50%;
    background:linear-gradient(135deg, var(--green), var(--green-dim));
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    color:#06120D;
    font-size:13px;
  }

  .post-author-row strong{color:var(--text); font-weight:600;}

  /* ---------- article body / content container ---------- */
  .post-body{
    position:relative;
    z-index:1;
    max-width:760px;
    margin:0 auto;
    padding:0 48px 40px;
  }

  @media (max-width:720px){
    .post-body{padding:0 24px 32px;}
  }

  .post-body h2{
    font-size:24px;
    font-weight:700;
    letter-spacing:-0.02em;
    margin:40px 0 16px;
  }

  .post-body h3{
    font-size:18px;
    font-weight:700;
    margin:28px 0 12px;
    color:var(--text);
  }

  .post-body p{
    font-size:16px;
    line-height:1.8;
    color:#C9CFD2;
    margin-bottom:18px;
  }

  .post-body ul, .post-body ol{
    margin:0 0 20px 0;
    padding-left:22px;
  }

  .post-body li{
    font-size:16px;
    line-height:1.8;
    color:#C9CFD2;
    margin-bottom:8px;
  }

  .post-body code{
    font-family:var(--mono);
    background:var(--panel-2);
    color:var(--green);
    padding:2px 7px;
    border-radius:4px;
    font-size:14px;
  }

  .post-body pre{
    background:var(--panel);
    border:1px solid var(--hairline);
    border-radius:8px;
    padding:18px 20px;
    overflow-x:auto;
    margin:20px 0 24px;
  }

  .post-body pre code{
    background:none;
    color:var(--text);
    padding:0;
    font-size:13.5px;
    line-height:1.7;
  }

  .post-body blockquote{
    border-left:3px solid var(--green);
    padding:4px 0 4px 20px;
    margin:24px 0;
    color:var(--muted);
    font-style:normal;
    font-size:15.5px;
  }

  /* ---------- preview fade + gate ---------- */
  .preview-wrap{
    position:relative;
  }

  .preview-fade{
    position:relative;
    max-height:280px;
    overflow:hidden;
  }

  .preview-fade::after{
    content:'';
    position:absolute;
    bottom:0; left:0; right:0;
    height:160px;
    background:linear-gradient(to bottom, transparent, var(--bg));
    pointer-events:none;
  }

  .gate-card{
    position:relative;
    z-index:2;
    margin:8px 0 48px;
    background:var(--panel);
    border:1px solid var(--hairline);
    border-radius:14px;
    padding:40px 36px;
    text-align:center;
  }

  @media (max-width:720px){
    .gate-card{padding:32px 22px;}
  }

  .gate-icon{
    width:46px;height:46px;
    border-radius:50%;
    background:rgba(95,230,166,0.08);
    border:1px solid rgba(95,230,166,0.25);
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto 20px;
    font-family:var(--mono);
    color:var(--green);
    font-size:18px;
  }

  .gate-card h3{
    font-size:21px;
    font-weight:700;
    margin-bottom:10px;
    letter-spacing:-0.01em;
  }

  .gate-card p{
    color:var(--muted);
    font-size:14.5px;
    line-height:1.65;
    max-width:420px;
    margin:0 auto 26px;
  }

  .gate-form{
    display:flex;
    gap:10px;
    max-width:420px;
    margin:0 auto;
    flex-wrap:wrap;
    justify-content:center;
  }

  .gate-form input[type="email"]{
    flex:1;
    min-width:220px;
    background:var(--bg);
    border:1px solid var(--hairline);
    border-radius:7px;
    padding:13px 16px;
    color:var(--text);
    font-family:var(--sans);
    font-size:14.5px;
    transition:border-color 0.15s ease;
  }

  .gate-form input[type="email"]:focus{
    outline:none;
    border-color:var(--green);
  }

  .gate-form input[type="email"]::placeholder{
    color:var(--muted-2);
  }

  .gate-form button{
    font-family:var(--mono);
    font-size:14px;
    font-weight:600;
    padding:13px 22px;
    border-radius:7px;
    border:none;
    background:var(--green);
    color:#06120D;
    cursor:pointer;
    transition:transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    white-space:nowrap;
  }

  .gate-form button:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 22px -6px rgba(95,230,166,0.45);
  }

  .gate-form button:disabled{
    opacity:0.6;
    cursor:not-allowed;
    transform:none;
    box-shadow:none;
  }

  .gate-error{
    font-family:var(--mono);
    font-size:12.5px;
    color:var(--amber);
    margin-top:12px;
    min-height:16px;
  }

  .gate-note{
    font-family:var(--mono);
    font-size:11.5px;
    color:var(--muted-2);
    margin-top:18px;
  }

  /* ---------- unlocked full content reveal ---------- */
  .full-content{
    display:none;
  }

  .full-content.revealed{
    display:block;
    animation:contentReveal 0.6s ease forwards;
  }

  @keyframes contentReveal{
    from{opacity:0; transform:translateY(10px);}
    to{opacity:1; transform:translateY(0);}
  }

  .unlock-banner{
    display:none;
    align-items:center;
    gap:10px;
    font-family:var(--mono);
    font-size:13px;
    color:var(--green);
    background:rgba(95,230,166,0.08);
    border:1px solid rgba(95,230,166,0.25);
    border-radius:8px;
    padding:12px 18px;
    margin-bottom:32px;
  }

  .unlock-banner.show{
    display:flex;
    animation:contentReveal 0.5s ease forwards;
  }

  .unlock-banner .led{
    width:7px;height:7px;border-radius:50%;
    background:var(--green);
    box-shadow:0 0 6px var(--green);
  }

  /* ---------- related posts (post page footer) ---------- */
  .related-section{
    position:relative;
    z-index:1;
    max-width:760px;
    margin:0 auto;
    padding:0 48px 80px;
  }

  @media (max-width:720px){
    .related-section{padding:0 24px 64px;}
  }

  .related-label{
    font-family:var(--mono);
    font-size:12px;
    color:var(--muted-2);
    text-transform:uppercase;
    letter-spacing:0.08em;
    margin-bottom:18px;
    border-top:1px solid var(--hairline);
    padding-top:32px;
  }

  .related-links{
    display:flex;
    flex-direction:column;
    gap:1px;
    background:var(--hairline);
    border:1px solid var(--hairline);
    border-radius:10px;
    overflow:hidden;
  }

  .related-links a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:var(--panel);
    padding:18px 22px;
    font-size:14.5px;
    font-weight:600;
    transition:background 0.15s ease;
  }

  .related-links a:hover{
    background:var(--panel-2);
  }

  .related-links a:hover .post-arrow{
    color:var(--green);
    transform:translate(3px,-3px);
  }

  .related-links .related-tag{
    font-family:var(--mono);
    font-size:11px;
    color:var(--amber);
    margin-right:14px;
    flex-shrink:0;
  }