/* =====================================================================
   site.css — public pages, "Comic Impact" edition.
   Builds on theme.css. Layout notes:
     - Every page is an "issue": tilted ink labels, Impact headlines,
       hard offset shadows, halftone dots on the paper.
     - Section padding comes only from .section / .page-hero / .hero,
       so components never fight over spacing.
   ===================================================================== */

/* ---------- Page canvas: paper with halftone dots ---------- */

.site {
    position: relative;
    min-height: 100vh;
    background: var(--paper);
    overflow-x: clip;
}

.site::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(var(--ink) 0.75px, transparent 0.75px);
    background-size: 17px 17px;
    opacity: 0.075;
}

.site > * {
    position: relative;
    z-index: 1;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -80px;
    z-index: 60;
    padding: 8px 12px;
    background: var(--yellow);
    border: var(--border);
    font-weight: 900;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* ---------- Editor strip (only while signed in) ---------- */

.admin-strip {
    position: relative;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    padding: 8px var(--gutter);
    background: var(--ink);
    color: var(--paper);
    font-size: 12px;
    font-weight: 700;
}

.admin-strip a,
.admin-strip button {
    padding: 0;
    background: none;
    border: 0;
    color: var(--yellow);
    font-size: 12px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.admin-strip form {
    margin: 0 0 0 auto;
}

.admin-strip-note {
    opacity: 0.75;
}

/* ---------- Navigation ---------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 82px;
    padding: 0 var(--gutter);
    background: var(--paper);
    border-bottom: var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    font-family: var(--font-display);
    font-size: 19px;
    letter-spacing: 0.08em;
    line-height: 1.05;
    text-transform: uppercase;
}

.logo-small {
    margin-top: 2px;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
    opacity: 0.65;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.nav-links a {
    padding: 6px 0;
    border-bottom: 3px solid transparent;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--red);
}

.nav-links a.is-active {
    border-bottom-color: var(--red);
}

.nav-links .nav-cta {
    padding: 9px 15px;
    background: var(--yellow);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    font-weight: 900;
    white-space: nowrap;
    transform: rotate(-2deg);
}

.nav-links .nav-cta:hover {
    color: var(--ink);
    transform: rotate(-2deg) translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--stroke);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 8px 12px;
    background: var(--yellow);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- Home hero ---------- */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 54% 46%;
    gap: 3px;
    min-height: max(600px, calc(100vh - 82px));
    padding: 52px var(--gutter) 60px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    left: -5%;
    top: 43%;
    width: 110%;
    height: 140px;
    background: var(--red);
    opacity: 0.075;
    transform: rotate(-11deg);
    pointer-events: none;
}

.hero-left {
    position: relative;
    z-index: 5;
    align-self: center;
}

.issue-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: var(--ink);
    color: var(--paper);
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transform: rotate(-2deg);
}

.issue-label .tag-dot {
    width: 7px;
    height: 7px;
    background: var(--yellow);
    border-radius: 50%;
}

.kicker {
    margin: 24px 0 6px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0 0 23px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(56px, 7.9vw, 110px);
    line-height: 0.88;
    letter-spacing: -0.012em;
    text-transform: uppercase;
}

.hero-title > span {
    display: block;
}

.hero-title .line-a {
    transform: translateX(-2px);
}

.hero-title .line-b {
    color: var(--red);
    -webkit-text-stroke: 1.6px var(--stroke);
    text-shadow: 4px 5px 0 var(--blue);
    white-space: nowrap;
}

.hero-copy {
    max-width: 440px;
    margin: 0 0 25px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.byline {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 30px;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.byline .line {
    width: 36px;
    height: 1px;
    background: var(--ink);
    opacity: 0.5;
}

.byline .round {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    background: var(--blue);
    border: var(--border);
    border-radius: 50%;
    color: #fff;
}

.hero-right {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.illustration-wrap {
    position: relative;
    width: 100%;
    max-width: 490px;
    aspect-ratio: 1 / 1.03;
}

.illustration-frame {
    position: absolute;
    inset: 8% 5% 8% 4%;
    overflow: hidden;
    background: var(--blue);
    border: 4px solid var(--stroke);
    box-shadow: var(--shadow-lg);
    transform: rotate(4deg);
    clip-path: polygon(6% 0%, 100% 0%, 100% 95%, 95% 100%, 0% 100%, 0% 8%);
}

.city-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.sticker {
    position: absolute;
    z-index: 5;
    font-family: var(--font-display);
    line-height: 1;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #16131b;
    border: 3px solid var(--stroke);
    box-shadow: 4px 4px 0 var(--stroke);
}

.sticker.one {
    top: 1%;
    right: 2%;
    padding: 12px 15px;
    background: var(--yellow);
    font-size: 23px;
    transform: rotate(12deg);
}

.sticker.two {
    bottom: 6%;
    left: -1%;
    padding: 9px 14px;
    background: var(--red);
    color: #fff;
    font-size: 22px;
    transform: rotate(-7deg);
}

.sticker.three {
    right: -3%;
    bottom: 29%;
    padding: 10px;
    background: var(--paper);
    font-family: var(--font-mono);
    font-size: 10px;
    transform: rotate(7deg);
}

.illustration-spark {
    position: absolute;
    z-index: 4;
    left: -9%;
    top: 21%;
    color: var(--red);
    font-family: var(--font-display);
    font-size: 36px;
    transform: rotate(-22deg);
}

.hero-corner {
    position: absolute;
    z-index: 1;
    right: -12%;
    bottom: -9%;
    width: 165px;
    height: 165px;
    border: 15px solid var(--yellow);
    border-radius: 50%;
    opacity: 0.9;
}

/* ---------- Ticker ---------- */

.ticker {
    display: flex;
    overflow: hidden;
    padding: 12px 0;
    background: var(--ink);
    color: var(--paper);
    border-block: var(--border);
    font-family: var(--font-display);
    font-size: 23px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ticker span {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 28s linear infinite;
}

.ticker b {
    font-weight: 400;
}

.ticker em {
    padding: 0 17px;
    color: var(--red);
    font-style: normal;
}

@keyframes ticker {
    to { transform: translateX(-50%); }
}

/* ---------- Tally: live counters under the ticker ---------- */

.tally {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--paper);
    border-bottom: var(--border);
}

.tally-cell {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px clamp(16px, 2.4vw, 32px);
    border-right: var(--border);
    text-decoration: none;
}

.tally-cell:last-child {
    border-right: 0;
}

.tally-cell strong {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 4vw, 56px);
    line-height: 1;
}

.tally-cell span {
    max-width: 13ch;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tally-cell:hover {
    background: var(--yellow);
}

.tally-hot strong {
    color: var(--red);
    -webkit-text-stroke: 1.2px var(--stroke);
}

/* ---------- Generic sections ---------- */

.section {
    padding: 68px var(--gutter) 72px;
}

.section + .section {
    border-top: var(--border);
}

/* Compact admin-only Journey action */
.section.journey-admin-action {
    padding-top: 24px;
    padding-bottom: 28px;
}

.journey-admin-action .hint {
    margin: 8px 0 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-label {
    color: var(--red);
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.section-head h2 {
    margin: 9px 0 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 5.2vw, 66px);
    line-height: 1;
    letter-spacing: 0.005em;
    text-transform: uppercase;
}

.section-head p {
    max-width: 310px;
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
}

.dot {
    color: var(--red);
}

.section-more {
    display: inline-block;
    margin-top: 30px;
    padding-bottom: 2px;
    border-bottom: 3px solid var(--red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.section-more:hover {
    color: var(--red);
}

.empty-note {
    max-width: 520px;
    margin: 0;
    padding: 22px;
    background: var(--white);
    border: 2px dashed var(--stroke);
    color: var(--muted);
    font-weight: 700;
}

.group-title {
    margin: 0 0 18px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.group-note {
    max-width: 60ch;
    margin: -8px 0 20px;
    color: var(--muted);
}

/* ---------- "Now" speech bubble ---------- */

.now {
    padding-top: 60px;
    padding-bottom: 76px;
}

.now-bubble {
    position: relative;
    max-width: 780px;
    padding: 28px 32px 24px;
    background: var(--white);
    border: 3px solid var(--stroke);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

/* the bubble's tail: an ink triangle with a white one inside it */
.now-bubble::before,
.now-bubble::after {
    content: "";
    position: absolute;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.now-bubble::before {
    left: 52px;
    bottom: -30px;
    width: 38px;
    height: 30px;
    background: var(--stroke);
}

.now-bubble::after {
    left: 55px;
    bottom: -22px;
    width: 29px;
    height: 23px;
    background: var(--white);
}

.now-title {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.now-body {
    max-width: none;
    font-size: 16px;
}

.now-body ul {
    margin: 0;
}

.now-updated {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- Project cards ("issues") ---------- */

.projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.project {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.project:hover {
    transform: translate(-3px, -5px);
    box-shadow: 8px 10px 0 var(--stroke);
}

.thumb {
    position: relative;
    display: grid;
    place-items: center;
    height: 170px;
    overflow: hidden;
    background: var(--blue);
    border-bottom: var(--border);
}

.thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#0f1024 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.3;
}

.cover-blue { background: var(--blue); }
.cover-red { background: var(--red); }
.cover-yellow { background: #ffce4a; }
.cover-ink { background: var(--ink); }

.thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-icon {
    position: relative;
    z-index: 1;
    display: block;
    color: #fff;
    font-family: var(--font-display);
    font-size: 76px;
    line-height: 1;
    text-shadow: 6px 6px 0 #141322;
    transform: rotate(-12deg);
}

.cover-red .thumb-icon { transform: rotate(9deg); }

.cover-yellow .thumb-icon {
    color: var(--ink);
    text-shadow: 6px 6px 0 var(--red);
}

.cover-ink .thumb-icon {
    color: var(--yellow);
    text-shadow: 6px 6px 0 var(--red);
}

.thumb-tag {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 13px;
    padding: 3px 7px;
    background: #12131e;
    color: #fff;
    border: 1px solid #fff;
    font-family: var(--font-mono);
    font-size: 9px;
}

.thumb-status {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 3px 7px;
    background: var(--yellow);
    color: var(--ink);
    border: 2px solid var(--stroke);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transform: rotate(4deg);
}

.project .detail {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 16px 20px;
}

.project-type {
    color: var(--red);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.project h3 {
    margin: 6px 0 6px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.project p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.project .chips {
    margin-top: auto;
    padding-top: 14px;
}

/* ---------- Research rows ---------- */

.paper-list {
    border-top: var(--border);
}

.paper-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 6px 24px;
    align-items: start;
    padding: 22px 0;
    border-bottom: var(--border);
}

.paper-row .stamp {
    justify-self: start;
    margin-top: 4px;
}

.paper-main h3 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
}

.paper-main h3 a {
    text-decoration: none;
}

.paper-main h3 a:hover {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.paper-authors {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.paper-venue {
    margin: 3px 0 0;
    font-size: 13px;
    font-weight: 800;
}

.paper-row .chips {
    grid-column: 2;
    margin-top: 4px;
}

/* ---------- Daily log strips ---------- */

.strip-list {
    display: grid;
    gap: 18px;
    max-width: 980px;
}

.strip {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow-sm);
}

.strip-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    background: var(--yellow);
    border-right: var(--border);
    text-align: center;
}

.strip:nth-child(3n + 2) .strip-date {
    background: var(--red);
    color: #fff;
}

.strip:nth-child(3n + 3) .strip-date {
    background: var(--blue);
    color: #fff;
}

.strip-day {
    font-family: var(--font-display);
    font-size: 44px;
    line-height: 1;
}

.strip-month {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.strip-body {
    min-width: 0;
    padding: 16px 20px 18px;
}

.strip-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.strip-cat {
    padding: 2px 7px;
    background: var(--ink);
    color: var(--paper);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.strip-body h3 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
}

.strip-body h3 a {
    text-decoration: none;
}

.strip-body h3 a:hover {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.strip-preview {
    max-width: 70ch;
    margin: 0;
    color: var(--muted);
    font-size: 14.5px;
}

/* ---------- Inner page hero ---------- */

.page-hero {
    position: relative;
    padding: 56px var(--gutter) 46px;
    overflow: hidden;
    border-bottom: var(--border);
}

.page-hero::before {
    content: "";
    position: absolute;
    right: -10%;
    top: 30%;
    width: 75%;
    height: 120px;
    background: var(--red);
    opacity: 0.07;
    transform: rotate(-9deg);
    pointer-events: none;
}

.page-hero > * {
    position: relative;
}

.page-title {
    max-width: 18ch;
    margin: 22px 0 16px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(46px, 7vw, 92px);
    line-height: 0.92;
    letter-spacing: -0.005em;
    text-transform: uppercase;
}

.page-intro {
    max-width: 62ch;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 16.5px;
    line-height: 1.7;
}

.back-link {
    display: table;
    margin-bottom: 18px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.back-link:hover {
    color: var(--red);
}

/* ---------- Filters and pager ---------- */

/* Anchor targets sit below the sticky navigation bar. */
#entries { scroll-margin-top: 100px; }


.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.filter-chip {
    padding: 8px 14px;
    background: var(--paper);
    border: var(--border);
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.filter-chip:hover {
    background: var(--white);
}

.filter-chip[aria-pressed="true"],
.filter-chip[aria-current="page"] {
    background: var(--ink);
    color: var(--paper);
    box-shadow: 3px 3px 0 var(--red);
}

.filter-count {
    margin-left: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 36px;
}

.pager-info {
    font-size: 13px;
    font-weight: 800;
}

/* ---------- Detail pages ---------- */

.issue-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    align-items: center;
    gap: 40px;
    padding: 48px var(--gutter) 56px;
    border-bottom: var(--border);
}

.issue-cover {
    height: auto;
    aspect-ratio: 4 / 3.3;
    border: 3px solid var(--stroke);
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
}

.issue-cover .thumb-icon {
    font-size: clamp(90px, 12vw, 150px);
}

.stamp-cover {
    position: absolute;
    z-index: 2;
    right: 16px;
    bottom: 16px;
    background: var(--paper);
    font-size: 12px;
}

.read-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 48px;
}

.side-stack {
    position: sticky;
    top: 104px;
    display: grid;
    gap: 22px;
}

.credits {
    position: sticky;
    top: 104px;
}

.facts {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
}

.facts div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(21, 20, 28, 0.25);
}

.facts dt {
    padding-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.facts dd {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.more-issues {
    border-top: var(--border);
}

.paper-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    font-size: 13px;
    font-weight: 800;
}

.paper-title {
    max-width: 24ch;
    font-size: clamp(34px, 4.6vw, 60px);
    line-height: 1;
}

.paper-authors-lg {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 17px;
}

.cite-text {
    margin: 0 0 12px;
    padding: 12px;
    background: var(--paper);
    border: 1.5px dashed var(--stroke);
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* ---------- Blog post ---------- */

.post {
    padding: 48px var(--gutter) 72px;
}

.post-head,
.post-body,
.post-nav {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.post-head {
    margin-bottom: 34px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.post-title {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 5.6vw, 72px);
    line-height: 0.95;
    text-transform: uppercase;
}

.post-head .btn {
    margin-top: 16px;
}

.draft-flag {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 10px;
    background: var(--red);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 56px;
}

.post-nav-link {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.post-nav-link:hover {
    background: var(--yellow);
}

.post-nav-link span {
    color: var(--red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.post-nav-link strong {
    font-size: 16px;
    line-height: 1.35;
}

.post-nav-next {
    grid-column: 2;
    text-align: right;
}

.streak-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin: 18px 0 0;
    padding: 8px 14px;
    background: var(--yellow);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transform: rotate(-1.5deg);
}

.streak-badge strong {
    color: var(--red);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30px;
    line-height: 1;
}

/* ---------- About: power meters, education ---------- */

.power-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 22px;
}

.power-group {
    padding: 20px 20px 18px;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow);
}

.power-group h3 {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 22px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.meters {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.meter {
    display: grid;
    gap: 5px;
}

.meter-name {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
}

.meter-name em {
    color: var(--red-dark);
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.meter-bar {
    display: block;
    width: 100%;
    height: 14px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--paper);
    border: var(--border);
    color: var(--blue);
}

.meter-bar::-webkit-progress-bar { background: var(--paper); }
.meter-bar::-webkit-progress-value { background: var(--blue); }
.meter-bar::-moz-progress-bar { background: var(--blue); }

.is-learning .meter-bar::-webkit-progress-value {
    background: repeating-linear-gradient(-45deg, var(--red) 0 6px, #ff8a8f 6px 12px);
}

.is-learning .meter-bar::-moz-progress-bar {
    background: repeating-linear-gradient(-45deg, var(--red) 0 6px, #ff8a8f 6px 12px);
}

/* Journey: the newest academic or learning entry becomes a full-width
   feature; older entries remain compact cards below. This prevents a long
   learning milestone from stretching all cards in the same row. */
.edu-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}
.edu-list > .edu:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    column-gap: 28px;
    align-items: start;
}
/* Full-width feature only when the first entry has a photo */
.edu-list > .edu:first-child:not(:has(> .journey-photo)) {
    grid-column: auto;
    display: block;
}
.edu-list > .edu:first-child > :not(.journey-photo) {
    grid-column: 1;
}
.edu-list > .edu:first-child > .journey-photo {
    grid-column: 2;
    grid-row: 1 / span 6;
    width: 100%;
    max-width: none;
    margin: 0;
    align-self: center;
}
@media (max-width: 1050px) {
    .edu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .edu-list { grid-template-columns: minmax(0, 1fr); }
    .edu-list > .edu:first-child { display: block; }
    .edu-list > .edu:first-child > .journey-photo { margin: 14px 0; }
}

.edu h3 {
    margin: 8px 0 4px;
    font-size: 20px;
    line-height: 1.25;
}

.edu-when {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.edu-org {
    margin: 0 0 10px;
    color: var(--blue);
    font-weight: 700;
}

.ticks {
    display: grid;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.ticks li {
    position: relative;
    padding-left: 22px;
    font-size: 14.5px;
    line-height: 1.5;
}

.ticks li::before {
    content: "✦";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--red);
    font-size: 12px;
}

/* ---------- Journey timeline ---------- */

.timeline {
    position: relative;
    display: grid;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: var(--stroke);
}

.chapter {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.chapter-marker {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    background: var(--yellow);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-display);
    font-size: 26px;
    transform: rotate(-6deg);
}

.is-now .chapter-marker {
    background: var(--red);
    color: #fff;
}

.chapter-panel {
    max-width: 820px;
    padding: 20px 22px;
    background: var(--white);
    border: var(--border);
    box-shadow: var(--shadow);
}

.chapter-when {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.chapter-type {
    margin-left: 8px;
    padding: 2px 7px;
    background: var(--ink);
    color: var(--paper);
    font-size: 10px;
    letter-spacing: 0.1em;
}

.chapter-panel h3 {
    margin: 10px 0 4px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.chapter-org {
    margin: 0 0 10px;
    color: var(--blue);
    font-weight: 800;
}

.chapter-org a {
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.chapter-summary {
    margin: 0 0 8px;
}

/* ---------- Footer ---------- */

.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 24px 40px;
    padding: 40px var(--gutter) 22px;
    background: var(--yellow);
    color: #16131b;
    border-top: var(--border);
}

.footer-title {
    display: block;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.footer-call p {
    max-width: 46ch;
    margin: 10px 0 18px;
    font-weight: 600;
}

.footer-call .btn {
    text-transform: none;
    letter-spacing: 0.01em;
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-end;
    gap: 10px 22px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.footer-links a {
    padding-bottom: 2px;
    border-bottom: 3px solid var(--stroke);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--red-dark);
    border-color: var(--red-dark);
}

.footer-base {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: var(--border);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.editor-door {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: none;
    border: 1.5px solid transparent;
    color: rgba(22, 19, 27, 0.6);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.editor-door:hover {
    border-color: var(--stroke);
    color: var(--ink);
}

/* ---------- Password dialog ---------- */

.lair {
    width: 100%;
    max-width: min(440px, calc(100vw - 32px));
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    color: var(--ink);
}

.lair::backdrop {
    background: rgba(21, 20, 28, 0.74);
}

.lair-panel {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 36px 28px 28px;
    background: var(--paper);
    border: 3px solid var(--stroke);
    box-shadow: 10px 10px 0 var(--red);
}

.lair[open] .lair-panel {
    animation: lairIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

@keyframes lairIn {
    from { opacity: 0; transform: scale(0.86) rotate(-3deg); }
    to { opacity: 1; transform: none; }
}

.lair-burst {
    position: absolute;
    top: -24px;
    left: -16px;
    padding: 8px 12px;
    background: var(--yellow);
    border: 3px solid var(--stroke);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-display);
    font-size: 22px;
    transform: rotate(-10deg);
}

.lair-title {
    margin: 4px 0 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 40px;
    line-height: 1;
    text-transform: uppercase;
}

.lair-copy {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 14px;
}

.lair-msg {
    margin: 0;
    padding: 8px 10px;
    background: var(--white);
    border: var(--border);
    font-size: 13px;
    font-weight: 800;
}

.lair-msg.is-error {
    background: var(--red);
    color: #fff;
}

.lair-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    background: var(--white);
    border: var(--border);
    font-weight: 900;
}

.lair-submit {
    justify-content: center;
    margin-top: 8px;
}

/* ---------- 404 / error ---------- */

.lost {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 70vh;
    padding: 80px var(--gutter);
}

.lost-burst {
    color: var(--red);
    font-family: var(--font-display);
    font-size: clamp(64px, 10vw, 120px);
    line-height: 1;
    -webkit-text-stroke: 2px var(--stroke);
    text-shadow: 6px 6px 0 var(--blue);
    transform: rotate(-8deg);
}

/* ---------- Spider introduction (home page, once per visit) ---------- */

.intro {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
}

html.intro-play .intro {
    display: flex;
    /* Safety net: if the script never finishes, the curtain still lifts. */
    animation: introFailsafe 0s 8s forwards;
}

html.intro-play .has-intro {
    overflow: hidden;
}

@keyframes introFailsafe {
    to { visibility: hidden; pointer-events: none; }
}

.intro .curtain {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 51%;
    background: #13131d;
    transition: transform 0.94s cubic-bezier(0.85, 0, 0.13, 1), opacity 0.65s;
}

.intro .left { left: 0; }
.intro .right { right: 0; }

.intro .curtain.left::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(#fa4652 1px, transparent 1px);
    background-size: 14px 14px;
    opacity: 0.1;
}

.intro .curtain.right::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, #f4436220 31%, transparent 33%);
}

.intro.ending .left { transform: translateX(-104%); }
.intro.ending .right { transform: translateX(104%); }

.intro.ending .spider-unit,
.intro.ending .intro-text,
.intro.ending .intro-grain,
.intro.ending .intro-top,
.intro.ending .skip {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.14s;
}

.intro.ending .intro-text {
    /* the entrance animation would otherwise keep the text visible */
    animation: none;
    visibility: hidden;
}

.intro-grain {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-image: radial-gradient(#fff 1.3px, transparent 1.3px);
    background-size: 15px 15px;
    opacity: 0.08;
}

.intro-top {
    position: absolute;
    z-index: 10;
    left: 28px;
    top: 26px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffffa3;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.intro-top .square {
    width: 12px;
    height: 12px;
    background: var(--yellow);
    transform: rotate(22deg);
}

.skip {
    position: absolute;
    z-index: 20;
    right: 22px;
    top: 18px;
    padding: 9px 11px;
    background: transparent;
    border: 1px solid #ffffff69;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skip:hover { background: #ffffff29; }

.intro-text {
    position: absolute;
    z-index: 8;
    left: 0;
    right: 0;
    bottom: 17%;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.3em;
    text-align: center;
    text-transform: uppercase;
    animation: blurIn 1.2s both;
}

.intro-text .large {
    display: block;
    margin-bottom: 10px;
    color: #ffdb4a;
    font-family: var(--font-display);
    font-size: clamp(35px, 5vw, 61px);
    letter-spacing: 0.035em;
    line-height: 1;
    text-shadow: 3px 3px 0 #ff4c53;
}

.intro-text .small {
    display: block;
    margin-top: 5px;
    color: #ffffffaa;
    font-size: 10px;
    letter-spacing: 0.2em;
}

@keyframes blurIn {
    from { opacity: 0; filter: blur(9px); transform: translateY(14px); }
    to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.spider-unit {
    position: absolute;
    z-index: 11;
    left: 50%;
    top: 43%;
    width: 160px;
    height: 200px;
    margin-left: -80px;
    margin-top: -80px;
    transform-origin: 50% 10%;
    filter: drop-shadow(0 8px 0 #0b0b10);
    animation: spiderDrop 1.45s cubic-bezier(0.35, 0.65, 0.22, 1) both;
}

.intro.is-exit .spider-unit {
    animation: spiderZip 0.54s cubic-bezier(0.56, 0, 1, 0.43) forwards;
}

.spider-unit .thread {
    position: absolute;
    z-index: -1;
    bottom: 81%;
    left: 50%;
    width: 3px;
    height: 110vh;
    background: linear-gradient(#c2f0ff, #fff 50%, #ff82b7);
    box-shadow: 0 0 6px #fff9;
    transform: translateX(-50%);
}

.spider-unit svg {
    position: absolute;
    left: 0;
    top: 27px;
    width: 160px;
    height: 160px;
    overflow: visible;
}

.spider-unit .leg {
    transform-origin: 50% 55%;
    animation: legwiggle 0.44s ease-in-out infinite alternate;
}

.spider-unit .leg.r {
    animation-direction: alternate-reverse;
}

@keyframes legwiggle {
    from { transform: rotate(-3deg); }
    to { transform: rotate(3deg); }
}

@keyframes spiderDrop {
    0% { transform: translateY(-102vh) rotate(10deg); }
    65% { transform: translateY(30px) rotate(-11deg); }
    82% { transform: translateY(-15px) rotate(6deg); }
    100% { transform: translateY(0) rotate(-3deg); }
}

@keyframes spiderZip {
    0% { transform: translate(0, 0) rotate(-3deg) scale(1); }
    30% { transform: translate(-16px, 46px) rotate(15deg) scale(0.94); }
    100% { transform: translate(56vw, -80vh) rotate(-60deg) scale(0.35); }
}

.impact-burst {
    position: absolute;
    z-index: 13;
    left: 50%;
    top: 39%;
    display: grid;
    place-items: center;
    width: 340px;
    height: 340px;
    margin-left: -170px;
    margin-top: -170px;
    background: #ffd83d;
    clip-path: polygon(50% 0, 60% 30%, 80% 8%, 75% 36%, 100% 32%, 79% 51%, 100% 70%, 73% 66%, 81% 96%, 55% 77%, 48% 100%, 42% 77%, 17% 97%, 26% 68%, 0 75%, 22% 49%, 0 33%, 31% 35%, 21% 8%, 42% 31%);
    opacity: 0;
    pointer-events: none;
    transform: scale(0) rotate(-35deg);
}

.impact-burst span {
    color: #ed4052;
    font-family: var(--font-display);
    font-size: 60px;
    -webkit-text-stroke: 2px #14121e;
    text-shadow: 4px 5px 0 #263fb2;
    transform: rotate(-14deg);
}

.intro.is-exit .impact-burst {
    animation: burstAppear 0.62s 0.24s both;
}

@keyframes burstAppear {
    0% { opacity: 1; transform: scale(0) rotate(-35deg); }
    35% { opacity: 1; transform: scale(1.3) rotate(6deg); }
    80% { opacity: 1; transform: scale(1) rotate(-6deg); }
    100% { opacity: 0; transform: scale(1.6) rotate(-5deg); }
}

.replay-intro {
    /* Lives inside the hero, so it never floats over other content. */
    position: absolute;
    z-index: 6;
    right: var(--gutter);
    bottom: 22px;
    padding: 10px 16px;
    background: var(--yellow);
    color: var(--ink);
    border: var(--border);
    box-shadow: 4px 4px 0 var(--stroke);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: opacity 0.15s, transform 0.15s;
}

.replay-intro:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--stroke);
}

html.intro-play .replay-intro {
    opacity: 0;
    pointer-events: none;
}

/* ---------- Responsive ---------- */

@media (min-width: 1300px) {
    .hero { min-height: 640px; }
}

@media (max-width: 1000px) {
    .projects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .read-layout {
        grid-template-columns: 1fr;
    }

    .side-stack,
    .credits {
        position: static;
    }

    .issue-hero {
        grid-template-columns: 1fr;
    }

    .issue-cover {
        max-width: 420px;
    }
}

@media (max-width: 860px) {
    .site-nav {
        height: 70px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 6px var(--gutter) 20px;
        background: var(--paper);
        border-bottom: var(--border);
        box-shadow: 0 8px 0 rgba(21, 20, 28, 0.08);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 14px 0;
        border-bottom: 1px dashed rgba(21, 20, 28, 0.3);
        font-size: 14px;
    }

    .nav-links a.is-active {
        color: var(--red);
        border-bottom-color: rgba(21, 20, 28, 0.3);
    }

    .nav-links .nav-cta {
        margin-top: 14px;
        text-align: center;
        transform: none;
    }

    .nav-links .nav-cta:hover {
        transform: translate(-1px, -1px);
    }

    .hero {
        grid-template-columns: 57% 43%;
        min-height: 560px;
        padding-top: 50px;
    }

    .hero-title {
        font-size: clamp(46px, 8vw, 72px);
    }

    .sticker.one { font-size: 15px; }
    .sticker.two { font-size: 17px; }

    .tally {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tally-cell:nth-child(2) {
        border-right: 0;
    }

    .tally-cell:nth-child(-n + 2) {
        border-bottom: var(--border);
    }

    .site-footer {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 590px) {
    .site-nav {
        height: 62px;
    }

    .logo-text { font-size: 16px; }
    .logo-small { font-size: 7.5px; }
    .mark { width: 30px; height: 30px; font-size: 15px; }

    .hero {
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 32px 20px 40px;
    }

    .hero-title {
        font-size: clamp(49px, 13.6vw, 70px);
        line-height: 0.98;
    }

    .hero-copy {
        max-width: 360px;
        font-size: 14px;
    }

    .hero-right {
        min-height: 295px;
        margin-top: 10px;
    }

    .illustration-wrap {
        max-width: 330px;
    }

    .sticker.one { right: 5%; }
    .sticker.two { left: 4%; }

    .byline { margin-top: 16px; }

    .ticker { font-size: 18px; }

    .tally-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 16px 18px;
    }

    .section,
    .page-hero,
    .post {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section {
        padding-top: 46px;
        padding-bottom: 50px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .now-bubble {
        padding: 22px 20px 18px;
        border-radius: 20px;
    }

    .projects {
        grid-template-columns: minmax(0, 1fr);
    }

    .paper-row {
        grid-template-columns: 1fr;
    }

    .paper-row .chips {
        grid-column: 1;
    }

    .strip {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .strip-day { font-size: 32px; }

    .strip-body {
        padding: 14px 14px 16px;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav-next {
        grid-column: auto;
        text-align: left;
    }

    .timeline::before { left: 21px; }

    .chapter {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 14px;
    }

    .chapter-marker {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }

    .chapter-panel { padding: 16px; }
    .chapter-panel h3 { font-size: 23px; }

    .prose { font-size: 16px; }

    .intro-text { bottom: 15%; }
    .intro-text .large { font-size: 33px; }

    .replay-intro {
        position: static;
        align-self: flex-start;
        margin-top: 18px;
        padding: 8px 12px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticker span { animation: none; }
    .project,
    .replay-intro { transition: none; }
}

/* v4 contact page: uses existing comic palette and form components. */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .85fr);
    align-items: start;
    gap: clamp(22px, 3vw, 46px);
}
.contact-panel { padding: clamp(20px, 3vw, 38px); }
.contact-panel h2, .contact-aside .panel-title { margin-top: 0; }
.contact-help { color: var(--muted); max-width: 58ch; font-size: 14px; margin-bottom: 22px; }
.contact-form { display: grid; gap: 20px; }
.contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .field { min-width: 0; }
.contact-form .btn { justify-self: start; }
.contact-word-counter { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.contact-word-counter.is-over-limit { color: var(--red-dark); }
.contact-form textarea.is-over-limit { border-color: var(--red-dark); }
.contact-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-success { padding: 14px 18px; margin-bottom: 20px; border: 2px solid #176341; background: #e1f7e8; }
.contact-success strong { font-family: var(--font-display); font-size: 24px; font-weight: normal; }
.contact-success p { margin: 2px 0 0; }
.contact-form .form-alert { border: 2px solid var(--red-dark); background: #ffe5e6; padding: 13px 17px; }
.contact-form .form-alert ul { margin: 6px 0 0; padding-left: 20px; }
.contact-aside { display: grid; gap: 22px; }
.contact-aside .btn { margin-top: 18px; }
.contact-email-link { display: block; font-weight: 900; font-size: 14px; overflow-wrap: anywhere; }
.contact-socials { display: grid; gap: 11px; }
.contact-socials a { font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.footer-email { display: block; width: fit-content; margin-top: 12px; font-weight: 800; font-size: 13px; overflow-wrap: anywhere; }

/* Photos on public logs and journey cards; never exceed their card dimensions. */
.strip:has(.strip-photo) { grid-template-columns: 96px minmax(0, 1fr) 180px; }
.strip-photo { display: block; width: 180px; min-height: 155px; border-left: var(--border); }
.strip-photo img { display: block; width: 100%; height: 100%; min-height: 155px; object-fit: cover; }
.post-cover { max-width: 920px; margin: 0 auto 24px; border: var(--border); box-shadow: var(--shadow); }
.post-cover img { display: block; width: 100%; max-height: 530px; object-fit: cover; }
.journey-photo { margin: 14px 0; max-width: 680px; border: var(--border); }
.journey-photo img { display: block; max-height: 410px; width: 100%; object-fit: cover; }
@media (max-width: 840px) {
    .contact-layout { grid-template-columns: minmax(0, 1fr); }
    .strip:has(.strip-photo) { grid-template-columns: 70px minmax(0, 1fr) 120px; }
    .strip-photo { width: 120px; }
}
@media (max-width: 540px) {
    .contact-fields { grid-template-columns: 1fr; }
    .strip:has(.strip-photo) { grid-template-columns: 70px minmax(0, 1fr); }
    .strip-photo { width: auto; grid-column: 2; border-left: 0; border-top: var(--border); }
    .strip-photo img { height: 135px; min-height: 0; }
}

/* The first approved green-shirt illustration occupies the entire right hero scene.
   Scoped to the homepage artwork; other site components and pages are unchanged. */
.hero-right-approved {
    justify-content: flex-end;
}

.hero-right-approved .approved-hero-scene {
    display: block;
    flex: 0 0 auto;
    width: calc(100% + clamp(50px, 11vw, 165px));
    max-width: none;
    height: auto;
    transform: translateX(22px);
}

@media (max-width: 860px) {
    .hero-right-approved .approved-hero-scene {
        width: calc(100% + clamp(26px, 8vw, 90px));
        transform: translateX(10px);
    }
}

@media (min-width: 591px) and (max-width: 1199px) {
    .hero-right-approved .approved-hero-scene {
        width: calc(100% + 30px);
        transform: translateX(30px);
    }
}

@media (max-width: 590px) {
    .hero-right-approved {
        justify-content: center;
        min-height: 0;
    }

    .hero-right-approved .approved-hero-scene {
        width: min(100%, 440px);
        transform: none;
    }
}

/* Visible path from a short excerpt to the full Markdown article. */
.strip-read-more { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.035em; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; color: var(--blue); }
.strip-read-more:hover { color: var(--red); }

/* Keep optional-abstract research entries well laid out without placeholder content. */
.read-layout.read-layout-no-abstract { grid-template-columns: minmax(0, 1fr); }
.read-layout-no-abstract .side-stack { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 22px; }


/* Content safety: long single words, pasted URLs and Markdown must stay inside their cards. */
.chapter, .chapter-panel, .edu, .post, .post-head, .post-body, .post-nav,
.post-nav-link, .contact-panel, .contact-layout > *, .contact-form,
.chapter-summary, .ticks, .ticks li, .strip-body, .strip-title, .message-body {
    min-width: 0;
    max-width: 100%;
}
.chapter-panel, .edu, .chapter-summary, .ticks li, .post-body, .post-title,
.post-nav-link, .strip-body, .contact-help {
    overflow-wrap: anywhere;
}
/* Detail photos display the entire portrait or landscape image without cropping. */
.post-cover, .journey-photo {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    background: var(--paper);
}
.post-cover img, .journey-photo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(78vh, 860px);
    margin-inline: auto;
    object-fit: contain;
}
/* Thumbnails intentionally remain cover-cropped; full post photos never are. */
.contact-feedback {
    margin: 0;
    padding: 12px 14px;
    border: 2px solid var(--stroke);
    background: var(--paper-deep);
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 700;
}
.contact-feedback.is-success { border-color: #176341; background: #e1f7e8; }
.contact-feedback.is-error { border-color: var(--red-dark); background: #ffe5e6; }

/* The optional CV download is separate from the About-page facts. */
.cv-download { display: grid; gap: 10px; justify-items: start; }
.cv-note { color: #5c5865; font-size: .84rem; line-height: 1.5; max-width: 34ch; margin: 0; }
