/* SomeLab — shared site styles (window chrome, workspace, articles) */

:root{
  --bg:#efefef;
  --paper:#f4f4f4;
  --card:#ffffff;
  --ink:#14161a;
  --muted:#5c6572;
  --red:#e11d2e;
  --cyan:#00d4e6;
  --stroke:#14161a;
  --stroke-soft:rgba(20,22,26,.18);
  --win-head:#14161a;
  --win-body:#f0f1f2;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(225,29,46,.07), transparent 60%),
    var(--bg);
  color:var(--ink);
  font-family:"Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  min-height:100vh;
  line-height:1.5;
}

a{color:inherit}

/* —— header —— */
.site-header{
  width:min(1080px, 100%);
  margin:0 auto;
  padding:28px 24px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  font-weight:700;
  font-size:26px;
  letter-spacing:-0.02em;
  line-height:1.1;
}
.mark{
  width:22px;
  height:22px;
  background:var(--red);
  border:2px solid var(--stroke);
  box-shadow:3px 3px 0 var(--stroke);
  flex:0 0 auto;
}
.brand .some{
  color:var(--red);
  position:relative;
  display:inline-block;
  animation:glitch-skew 3s infinite steps(1);
}
.brand .some::before,
.brand .some::after{
  content:attr(data-text);
  position:absolute;
  top:0; left:0;
  width:100%; height:100%;
  pointer-events:none;
  background:var(--bg);
}
.brand .some::before{
  color:var(--cyan);
  animation:glitch-a 2s infinite steps(1);
  z-index:1;
}
.brand .some::after{
  color:var(--ink);
  animation:glitch-b 2s infinite steps(1);
  z-index:2;
}
.brand .lab{ color:var(--ink); }

@keyframes glitch-a{
  0%   { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
  8%   { clip-path:inset(10% 0 75% 0); transform:translate(-3px,0); }
  14%  { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
  32%  { clip-path:inset(45% 0 40% 0); transform:translate(-2px,1px); }
  38%  { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
  62%  { clip-path:inset(70% 0 10% 0); transform:translate(-3px,-1px); }
  68%  { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
  88%  { clip-path:inset(25% 0 55% 0); transform:translate(-2px,0); }
  94%,100% { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
}
@keyframes glitch-b{
  0%   { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
  8%   { clip-path:inset(60% 0 25% 0); transform:translate(3px,1px); }
  14%  { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
  32%  { clip-path:inset(15% 0 70% 0); transform:translate(2px,-1px); }
  38%  { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
  62%  { clip-path:inset(35% 0 50% 0); transform:translate(3px,1px); }
  68%  { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
  88%  { clip-path:inset(75% 0 5% 0); transform:translate(2px,0); }
  94%,100% { clip-path:inset(0 0 100% 0); transform:translate(0,0); }
}
@keyframes glitch-skew{
  0%, 96%, 100% { transform:skewX(0deg); }
  97% { transform:skewX(-3deg); }
  98% { transform:skewX(2deg); }
  99% { transform:skewX(0deg); }
}
@media (prefers-reduced-motion: reduce){
  .brand .some,
  .brand .some::before,
  .brand .some::after{ animation:none; }
  .brand .some::before,
  .brand .some::after{ display:none; }
}

.nav-pill{
  display:inline-flex;
  align-items:center;
  gap:0;
  background:#fff;
  border:2px solid var(--stroke);
  border-radius:999px 10px 10px 999px;
  overflow:hidden;
  box-shadow:3px 3px 0 rgba(20,22,26,.12);
}
.nav-pill a{
  padding:10px 16px;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-decoration:none;
  border-right:1px solid var(--stroke-soft);
  color:var(--ink);
  transition:background .12s ease, color .12s ease;
}
.nav-pill a:last-child{ border-right:0; }
.nav-pill a:hover{
  background:var(--red);
  color:#fff;
}

/* —— hero —— */
.hero{
  width:min(920px, 100%);
  margin:12px auto 36px;
  padding:0 24px;
  text-align:center;
}
.hero-kicker{
  font-size:13px;
  color:var(--muted);
  letter-spacing:.04em;
  margin:0 0 14px;
}
.hero h1{
  margin:0 0 18px;
  font-size:clamp(28px, 5vw, 44px);
  line-height:1.15;
  letter-spacing:-0.03em;
  font-weight:700;
}
.hero-sub{
  margin:0 auto 22px;
  max-width:42ch;
  font-size:14px;
  color:var(--muted);
  line-height:1.7;
}
.hero-ctas{
  display:flex;
  flex-wrap:wrap;
  gap:18px 28px;
  justify-content:center;
  font-size:14px;
  font-weight:700;
}
.hero-ctas a{
  text-decoration:underline;
  text-underline-offset:4px;
  text-decoration-thickness:2px;
}
.hero-ctas a:hover{ color:var(--red); }

/* —— announcement windows —— */
.announce-stack{
  width:min(560px, 100%);
  margin:0 auto 40px;
  padding:0 24px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.win{
  background:var(--win-body);
  border:2px solid var(--stroke);
  box-shadow:4px 4px 0 rgba(20,22,26,.1);
  text-decoration:none;
  color:inherit;
  display:block;
  transition:transform .12s ease, box-shadow .12s ease;
}
.win:hover{
  transform:translate(-1px,-1px);
  box-shadow:6px 6px 0 rgba(20,22,26,.12);
}
.win-head{
  background:var(--win-head);
  color:#fff;
  padding:8px 12px;
  font-size:11px;
  letter-spacing:.1em;
  text-transform:uppercase;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.win-head .dots{
  display:flex;
  gap:5px;
}
.win-head .dots span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#fff;
  opacity:.35;
}
.win-head .dots span:first-child{ background:var(--red); opacity:1; }
.win-body{
  padding:16px 18px 18px;
  background:#fff;
  text-align:center;
}
.win-body .title{
  font-size:15px;
  font-weight:700;
  line-height:1.4;
  margin:0 0 8px;
}
.win-body .meta{
  font-size:11px;
  color:var(--muted);
  letter-spacing:.06em;
  text-transform:uppercase;
  margin:0 0 12px;
}
.win-btn{
  display:inline-block;
  margin-top:4px;
  padding:8px 14px;
  background:var(--ink);
  color:#fff;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  border:2px solid var(--stroke);
}
.win:hover .win-btn{ background:var(--red); }

/* —— workspace / posts —— */
.workspace{
  width:min(1080px, 100%);
  margin:0 auto 48px;
  padding:36px 24px 48px;
  position:relative;
  background:
    radial-gradient(circle, rgba(20,22,26,.35) 0.7px, transparent 0.8px) 0 0 / 14px 14px,
    #e8e8e8;
  border-top:2px solid var(--stroke);
  border-bottom:2px solid var(--stroke);
}
.workspace::before,
.workspace::after{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  border:2px solid var(--stroke);
  pointer-events:none;
}
.workspace::before{
  top:12px; left:12px;
  border-right:0; border-bottom:0;
}
.workspace::after{
  top:12px; right:12px;
  border-left:0; border-bottom:0;
}
.workspace-inner{
  position:relative;
}
.workspace-inner::before,
.workspace-inner::after{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  border:2px solid var(--stroke);
  pointer-events:none;
  bottom:0;
}
.workspace-inner::before{
  left:0;
  border-right:0; border-top:0;
}
.workspace-inner::after{
  right:0;
  border-left:0; border-top:0;
}

.section-label{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin:0 0 18px;
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--muted);
  background:#fff;
  border:2px solid var(--stroke);
  padding:6px 12px;
}
.section-label::before{
  content:"";
  width:8px;
  height:8px;
  background:var(--red);
  border:1px solid var(--stroke);
}

.posts{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  padding-bottom:8px;
}
@media (min-width:720px){
  .posts{ grid-template-columns:1fr 1fr; }
}

.post-win{
  background:#fff;
  border:2px solid var(--stroke);
  display:flex;
  flex-direction:column;
  min-height:200px;
  text-decoration:none;
  color:inherit;
  box-shadow:3px 3px 0 rgba(20,22,26,.08);
  transition:transform .12s ease, box-shadow .12s ease;
}
.post-win:hover{
  transform:translate(-1px,-1px);
  box-shadow:5px 5px 0 rgba(20,22,26,.12);
}
.post-win .win-head{
  font-size:10px;
}
.post-win .win-body{
  text-align:left;
  flex:1;
  display:flex;
  flex-direction:column;
  padding:14px 16px 16px;
}
.post-win .title{
  font-size:14px;
  font-weight:700;
  line-height:1.4;
  letter-spacing:-0.01em;
  margin:0 0 10px;
  min-height:2.8em;
}
.post-win .excerpt{
  font-size:12px;
  line-height:1.65;
  color:var(--muted);
  margin:0 0 14px;
  flex:1;
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.post-win .excerpt code{
  font-size:0.95em;
  color:var(--ink);
}
.post-win .foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  border-top:1px solid var(--stroke-soft);
  padding-top:10px;
  margin-top:auto;
}
.post-win .readmore{
  color:var(--ink);
  font-weight:700;
}
.post-win:hover .readmore{ color:var(--red); }

/* —— footer —— */
.site-footer{
  width:min(1080px, 100%);
  margin:0 auto;
  padding:24px 24px 48px;
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:12px;
  color:var(--muted);
  letter-spacing:.04em;
}
.footer-row{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:12px;
}
.footer-row .footer-center{ justify-self:center; text-align:center; }
.footer-row .footer-right{ justify-self:end; text-align:right; }
.footer-link{
  color:var(--muted);
  text-decoration:none;
  border-bottom:1px solid rgba(20,22,26,.18);
  padding-bottom:1px;
}
.footer-link:hover{ color:var(--red); border-bottom-color:var(--red); }
.footer-note{
  font-size:11px;
  font-style:italic;
  opacity:.8;
  margin:0;
}
.site-footer .copy .some{ color:var(--red); font-weight:700; }
.site-footer .copy .lab{ color:var(--ink); font-weight:700; }


/* —— article page —— */
.back-link{
  display:inline-flex;
  margin:0 0 18px;
  font-size:13px;
  color:var(--muted);
  text-decoration:none;
}
.back-link:hover{ color:var(--ink); }

.article-shell{
  width:min(920px, 100%);
  margin:0 auto 48px;
  padding:0 24px;
}
.article-win{
  background:#fff;
  border:2px solid var(--stroke);
  box-shadow:5px 5px 0 rgba(20,22,26,.1);
  overflow:hidden;
}
.article-win .win-head{
  font-size:11px;
}
.cover{
  display:block;
  width:100%;
  height:auto;
  border-bottom:2px solid var(--stroke);
  background:#efefef;
}
.article-body{
  padding:28px 30px 36px;
  font-family:"Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.article-body .kicker{
  display:inline-block;
  padding:3px 10px;
  border:2px solid var(--stroke);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--muted);
  background:var(--paper);
  margin-bottom:12px;
  font-family:inherit;
}
.article-body h1{
  margin:0 0 8px;
  font-size:22px;
  letter-spacing:-0.02em;
  line-height:1.25;
  font-weight:700;
  font-family:inherit;
}
.article-body .meta{
  color:var(--muted);
  font-size:13px;
  margin-bottom:20px;
  font-family:inherit;
}
.article-body p{
  font-size:14px;
  line-height:1.75;
  margin:10px 0;
  font-family:inherit;
}
.article-body a{
  color:var(--ink);
  text-decoration:none;
  border-bottom:1px solid rgba(20,22,26,.3);
}
.article-body a:hover{
  color:var(--red);
  border-bottom-color:var(--red);
}
.article-body code{
  font-family:inherit;
  font-size:0.95em;
}

@media (max-width:520px){
  .site-header{ padding:20px 16px 12px; }
  .brand{ font-size:22px; }
  .hero{ margin-bottom:28px; }
  .article-body{ padding:20px 18px 26px; }
  .footer-row{
    grid-template-columns:1fr;
    gap:6px;
  }
  .footer-row .footer-center,
  .footer-row .footer-right{ justify-self:start; text-align:left; }
}


/* —— article body components (preserved from live posts) —— */
:root{ --code:#f0f2f4; }

.article-body h2{
  margin:24px 0 10px;
  font-size:16px;
  font-weight:700;
  letter-spacing:-0.01em;
}
.article-body h2.lab-proof{ color:var(--red); }
.article-body h3{
  margin:18px 0 6px;
  font-size:14px;
  font-weight:700;
}
.article-body p, .article-body li{
  font-size:14px;
  line-height:1.75;
  color:var(--ink);
}
.article-body p{ margin:10px 0; }
.article-body ul{ margin:8px 0 10px 18px; padding:0; }
.article-body ol{ margin:8px 0 10px 22px; padding:0; }
.article-body li{ margin:6px 0; }
.article-body .muted{ color:var(--muted); }
.article-body a{
  color:var(--ink);
  text-decoration:none;
  border-bottom:1px solid rgba(20,22,26,.3);
  transition:color .12s ease, border-color .12s ease;
}
.article-body a:hover{
  color:var(--red);
  border-bottom-color:var(--red);
}
.article-body pre{
  margin:14px 0;
  background:var(--code);
  border:2px solid var(--stroke);
  border-radius:0;
  padding:14px 16px;
  overflow:auto;
  font-size:13px;
  line-height:1.6;
}
.article-body code{
  font-family:inherit;
  font-size:0.95em;
}
.article-body p code,
.article-body li code,
.article-body .muted code{
  background:var(--paper);
  border:1px solid var(--stroke-soft);
  padding:0 4px;
}
.article-body pre code{
  background:transparent;
  border:0;
  padding:0;
}
.article-body details{
  margin:14px 0;
  background:#fafbfc;
  border:2px solid var(--stroke);
  border-radius:0;
  padding:10px 12px;
}
.article-body summary{
  cursor:pointer;
  font-size:13px;
  font-weight:700;
  color:var(--ink);
  list-style:none;
  display:flex;
  align-items:center;
  gap:8px;
}
.article-body summary::before{
  content:"→";
  color:var(--red);
  font-weight:700;
}
.article-body details[open] summary::before{ content:"↓"; }
.article-body summary::-webkit-details-marker{ display:none; }
.article-body details[open] summary{ margin-bottom:10px; }
.article-body .callout{
  margin:16px 0;
  padding:14px 16px;
  border:2px solid var(--stroke);
  border-left:4px solid var(--red);
  border-radius:0;
  background:#fafbfc;
  font-size:13px;
  line-height:1.7;
}
.article-body .callout .muted{ color:var(--muted); font-size:13px; }
.article-body .sep{
  margin:22px 0;
  border:0;
  border-top:1px solid var(--stroke-soft);
}
.article-body .proof-shot{
  display:block;
  width:100%;
  height:auto;
  margin:14px 0;
  border:2px solid var(--stroke);
  border-radius:0;
  background:#111;
}
.article-body .log-block{
  max-height:420px;
  overflow:auto;
}
.article-body .commit-card{
  display:block;
  margin:18px 0 6px;
  padding:16px 18px;
  background:#fafbfc;
  border:2px solid var(--stroke);
  border-left:4px solid var(--red);
  border-radius:0;
  text-decoration:none !important;
  color:inherit !important;
  transition:transform .12s ease, box-shadow .12s ease;
}
.article-body .commit-card:hover{
  transform:translate(-1px,-1px);
  box-shadow:4px 4px 0 rgba(20,22,26,.1);
}
.article-body .commit-head{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:8px;
}
.article-body .commit-head .dot{
  width:6px;
  height:6px;
  border-radius:999px;
  background:var(--red);
  display:inline-block;
}
.article-body .commit-sha{
  font-size:11px;
  letter-spacing:.04em;
  text-transform:none;
  color:var(--ink);
  background:var(--code);
  border:1px solid var(--stroke-soft);
  padding:1px 6px;
}
.article-body .commit-msg{
  font-size:14px;
  line-height:1.5;
  font-weight:700;
}
.article-body .commit-meta{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.article-body .commit-meta .arrow{
  margin-left:auto;
  color:var(--ink);
  font-weight:700;
}
.article-body .commit-card:hover .commit-meta .arrow{ color:var(--red); }
.article-body .fix-headline{
  margin:8px 0 14px;
  padding:10px 14px;
  background:#fafbfc;
  border:2px solid var(--stroke);
  border-left:4px solid var(--red);
  font-size:13px;
  line-height:1.5;
}
.article-win .cover{
  border-radius:0;
}

/* —— OpenBSD ftpd extras —— */
.article-body .diagram{
  margin:16px 0 18px;
  padding:10px;
  background:var(--paper);
  border:2px solid var(--stroke);
  overflow:auto;
}
.article-body .diagram svg{
  display:block;
  width:100%;
  height:auto;
  font-family:inherit;
}
.article-body .ai-reasoning{
  margin:16px 0;
  padding:14px 16px 6px;
  background:#fafbfc;
  border:2px solid var(--stroke);
  border-left:4px solid var(--red);
  font-family:inherit;
}
.article-body .ai-label{
  display:inline-block;
  margin:0 0 10px;
  padding:3px 8px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  background:#fff;
  border:1px solid var(--stroke-soft);
  font-family:inherit;
}
.article-body .ai-reasoning p{
  font-family:inherit;
  font-size:13px;
  line-height:1.7;
  color:var(--ink);
}

/* —— timelines (Windows Terminal, Bouncy Castle, etc.) —— */
.article-body .timeline{
  margin:16px 0 20px;
  border:2px solid var(--stroke);
  background:#fff;
  font-family:inherit;
}
.article-body .tl-row{
  display:grid;
  grid-template-columns:minmax(148px, 180px) 1fr;
  gap:0;
  align-items:stretch;
  border-bottom:1px solid var(--stroke-soft);
}
.article-body .tl-row:last-child{ border-bottom:0; }
.article-body .tl-date,
.article-body .tl-text{
  font-family:inherit;
  font-size:14px;
  line-height:1.75;
  margin:0;
  padding:12px 14px;
}
.article-body .tl-date{
  color:var(--muted);
  font-weight:700;
  letter-spacing:-0.01em;
  border-right:1px solid var(--stroke-soft);
  background:var(--paper);
}
.article-body .tl-text{
  color:var(--ink);
  font-weight:400;
}
.article-body .tl-text strong{
  font-family:inherit;
  font-weight:700;
}
.article-body .tl-text code{
  font-family:inherit;
  font-size:0.95em;
}
@media (max-width:620px){
  .article-body .tl-row{
    grid-template-columns:1fr;
  }
  .article-body .tl-date{
    border-right:0;
    border-bottom:1px solid var(--stroke-soft);
    padding-bottom:8px;
  }
  .article-body .tl-text{
    padding-top:8px;
  }
}
