:root {
  color-scheme: dark;
  --bg: #09050f;
  --bg-soft: #130a20;
  --surface: rgba(27, 16, 43, .72);
  --surface-solid: #1a1028;
  --surface-hover: rgba(43, 24, 67, .88);
  --text: #f5efff;
  --muted: #ad9fba;
  --line: rgba(208, 165, 255, .16);
  --purple: #b95cff;
  --purple-bright: #d991ff;
  --pink: #ff5cce;
  --green: #6fffc1;
  --danger: #ff7595;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f5fc;
  --bg-soft: #eee6f7;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #fff;
  --surface-hover: rgba(250, 244, 255, .95);
  --text: #20152d;
  --muted: #71657d;
  --line: rgba(105, 49, 143, .16);
  --purple: #8f24dc;
  --purple-bright: #7a16c3;
  --pink: #d3249b;
  --green: #087e58;
  --danger: #c9204a;
  --shadow: 0 24px 70px rgba(64, 33, 87, .13);
}

* { box-sizing: border-box; }
::selection { color: #fff; background: color-mix(in srgb, var(--purple) 78%, var(--pink)); }
:root[data-theme="light"] ::selection { color: #fff; background: color-mix(in srgb, var(--purple) 82%, #5c168f); }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh; margin: 0; overflow-x: hidden;
  background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, sans-serif; line-height: 1.65;
  transition: background .25s ease, color .25s ease;
}
.grain { position: fixed; z-index: 50; inset: 0; opacity: .035; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .brand, .button, button { font-family: "Space Grotesk", system-ui, sans-serif; }
button, input, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
.ambient { position: fixed; z-index: -1; width: 42rem; height: 42rem; border-radius: 50%; filter: blur(110px); opacity: .14; pointer-events: none; }
.ambient-one { top: -20rem; right: -12rem; background: var(--purple); }
.ambient-two { bottom: -24rem; left: -15rem; background: var(--pink); }
.glass { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(20px); }

.header-wrap { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(24px); }
.site-header { width: min(1440px, 100%); min-height: 126px; margin: auto; padding: .75rem clamp(1.25rem, 4vw, 4rem); display: flex; align-items: center; gap: clamp(1.25rem, 4vw, 4rem); }
.brand { display: flex; align-items: center; gap: 1rem; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
.brand-copy { display: grid; }
.brand-copy small { margin-bottom: .35rem; color: var(--muted); font-family: "Inter", sans-serif; font-size: .65rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.brand-copy strong { font-size: clamp(1.35rem, 2vw, 1.85rem); line-height: .95; }
.brand b { color: var(--purple-bright); }
.brand-mark { display: grid; place-items: center; width: 104px; height: 104px; overflow: hidden; flex: 0 0 104px; border: 2px solid rgba(111,255,193,.55); border-radius: 50%; background: #03141a; box-shadow: 0 0 0 7px color-mix(in srgb, var(--purple) 9%, transparent), 0 0 42px rgba(42, 220, 188, .26); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.header-side { margin-left: auto; display: grid; justify-items: end; gap: .65rem; }
.header-signal { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.header-signal i { width: 28px; height: 1px; background: var(--green); box-shadow: 0 0 8px var(--green); }
.site-header nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.6rem); }
.site-header nav a { position: relative; color: var(--text); font-family: "Space Grotesk", sans-serif; font-size: 1rem; font-weight: 600; transition: color .2s; }
.site-header nav a span { margin-right: .35rem; color: var(--purple-bright); font-family: "Inter", sans-serif; font-size: .52rem; font-weight: 700; vertical-align: top; }
.site-header nav a::after { content: ""; position: absolute; right: 0; bottom: -.45rem; left: 0; height: 2px; background: linear-gradient(90deg, var(--purple), var(--pink)); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.site-header nav a:hover { color: var(--purple-bright); }
.site-header nav a:hover::after { transform: scaleX(1); }
.header-controls { display: flex; gap: .75rem; }
.header-toggle { width: 50px; height: 50px; flex: 0 0 50px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 0; cursor: pointer; color: var(--text); background: var(--surface-hover); box-shadow: 6px 6px 0 color-mix(in srgb, var(--purple) 20%, transparent); transition: transform .2s, box-shadow .2s, border-color .2s; }
.header-toggle:hover { border-color: color-mix(in srgb, var(--purple) 55%, var(--line)); transform: translate(-2px, -2px); box-shadow: 9px 9px 0 color-mix(in srgb, var(--purple) 24%, transparent); }
.theme-icon::before { content: "☀"; font-size: 1.1rem; }
[data-theme="light"] .theme-icon::before { content: "☾"; }
.audio-player { display: contents; }
.audio-toggle[aria-pressed="true"] { border-color: var(--purple); color: var(--purple-bright); }
.audio-icon { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor; transform: translateX(1px); }
.is-playing .audio-icon { width: 10px; height: 12px; border: 0; border-inline: 3px solid currentColor; transform: none; }

.page-shell { width: min(1180px, calc(100% - 2.5rem)); min-height: calc(100vh - 190px); margin: 0 auto; padding: 2.5rem 0 7rem; }
.site-footer { width: min(1180px, calc(100% - 2.5rem)); margin: auto; padding: 2rem 0 3rem; border-top: 1px solid var(--line); display: flex; gap: 2rem; color: var(--muted); font-size: .82rem; }
.site-footer span:nth-child(2) { margin-left: auto; }
.site-footer a:hover { color: var(--purple-bright); }
.signal-strip { width: 100%; overflow: hidden; border-block: 1px solid var(--line); background: var(--purple); color: white; transform: rotate(-1deg) scale(1.02); }
.signal-strip div { width: max-content; padding: .62rem 0; display: flex; gap: 2rem; align-items: center; animation: signal 24s linear infinite; font-family: "Space Grotesk", sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.signal-strip i { color: #ffb7e9; font-style: normal; font-size: .55rem; }
@keyframes signal { to { transform: translateX(-50%); } }

.hero { max-width: 760px; margin: .5rem auto 2.75rem; text-align: center; }
.hero-kicker { display: flex; justify-content: center; align-items: center; gap: 1rem; }
.live-mark { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; }
.live-mark::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.eyebrow { display: inline-block; color: var(--purple-bright); font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: .7rem 0 .65rem; font-size: clamp(2.35rem, 5vw, 4.1rem); line-height: 1; letter-spacing: -.065em; }
.hero h1 span { color: transparent; background: linear-gradient(100deg, var(--purple-bright), var(--pink)); background-clip: text; }
.hero h1 .display-outline { color: transparent; background: none; -webkit-text-stroke: 2px var(--purple-bright); }
.display-shift { display: inline-block; animation: title-float 5s ease-in-out infinite; }
@keyframes title-float { 50% { transform: translateY(-5px) rotate(-.5deg); } }
.hero > p { max-width: 580px; margin: auto; color: var(--muted); font-size: 1rem; }
.search { max-width: 620px; margin: 2.5rem auto 1.25rem; padding: .4rem; border-radius: 17px; display: flex; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; padding: .85rem 1rem; color: var(--text); background: transparent; }
.search button, .button { border: 0; border-radius: 12px; padding: .8rem 1.25rem; cursor: pointer; color: white; font-weight: 700; background: linear-gradient(135deg, var(--purple), #8d3de1); box-shadow: 0 8px 25px rgba(151, 55, 225, .28); transition: transform .2s, box-shadow .2s; }
.search button:hover, .button:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(151, 55, 225, .4); }
.button.secondary { color: var(--text); background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.category-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.category-list a { padding: .35rem .75rem; border-radius: 999px; color: var(--muted); font-size: .78rem; border: 1px solid transparent; }
.category-list a:hover, .category-list a.active { color: var(--purple-bright); border-color: var(--line); background: var(--surface); }

.featured-card { position: relative; min-height: 470px; border-radius: 28px; overflow: hidden; display: grid; grid-template-columns: 1.05fr .95fr; }
.featured-copy { padding: clamp(2rem, 5vw, 4.5rem); align-self: center; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.pill { padding: .28rem .65rem; border-radius: 999px; color: var(--purple-bright); border: 1px solid rgba(185, 92, 255, .35); background: rgba(185, 92, 255, .09); }
.featured-copy h2 { margin: 1rem 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.03; letter-spacing: -.055em; }
.featured-copy h2 a::after { content: ""; position: absolute; z-index: 2; inset: 0; }
.featured-copy p, .post-card p { color: var(--muted); }
.text-link { position: relative; z-index: 3; display: inline-flex; gap: .5rem; margin-top: 1rem; color: var(--purple-bright); font-weight: 700; }
.featured-visual { min-height: 330px; overflow: hidden; background: linear-gradient(145deg, #2b0b48, #0b0612); }
.featured-visual img { width: 100%; height: 100%; object-fit: cover; }
.code-art { height: 100%; min-height: 470px; padding: 4rem; display: flex; flex-direction: column; justify-content: center; color: #c9b7d9; transform: rotate(-3deg); }
.code-art span, .code-art em { font-family: monospace; font-style: normal; font-size: 1.2rem; }
.code-art strong { color: #e8a7ff; font-family: monospace; font-size: clamp(1.6rem, 3vw, 2.8rem); }
.code-art em { margin-left: 2rem; color: #7effc5; }

.section-heading { margin: 6rem 0 2rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin: .3rem 0 0; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.05em; }
.result-count { color: var(--muted); font-size: .85rem; }
.post-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.4rem; }
.post-card { grid-column: span 2; }
.post-card:nth-child(5n + 1), .post-card:nth-child(5n + 2) { grid-column: span 3; }
.post-card { position: relative; min-width: 0; border-radius: 22px; overflow: hidden; cursor: pointer; transition: transform .25s, border-color .25s; }
.post-card:hover { transform: translateY(-5px); border-color: rgba(185, 92, 255, .4); }
.card-image { height: 220px; display: block; overflow: hidden; background: linear-gradient(135deg, #2b0d48, #11081c); }
.post-card:nth-child(5n + 1) .card-image, .post-card:nth-child(5n + 2) .card-image { height: 290px; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .card-image img { transform: scale(1.035); }
.image-placeholder { display: grid; height: 100%; place-items: center; color: rgba(255,255,255,.8); font-size: 5rem; font-weight: 700; background: radial-gradient(circle at 70% 20%, rgba(255,92,206,.45), transparent 35%), linear-gradient(135deg, #32104f, #110719); }
.issue-number { position: absolute; right: .8rem; top: .7rem; color: rgba(255,255,255,.88); font-family: "Space Grotesk", sans-serif; font-size: 2rem; font-weight: 700; line-height: 1; mix-blend-mode: difference; }
.card-image { position: relative; }
.card-body { padding: 1.5rem; }
.card-body h3 { margin: .7rem 0; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.03em; }
.card-body h3 a::after { content: ""; position: absolute; z-index: 2; inset: 0; }
.card-body p { min-height: 4.8rem; font-size: .9rem; }
.card-footer { padding-top: 1rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }
.card-footer a { color: var(--purple-bright); font-weight: 600; }
.card-footer a, .card-image { position: relative; z-index: 3; }
.empty-state { max-width: 650px; margin: 4rem auto; padding: 4rem; border-radius: 24px; text-align: center; }

.article-shell { max-width: 980px; margin: auto; }
.article-header { max-width: 800px; margin: 2rem auto 3rem; text-align: center; }
.article-header h1 { margin: 1rem 0; font-size: clamp(2.8rem, 7vw, 5.6rem); line-height: 1; letter-spacing: -.07em; }
.article-header > p { color: var(--muted); font-size: 1.2rem; }
.article-header .meta, .article-header .tags { justify-content: center; }
.tags { display: flex; flex-wrap: wrap; gap: .6rem; color: var(--purple-bright); font-size: .82rem; }
.share-menu { position: relative; width: max-content; margin: 1.5rem auto 0; text-align: left; }
.share-menu summary { list-style: none; padding: .65rem 1rem; border: 1px solid var(--line); cursor: pointer; color: var(--text); background: var(--surface); font-family: "Space Grotesk", sans-serif; font-size: .8rem; font-weight: 700; }
.share-menu summary::-webkit-details-marker { display: none; }
.share-menu summary::after { content: " +"; color: var(--purple-bright); }
.share-menu[open] summary::after { content: " −"; }
.share-options { position: absolute; z-index: 10; top: calc(100% + .5rem); left: 50%; width: 260px; padding: .55rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem; border: 1px solid var(--line); background: var(--surface-solid); box-shadow: var(--shadow); transform: translateX(-50%); }
.share-options a, .share-options button { padding: .45rem .55rem; border: 0; cursor: pointer; display: flex; align-items: center; gap: .5rem; color: var(--muted); background: transparent; font: 600 .75rem "Inter", sans-serif; text-align: left; }
.share-options a:hover, .share-options button:hover { color: var(--purple-bright); background: var(--surface-hover); }
.share-icon { width: 1.5rem; height: 1.5rem; flex: 0 0 1.5rem; display: grid; place-items: center; border: 1px solid var(--line); color: var(--purple-bright); background: color-mix(in srgb, var(--purple) 8%, transparent); font-size: .68rem; font-weight: 800; line-height: 1; }
.share-status { position: absolute; top: calc(100% + .4rem); left: 50%; width: max-content; color: var(--green); font-size: .72rem; transform: translateX(-50%); }
.article-hero { margin: 0 0 1.5rem; border-radius: 28px; overflow: hidden; }
.article-hero img { width: 100%; max-height: 620px; object-fit: cover; }
.lightbox-trigger { width: 100%; padding: 0; display: block; overflow: hidden; border: 0; cursor: zoom-in; background: transparent; }
.lightbox-trigger img { width: 100%; transition: transform .25s, filter .25s; }
.lightbox-trigger:hover img { transform: scale(1.015); filter: brightness(1.06); }
.article-body { padding: clamp(1.5rem, 6vw, 5rem); border-radius: 28px; }
.post-copy { max-width: 720px; margin: auto; white-space: pre-line; font-family: Georgia, serif; font-size: 1.12rem; line-height: 1.9; }
.image-gallery { margin-top: 4rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.image-gallery .lightbox-trigger { border-radius: 15px; }
.image-gallery img { width: 100%; height: 300px; object-fit: cover; }
.image-lightbox { width: min(1100px, calc(100% - 2rem)); max-width: none; height: min(820px, calc(100% - 2rem)); max-height: none; padding: 3.5rem 4.5rem 2.5rem; overflow: hidden; border: 1px solid var(--line); color: white; background: rgba(9, 5, 15, .96); box-shadow: 0 35px 100px rgba(0,0,0,.65); }
.image-lightbox::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(8px); }
.image-lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; }
.image-lightbox figure { min-width: 0; max-height: 100%; margin: 0; display: grid; justify-items: center; gap: .75rem; }
.image-lightbox figure img { max-width: 100%; max-height: calc(100vh - 10rem); object-fit: contain; }
.image-lightbox figcaption { min-height: 1.4rem; color: #c8bacf; font-size: .82rem; text-align: center; }
.lightbox-close, .lightbox-nav { border: 1px solid rgba(255,255,255,.2); cursor: pointer; color: white; background: rgba(255,255,255,.08); }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(185,92,255,.35); }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px; font-size: 1.7rem; line-height: 1; }
.lightbox-nav { width: 48px; height: 64px; font-size: 2.2rem; }
.lightbox-count { position: absolute; bottom: 1rem; left: 50%; color: #c8bacf; font-size: .75rem; transform: translateX(-50%); }
.comments { max-width: 980px; margin: auto; }
.comments-layout { display: grid; grid-template-columns: 1.1fr .9fr; align-items: start; gap: 1.5rem; }
.comment-list { display: grid; gap: .85rem; }
.comment { padding: 1.3rem; border-radius: 18px; display: flex; gap: 1rem; }
.avatar { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: white; font-weight: 700; background: linear-gradient(135deg, var(--purple), var(--pink)); }
.comment header { display: flex; flex-wrap: wrap; gap: .8rem; align-items: baseline; }
.comment time { color: var(--muted); font-size: .72rem; }
.comment p { margin: .4rem 0 0; white-space: pre-line; }
.comment-form, .auth-card, .prose { padding: 2rem; border-radius: 22px; }
.comment-form { position: sticky; top: 100px; }
.comment-form h3 { margin-top: 0; font-size: 1.5rem; }
label { display: grid; gap: .4rem; margin: 1rem 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; outline: 0; padding: .8rem .9rem; color: var(--text); background: rgba(9, 5, 15, .28); resize: vertical; transition: border-color .2s, box-shadow .2s; }
[data-theme="light"] input, [data-theme="light"] textarea { background: rgba(255,255,255,.65); }
input:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(185, 92, 255, .13); }
.validation { display: block; color: var(--danger); font-size: .78rem; }
.validation ul { margin: .5rem 0; padding-left: 1rem; }
.captcha-field { margin: 1rem 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.captcha-field > span { display: block; margin-bottom: .4rem; }
.captcha-field img { width: 100%; height: 78px; border: 1px solid var(--line); border-radius: 11px 11px 0 0; object-fit: fill; }
.captcha-field .captcha-input { border-radius: 0 0 11px 11px; text-align: center; letter-spacing: .2em; }
.muted { color: var(--muted); }
.notice { margin: 1rem 0; padding: .9rem 1rem; border-radius: 12px; }
.notice.success { color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }
.auth-wrap { min-height: 60vh; display: grid; place-items: center; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { margin-top: .5rem; letter-spacing: -.04em; }
.narrow { max-width: 760px; margin: 2rem auto; }
.prose h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1; letter-spacing: -.06em; }
.prose p { color: var(--muted); }
.error-page small { display: block; margin-top: 2rem; color: var(--muted); }
.about-layout { min-height: 65vh; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(2rem, 8vw, 7rem); }
.about-copy h1 { margin: .6rem 0 1.2rem; font-size: clamp(3.2rem, 8vw, 6.5rem); line-height: .95; letter-spacing: -.075em; }
.about-copy h1 span { color: transparent; background: linear-gradient(100deg, var(--purple-bright), var(--pink)); background-clip: text; }
.about-headline { max-width: 650px; color: var(--muted); font-size: 1.25rem; }
.about-body { max-width: 680px; margin-top: 2rem; white-space: pre-line; font-size: 1.03rem; line-height: 1.9; }
.about-portrait { overflow: hidden; border-radius: 32px; transform: rotate(2deg); }
.about-portrait { position: relative; }
.portrait-stamp { position: absolute; z-index: 2; top: 1rem; right: 1rem; width: 74px; height: 74px; border-radius: 50%; display: grid; place-content: center; color: white; background: var(--purple); font-size: .58rem; font-weight: 700; line-height: 1.2; letter-spacing: .1em; text-align: center; transform: rotate(10deg); box-shadow: 0 8px 25px rgba(0,0,0,.25); }
.about-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait-placeholder { aspect-ratio: 4 / 5; display: grid; place-content: center; gap: 1rem; text-align: center; color: var(--muted); background: radial-gradient(circle at 65% 20%, rgba(255,92,206,.3), transparent 35%), linear-gradient(145deg, #2b0d48, #100719); }
.portrait-placeholder span { color: white; font-size: 4rem; font-weight: 700; }
.portrait-preview { width: 100%; max-height: 260px; border-radius: 12px; object-fit: cover; }
.history-section { margin-top: 9rem; }
.history-heading { max-width: 650px; margin: 0 auto 5rem; text-align: center; }
.history-heading h2 { margin: .4rem 0; font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1; letter-spacing: -.065em; }
.history-heading p { color: var(--muted); }
.history-timeline { position: relative; max-width: 1080px; margin: auto; padding: 2rem 0; }
.history-timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: linear-gradient(transparent, var(--purple) 5%, var(--purple) 95%, transparent); box-shadow: 0 0 16px rgba(185,92,255,.35); }
.history-event { position: relative; min-height: 330px; display: grid; grid-template-columns: 1fr 90px 1fr; align-items: center; }
.history-node { grid-column: 2; justify-self: center; z-index: 2; width: 13px; height: 13px; border: 3px solid var(--bg); border-radius: 50%; background: var(--purple-bright); box-shadow: 0 0 0 1px var(--purple), 0 0 24px var(--purple); }
.history-year { color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--text) 35%, transparent); font-family: "Space Grotesk", sans-serif; font-size: clamp(3.5rem, 7vw, 6.5rem); font-weight: 700; letter-spacing: -.08em; line-height: 1; }
.event-left .history-year { grid-column: 3; grid-row: 1; padding-left: 2rem; text-align: left; }
.event-right .history-year { grid-column: 1; grid-row: 1; padding-right: 2rem; text-align: right; }
.history-card { overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.event-left .history-card { grid-column: 1; grid-row: 1; }
.event-right .history-card { grid-column: 3; grid-row: 1; }
.history-card img { width: 100%; height: 190px; object-fit: cover; filter: saturate(.75) contrast(1.05); }
.history-card > div { padding: 1.25rem; }
.history-card span { color: var(--purple-bright); font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.history-card h3 { margin: .3rem 0; font-size: 1.35rem; }
.history-card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.7; }
.milestone-admin-list article { min-height: 74px; padding: .75rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 1rem; }
.milestone-admin-list img { width: 90px; height: 62px; border-radius: 8px; object-fit: cover; }
.milestone-admin-list span, .milestone-admin-list strong, .milestone-admin-list small { display: block; }
.milestone-admin-list span { color: var(--purple-bright); font-size: .72rem; }
.milestone-admin-list small { color: var(--muted); }
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.75,.25,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

.admin-heading { margin: 1rem 0 2rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.admin-heading h1 { margin: .3rem 0; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -.065em; }
.admin-heading p { margin: 0; color: var(--muted); }
.admin-actions { display: flex; align-items: center; gap: .7rem; }
.admin-actions form { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-card { padding: 1.4rem; border-radius: 18px; }
.stat-card span, .stat-card small { display: block; color: var(--muted); font-size: .76rem; }
.stat-card strong { display: block; margin: .25rem 0; font-size: 2.3rem; line-height: 1; }
.admin-panel { margin-top: 1.2rem; padding: 1.5rem; border-radius: 22px; }
.panel-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1rem; }
.panel-heading h2 { margin: .2rem 0 0; }
.panel-heading > a { color: var(--purple-bright); font-size: .85rem; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th { padding: .8rem; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.admin-table td { padding: 1rem .8rem; border-top: 1px solid var(--line); }
.admin-table td:first-child span { display: block; color: var(--muted); font-size: .75rem; }
.status { display: inline-block; margin-right: .35rem; padding: .22rem .5rem; border-radius: 99px; font-size: .68rem; }
.status.published { color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.status.draft { color: var(--muted); background: var(--surface-hover); }
.status.featured { color: var(--purple-bright); background: rgba(185, 92, 255, .1); }
.row-actions { display: flex; justify-content: flex-end; gap: .5rem; white-space: nowrap; }
.row-actions a, .row-actions button { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .6rem; color: var(--purple-bright); background: transparent; cursor: pointer; font-size: .75rem; }
.row-actions .danger { color: var(--danger); }
.moderation-item { padding: 1rem 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }
.moderation-item span, .moderation-item small { color: var(--muted); }
.moderation-item p { margin: .35rem 0; }
.moderation-item .row-actions { align-items: center; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 1.2rem; }
.editor-main, .editor-card { padding: 1.5rem; border-radius: 20px; }
.editor-main label:first-of-type { margin-top: 0; }
.editor-main input[data-title-input] { font-size: 1.4rem; font-weight: 700; }
.editor-sidebar { display: grid; gap: 1rem; }
.editor-card h2 { margin: 0 0 1rem; font-size: 1rem; }
.editor-card .button { width: 100%; }
.check-row { grid-template-columns: auto 1fr; align-items: center; }
.check-row input { width: 18px; height: 18px; accent-color: var(--purple); }
.check-row strong, .check-row small { display: block; color: var(--text); }
.check-row small { color: var(--muted); font-weight: 400; }
.file-drop { padding: 1rem; border: 1px dashed var(--line); border-radius: 12px; text-align: center; cursor: pointer; }
.file-drop input { position: absolute; opacity: 0; pointer-events: none; }
.file-drop span { color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.image-manager { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: 1rem; }
.image-manager div { position: relative; overflow: hidden; border-radius: 10px; }
.image-manager img { width: 100%; height: 90px; object-fit: cover; }
.image-manager button { position: absolute; right: .3rem; bottom: .3rem; border: 0; border-radius: 6px; padding: .25rem .4rem; color: white; background: rgba(0,0,0,.7); cursor: pointer; font-size: .65rem; }

@media (max-width: 900px) {
  .featured-card, .comments-layout, .editor-layout, .about-layout { grid-template-columns: 1fr; }
  .featured-visual { grid-row: 1; max-height: 400px; }
  .code-art { min-height: 350px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card, .post-card:nth-child(5n + 1), .post-card:nth-child(5n + 2) { grid-column: span 1; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .comment-form { position: static; }
  .about-portrait { max-width: 520px; grid-row: 1; transform: none; }
  .history-event { min-height: 280px; grid-template-columns: 1fr 60px 1fr; }
  .site-header { min-height: 112px; }
  .brand-mark { width: 86px; height: 86px; flex-basis: 86px; }
  .brand-copy strong { font-size: 1.45rem; }
  .header-signal { display: none; }
}

@media (max-width: 620px) {
  .signal-strip { display: none; }
  .site-header { min-height: 96px; padding: .7rem .8rem; gap: .65rem; }
  .brand { gap: .55rem; }
  .brand-mark { width: 74px; height: 74px; flex-basis: 74px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--purple) 8%, transparent), 0 0 28px rgba(42, 220, 188, .24); }
  .brand-copy small { display: none; }
  .brand-copy strong { max-width: 88px; white-space: normal; font-size: .9rem; line-height: 1.05; }
  .header-side { margin: auto; }
  .site-header nav { gap: .8rem; }
  .site-header nav a { font-size: .75rem; }
  .site-header nav a span { display: none; }
  .header-controls { gap: .45rem; }
  .header-toggle { width: 40px; height: 40px; flex-basis: 40px; box-shadow: 4px 4px 0 color-mix(in srgb, var(--purple) 20%, transparent); }
  .page-shell { width: min(100% - 1.25rem, 1180px); padding-top: 3rem; }
  .hero { margin: .5rem auto 2.5rem; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3.4rem); }
  .hero-kicker { flex-direction: column; gap: .3rem; }
  .featured-card { min-height: 0; }
  .featured-copy { padding: 1.6rem; }
  .post-grid, .stat-grid, .image-gallery { grid-template-columns: 1fr; }
  .section-heading { margin-top: 4rem; }
  .card-image { height: 250px; }
  .article-body { border-radius: 20px; }
  .article-header h1 { font-size: 3rem; }
  .image-gallery img { height: auto; }
  .image-lightbox { width: 100%; height: 100%; padding: 4rem .75rem 2.5rem; border: 0; }
  .image-lightbox[open] { grid-template-columns: 1fr 1fr; align-content: center; }
  .image-lightbox figure { grid-column: 1 / -1; grid-row: 1; }
  .image-lightbox figure img { max-height: calc(100vh - 10rem); }
  .lightbox-nav { width: 100%; height: 44px; }
  .lightbox-previous { grid-column: 1; }
  .lightbox-next { grid-column: 2; }
  .site-footer { flex-wrap: wrap; gap: .5rem 1rem; }
  .site-footer span:nth-child(2) { margin-left: 0; }
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-table th:nth-child(3), .admin-table td:nth-child(3) { display: none; }
  .moderation-item { flex-direction: column; }
  .moderation-item .row-actions { justify-content: flex-start; }
  .history-timeline::before { left: 18px; }
  .history-event { min-height: 0; margin-bottom: 3rem; padding-left: 52px; display: block; }
  .history-node { position: absolute; left: 12px; top: 18px; }
  .history-year, .event-left .history-year, .event-right .history-year { padding: 0 0 .75rem; text-align: left; font-size: 3rem; }
  .history-card { border-radius: 0; }
  .milestone-admin-list article { grid-template-columns: 64px 1fr; }
  .milestone-admin-list img { width: 64px; height: 52px; }
  .milestone-admin-list .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .signal-strip div, .display-shift { animation: none; }
}
