/* Blog — concept: "the magazine". A masthead word, an issue with a lead
   story, then every article as a typographic card. No pictures. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h2 em { font-style: normal; color: var(--accent); }
.mh { padding: 132px 0 clamp(40px, 5vw, 72px); overflow: hidden; }
.mh-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-top: 1.5px solid var(--fg); border-bottom: 1px solid var(--line); font: 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.mh-bar span:nth-child(2) { color: var(--accent); }
.mh-word { margin: 6px 0 0 -.05em; font-weight: 500; font-size: min(26.5vw, 400px); line-height: .86; letter-spacing: -.065em; white-space: nowrap; background: linear-gradient(100deg, #1B1D22 0%, #1B1D22 38%, #B23A22 50%, #FF7A59 58%, #FFB08A 64%, #1B1D22 78%, #1B1D22 100%); background-size: 320% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: mhFlow 14s linear infinite; padding-bottom: .08em; user-select: none; }
@keyframes mhFlow { from { background-position: 100% 0; } to { background-position: -60% 0; } }
.issue { margin-top: clamp(20px, 3vw, 40px); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 20px; align-items: stretch; }
.lead { position: relative; isolation: isolate; overflow: hidden; padding: clamp(28px, 3.4vw, 48px); border-radius: 36px; background: var(--ember); color: #fff; display: flex; flex-direction: column; min-height: 420px; box-shadow: 0 50px 90px -50px rgba(178, 58, 34, .8); transition: transform .7s var(--ease-out), opacity .9s var(--ease); }
.lead::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(60% 70% at 100% 0%, rgba(232, 115, 79, .6), transparent 70%), radial-gradient(50% 60% at 0% 100%, rgba(59, 42, 74, .8), transparent 70%), radial-gradient(520px circle at var(--mx, 70%) var(--my, 30%), rgba(255, 122, 89, .22), transparent 65%); }
.lead:hover { transform: translateY(-6px); }
.lead-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .lead-top b { font: 500 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; color: #2A120A; background: linear-gradient(100deg, var(--o3), var(--o2)); }
.lead h2 { margin-top: auto; padding-top: 40px; font-weight: 400; font-size: clamp(32px, 4.2vw, 64px); line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.lead p { margin-top: 18px; max-width: 56ch; font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, .75); }
.lead-f { margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.go { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 15px; color: #fff; background: linear-gradient(100deg, #E8734F, #FF7A59, #FFA27C, #FF7A59, #E8734F); background-size: 300% 100%; animation: numFlow 7s linear infinite; box-shadow: 0 12px 30px -12px rgba(255, 122, 89, .9); } .go u { text-decoration: none; transition: transform .4s var(--ease-out); } .lead:hover .go u { transform: translateX(5px); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13.5px; color: var(--fg-3); } .meta span + span::before { content: "·"; margin: 0 9px; } .lead .meta, .lead .lead-top i { color: rgba(255, 255, 255, .65); }
.post-t i, .lead-top i { font: 11px var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 7px; color: var(--fg-2); } .post-t i::before, .lead-top i::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); } .lead-top i::before { box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.idx { border-radius: 36px; background: var(--card); border: 1px solid var(--line); padding: 28px 30px 12px; display: flex; flex-direction: column; }
.idx-h { font: 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); padding-bottom: 14px; }
.idx ol { display: grid; flex: 1; } .idx li { border-top: 1px solid var(--line); display: grid; }
.idx a { display: grid; grid-template-columns: 30px 1fr 24px; gap: 12px; align-items: center; padding: 20px 0; transition: padding .5s var(--ease-out); } .idx a:hover { padding-left: 8px; }
.idx a > span { font: 12px var(--mono); color: var(--accent); align-self: start; padding-top: 4px; } .idx h3 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 8px; text-wrap: balance; } .idx a > u { text-decoration: none; color: var(--fg-3); transition: transform .4s var(--ease-out), color .3s; } .idx a:hover > u { transform: translateX(5px); color: var(--accent); }
/* archive */
.arc { padding-top: clamp(56px, 7vw, 100px); }
.arc-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; } .arc-head .h2 { margin-top: 16px; }
.find { display: flex; align-items: center; gap: 10px; height: 50px; width: min(340px, 100%); padding: 0 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); transition: border-color .3s, box-shadow .3s; } .find:focus-within { border-color: var(--o2); box-shadow: 0 0 0 4px rgba(255, 122, 89, .16); }
.find svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--fg-3); stroke-width: 1.6; stroke-linecap: round; } .find input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 16px var(--sans); color: var(--fg); }
.tags { position: sticky; top: 76px; z-index: 5; margin-top: 30px; display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; border-radius: 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.tags button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font: 500 14.5px var(--sans); color: var(--fg-2); cursor: pointer; white-space: nowrap; transition: background .25s, color .25s; }
.tags button i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); } .tags small { font: 11px var(--mono); color: var(--fg-3); } .tags button:hover { background: var(--bg-2); }
.tags button.on { background: var(--fg); color: #fff; } .tags button.on small { color: rgba(255, 255, 255, .6); }
.pgrid { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post { position: relative; isolation: isolate; overflow: hidden; min-height: 290px; padding: 26px 26px 24px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; animation: postIn .7s var(--ease-out) calc(var(--n) * 28ms) backwards; transition: transform .6s var(--ease-out), box-shadow .6s, border-color .3s; }
@keyframes postIn { from { opacity: 0; transform: translateY(22px); } }
.post::after { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 122, 89, .16), transparent 65%); opacity: 0; transition: opacity .5s; } .post:hover::after { opacity: 1; }
.post:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--o2); }
.post-t { display: flex; flex-wrap: wrap; gap: 6px 14px; } .post h3 { margin-top: 22px; font-size: 23px; font-weight: 500; letter-spacing: -.025em; line-height: 1.16; text-wrap: balance; transition: color .3s; } .post:hover h3 { color: var(--accent); }
.post p { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .post .meta { margin-top: auto; padding-top: 22px; }
.none { margin-top: 40px; text-align: center; color: var(--fg-3); font-size: 17px; }
.more { margin-top: 36px; height: 50px; padding: 0 26px; background: var(--fg); color: #fff; border: 0; } .more:hover { background: #000; transform: translateY(-2px); }
/* subscribe */
.sub { padding: clamp(64px, 8vw, 110px) 0; margin-bottom: 12px; }
.sub-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; } .sub .h2 { margin: 16px 0 18px; } .sub .lede { max-width: 40ch; }
.sub-row { display: flex; gap: 8px; padding: 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .07); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color .3s, box-shadow .3s; } .sub-row:focus-within { border-color: var(--o3); box-shadow: 0 0 0 5px rgba(255, 122, 89, .2); }
.sub-row input { flex: 1; min-width: 0; height: 50px; padding: 0 18px; border: 0; outline: 0; background: none; font: 17px var(--sans); color: #fff; } .sub-row input::placeholder { color: rgba(255, 255, 255, .45); } .sub-row .btn { height: 50px; padding: 0 24px; font-size: 16px; flex: none; }
.sub-msg { min-height: 1.5em; margin: 14px 0 0 22px; font-size: 14.5px; color: rgba(255, 255, 255, .6); } .sub-form.err .sub-row { border-color: var(--o2); } .sub-form.err .sub-msg { color: var(--o3); } .sub-form.ok .sub-msg { color: #8FDCAE; } .sub-form.ok .sub-row { border-color: #8FDCAE; }
@media (max-width: 1000px) { .issue, .sub-grid { grid-template-columns: 1fr; } .pgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .mh { padding-top: 112px; } .lead { border-radius: 26px; min-height: 0; } .idx { border-radius: 26px; padding: 22px 22px 8px; } .tags { position: static; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: auto; border-radius: 999px; } .mh-bar span:last-child { display: none; } .sub-row { flex-direction: column; border-radius: 28px; } .sub-row .btn { justify-content: center; } }
@media (max-width: 620px) { .pgrid { grid-template-columns: 1fr; } .post { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .mh-word, .go { animation: none; } }

/* Added in the Django port: tag colours by class (templates carry no colour
   values), with a neutral default for a tag that has no colour of its own. */
.lead-top i, .post-t i, .art-tags i, .tags button { --c: #7A7F88; }
i.tg-research, button.tg-research { --c: #6B4FD0; } i.tg-git, button.tg-git { --c: #F05133; } i.tg-mercurial, button.tg-mercurial { --c: #4C9BF0; }
i.tg-subversion, button.tg-subversion { --c: #7E9C2B; } i.tg-guides, button.tg-guides { --c: #B7791F; } i.tg-releases, button.tg-releases { --c: #B23A22; }
i.tg-company, button.tg-company { --c: #1B1D22; } i.tg-security, button.tg-security { --c: #2A6B45; } i.tg-ai, button.tg-ai { --c: #FF7A59; }
/* Every post is in the page; the archive hides the ones outside the filter or the first page. */
.post[hidden], .more[hidden] { display: none; }
.sub-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* The article's cover, between the headline and the body. */
.art-cover { display: block; width: 100%; max-width: 1100px; height: auto; margin: 0 auto clamp(28px, 4vw, 56px); border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); }
