* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #333;
    --light-gray: #ecf0f1;
    --border-color: #ddd;
    --max-width: 800px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

main {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 2rem;
}

.header-art {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-art img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: 50% 30%;
    max-height: 400px;
}

.art-caption {
    text-align: right;
    font-size: 0.8rem;
    font-style: italic;
    color: #999;
    margin: -1.5rem 0.25rem 2rem 0;
}

.hero {
    background: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.location {
    color: #666;
}

.bio, .patents, .links, .blog-header, .blog-posts, .company {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.bio h2, .patents h2, .links h2, .blog-header h1, .company h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.company-tagline {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.company p {
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.service-item {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.service-item i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.service-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.service-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.service-item.retired {
    position: relative;
    opacity: 0.72;
}

.service-item.retired:hover {
    opacity: 1;
}

.retired-tag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #bbb;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.service-link {
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.service-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--secondary-color);
}

.company-contact {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.company-contact a {
    color: var(--secondary-color);
    text-decoration: none;
}

.company-contact a:hover {
    text-decoration: underline;
}

.bio h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.bio p {
    margin-bottom: 1rem;
}

.additional-links .patent-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.additional-links .patent-list li {
    margin-bottom: 0.75rem;
}

.additional-links .patent-list li:last-child {
    margin-bottom: 0;
}

.additional-links .patent-list a {
    color: var(--secondary-color);
    text-decoration: none;
    display: block;
    margin-bottom: 0.25rem;
}

.additional-links .patent-list a:hover {
    text-decoration: underline;
}

.additional-links .patent-list i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.patent-number {
    color: #666;
    font-size: 0.85rem;
    display: block;
    margin-left: 2rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.link-card {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.link-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.link-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.link-card p {
    color: #666;
    font-size: 0.9rem;
}

.calendar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.additional-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.additional-links h2, .additional-links h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.additional-links h3 {
    margin-top: 2rem;
    font-size: 1.3rem;
}

.social-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.social-list li {
    margin: 0;
}

.social-list a {
    display: block;
    padding: 1rem;
    background: var(--light-gray);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.social-list a:hover {
    background: var(--secondary-color);
    color: white;
}

.social-list i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.blog-header p {
    color: #666;
    font-size: 1.1rem;
}

.post-preview {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.post-preview:last-child {
    border-bottom: none;
}

.post-preview h2 {
    margin-bottom: 0.5rem;
}

.post-preview h2 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-preview h2 a:hover {
    color: var(--secondary-color);
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    margin-bottom: 1rem;
}

.read-more {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

.blog-post {
    background: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.post-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.post-content {
    margin-bottom: 2rem;
}

.post-content h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

.post-footer a:hover {
    text-decoration: underline;
}

.education {
    max-width: var(--max-width);
    margin: 3rem auto 2rem;
    padding: 0 2rem;
}

.education-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.edu-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.edu-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.edu-badge i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.edu-badge span {
    font-weight: 500;
    white-space: nowrap;
}

footer {
    text-align: center;
    padding: 2rem;
    color: white;
}

/* Writing archive */
.nav-links a[aria-current="page"] {
    color: var(--secondary-color);
    font-weight: 600;
}

.blog-main,
.article-main {
    max-width: 920px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.blog-intro,
.article-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.blog-intro {
    padding: clamp(2rem, 7vw, 4.5rem);
    margin-bottom: 2rem;
}

.eyebrow {
    color: var(--secondary-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 0.9rem;
    text-transform: uppercase;
}

.eyebrow a {
    color: inherit;
    text-decoration: none;
}

.blog-intro h1 {
    color: var(--primary-color);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.25rem, 6vw, 4rem);
    line-height: 1.04;
    margin-bottom: 1rem;
    max-width: 14ch;
}

.blog-intro > p:not(.eyebrow) {
    color: #59636d;
    font-size: 1.1rem;
    max-width: 58ch;
}

.feed-link {
    color: var(--secondary-color);
    display: inline-block;
    font-size: 0.9rem;
    margin-top: 1.25rem;
    text-decoration: none;
}

.post-list {
    display: grid;
    gap: 1.25rem;
}

.post-preview {
    align-items: stretch;
    background: white;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 3fr);
    overflow: hidden;
    padding: 0;
}

.post-preview:not(:has(.post-preview-image)) {
    grid-template-columns: 1fr;
}

.post-preview > .post-preview-copy:only-child {
    grid-column: 1 / -1;
}

.post-preview-image {
    background: var(--light-gray);
    display: block;
    min-height: 230px;
    overflow: hidden;
}

.post-preview-image img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    width: 100%;
}

.post-preview-image:hover img {
    transform: scale(1.025);
}

.post-preview-copy {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.post-preview time,
.article-meta {
    color: #71808d;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

.post-preview h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.15;
    margin: 0.45rem 0 0.75rem;
}

.post-preview-copy > p {
    color: #59636d;
    margin-bottom: 1rem;
}

.article-card {
    overflow: hidden;
}

.article-header {
    border-bottom: 1px solid var(--border-color);
    padding: clamp(2rem, 7vw, 5rem) clamp(1.5rem, 7vw, 5rem) clamp(2rem, 5vw, 3.5rem);
}

.article-header h1 {
    color: var(--primary-color);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.2rem, 6vw, 4.4rem);
    line-height: 1.03;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.article-subtitle {
    color: #59636d;
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    margin-bottom: 1.25rem;
}

.article-meta {
    align-items: center;
    display: flex;
    gap: 0.65rem;
}

.article-content {
    color: #28323b;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.03rem, 2vw, 1.14rem);
    line-height: 1.75;
    padding: clamp(2rem, 7vw, 5rem);
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content figure,
.article-content .youtube-wrap {
    margin-bottom: 1.45rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--primary-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.2;
    margin: 2.4rem 0 1rem;
}

.article-content h2 {
    font-size: 1.7rem;
}

.article-content h3 {
    font-size: 1.3rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.55rem;
}

.article-content a {
    color: #1976b9;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.15em;
}

.article-content img {
    border-radius: 6px;
    display: block;
    height: auto;
    max-width: 100%;
}

.article-content figure {
    margin-left: 0;
    margin-right: 0;
}

.article-content figcaption,
.article-content .image-caption {
    color: #71808d;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.82rem;
    line-height: 1.45;
    margin-top: 0.65rem;
}

.article-content blockquote {
    border-left: 4px solid var(--secondary-color);
    color: #4d5964;
    font-style: italic;
    padding: 0.25rem 0 0.25rem 1.25rem;
}

.article-content blockquote footer {
    color: #71808d;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    padding: 0.75rem 0 0;
    text-align: left;
}

.article-content .youtube-inner,
.article-content .youtube-wrap {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.article-content iframe {
    border: 0;
    height: 100%;
    max-width: 100%;
    width: 100%;
}

.article-content table {
    border-collapse: collapse;
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.article-content th,
.article-content td {
    border: 1px solid var(--border-color);
    padding: 0.65rem;
}

.article-pagination {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 1.25rem;
}

.article-nav-link {
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    text-decoration: none;
}

.article-nav-link span {
    color: #71808d;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.article-nav-link.older {
    text-align: right;
}

.back-to-writing {
    margin-top: 1.25rem;
    text-align: center;
}

.back-to-writing a {
    color: white;
    text-decoration: none;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .social-list {
        grid-template-columns: 1fr;
    }

    .education-badges {
        flex-direction: column;
        align-items: center;
    }

    .edu-badge {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .blog-main,
    .article-main {
        padding: 0 1rem;
    }

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

    .post-preview-image {
        max-height: 280px;
    }

    .article-pagination {
        grid-template-columns: 1fr;
    }
}

/* Editorial writing layout */
.blog-body {
    --ink: #1f2328;
    --muted-ink: #697078;
    --paper: #f7f5f0;
    --rule: #d9d5cc;
    background: var(--paper);
    color: var(--ink);
}

.blog-body nav {
    background: rgba(247, 245, 240, 0.94);
    border-bottom: 1px solid var(--rule);
    box-shadow: none;
    padding: 1.15rem 0;
    position: relative;
}

.blog-body .nav-container {
    max-width: 1120px;
}

.blog-body .logo {
    color: var(--ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.blog-body .nav-links a {
    color: var(--muted-ink);
    font-size: 0.9rem;
}

.blog-body .nav-links a[aria-current="page"] {
    color: var(--ink);
}

.article-main {
    max-width: none;
    margin: 0;
    padding: 0;
}

.article-card,
.article-header,
.article-content {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.article-card {
    overflow: visible;
}

.article-header {
    margin: 0 auto;
    max-width: 850px;
    padding: clamp(4rem, 10vw, 7.5rem) 1.5rem clamp(2.75rem, 6vw, 4.5rem);
}

.article-header .eyebrow {
    color: #8b4b34;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    margin-bottom: 1.35rem;
}

.article-header h1 {
    color: var(--ink);
    font-size: clamp(2.8rem, 7.4vw, 5.5rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.98;
    margin: 0;
    max-width: 14ch;
}

.article-subtitle {
    color: #555c63;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    line-height: 1.45;
    margin: 1.75rem 0 0;
    max-width: 40em;
}

.article-byline {
    align-items: center;
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    gap: 0.8rem;
    margin-top: 2rem;
}

.author-mark {
    align-items: center;
    background: var(--ink);
    border-radius: 50%;
    color: var(--paper);
    display: inline-flex;
    flex: 0 0 2.5rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.78rem;
    height: 2.5rem;
    justify-content: center;
}

.article-byline p {
    color: var(--ink);
    display: flex;
    flex-direction: column;
    font-size: 0.86rem;
    line-height: 1.35;
}

.article-byline span:not(.author-mark) {
    color: var(--muted-ink);
    font-size: 0.78rem;
}

.article-lead-media {
    margin: 0 auto clamp(2.5rem, 6vw, 5rem);
    max-width: 1120px;
    padding: 0 1.5rem;
}

.article-lead-media a {
    display: block;
}

.article-lead-media img {
    background: #ebe7de;
    display: block;
    height: auto;
    max-height: 760px;
    object-fit: contain;
    width: 100%;
}

.article-lead-media figcaption,
.article-lead-media .image-caption {
    color: var(--muted-ink);
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0.65rem auto 0;
    max-width: 850px;
}

.article-content {
    color: #282723;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.08rem, 1.6vw, 1.22rem);
    line-height: 1.78;
    margin: 0 auto;
    max-width: 730px;
    padding: 0 1.5rem clamp(5rem, 10vw, 8rem);
}

.article-content > p:first-child {
    font-size: 1.12em;
    line-height: 1.68;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content figure,
.article-content .youtube-wrap {
    margin-bottom: 1.65rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.16;
}

.article-content h2 {
    font-size: clamp(1.65rem, 3.5vw, 2.15rem);
    margin: 3.75rem 0 1.2rem;
}

.article-content h3,
.article-content h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin: 2.75rem 0 1rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.35rem;
}

.article-content li {
    margin-bottom: 0.7rem;
    padding-left: 0.25rem;
}

.article-content a {
    color: #8b4b34;
    text-decoration-color: rgba(139, 75, 52, 0.45);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

.article-content figure,
.article-content .youtube-wrap {
    left: 50%;
    margin-bottom: 2.5rem;
    margin-top: 2.5rem;
    max-width: calc(100vw - 2rem);
    position: relative;
    transform: translateX(-50%);
    width: 920px;
}

.article-content figure a,
.article-content figure img {
    display: block;
    width: 100%;
}

.article-content figure img {
    background: #ebe7de;
    border-radius: 0;
    height: auto;
    max-height: 760px;
    object-fit: contain;
}

.article-content figcaption,
.article-content .image-caption {
    color: var(--muted-ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0.7rem auto 0;
    max-width: 730px;
    padding: 0 1rem;
}

.article-content blockquote {
    border-left: 0;
    color: #45433e;
    font-size: 1.18em;
    font-style: italic;
    margin: 2.75rem 0;
    padding: 0 0 0 2rem;
    position: relative;
}

.article-content blockquote::before {
    color: #c5b7a4;
    content: '“';
    font-size: 4rem;
    left: -0.15rem;
    line-height: 1;
    position: absolute;
    top: -0.4rem;
}

.article-content blockquote footer {
    color: var(--muted-ink);
    font-size: 0.78rem;
}

.article-content hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 3.5rem 0;
}

.article-content .source-link {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.82rem;
    margin-top: -0.75rem;
    overflow-wrap: anywhere;
}

.article-content .youtube-wrap,
.article-content .youtube-inner {
    aspect-ratio: 16 / 9;
}

.article-content iframe {
    height: 100%;
    width: 100%;
}

.article-card-short .article-content {
    min-height: 32vh;
}

.article-pagination {
    border-bottom: 1px solid var(--rule);
    border-top: 1px solid var(--rule);
    gap: 0;
    margin: 0 auto;
    max-width: 920px;
}

.article-nav-link {
    background: transparent;
    border-radius: 0;
    color: var(--ink);
    min-height: 8rem;
    padding: 1.75rem;
    justify-content: center;
}

.article-nav-link + .article-nav-link {
    border-left: 1px solid var(--rule);
}

.article-nav-link span {
    color: var(--muted-ink);
}

.back-to-writing {
    margin: 2rem 0 5rem;
}

.back-to-writing a {
    color: var(--ink);
    font-size: 0.86rem;
}

.blog-body > footer {
    color: var(--muted-ink);
}

.blog-main {
    max-width: 1120px;
    padding: 0 2rem;
}

.blog-intro {
    background: transparent;
    box-shadow: none;
    margin: 0;
    padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem);
}

.blog-intro h1 {
    color: var(--ink);
    font-weight: 500;
    letter-spacing: -0.045em;
    max-width: 12ch;
}

.blog-intro > p:not(.eyebrow) {
    color: var(--muted-ink);
}

.post-list {
    border-top: 1px solid var(--rule);
    display: block;
}

.post-preview,
.post-preview:last-child {
    background: transparent;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
    gap: clamp(1.5rem, 5vw, 4rem);
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.6fr);
    padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.post-preview-image {
    align-self: start;
    background: #ebe7de;
    min-height: 0;
}

.post-preview-image img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.post-preview-copy {
    align-self: center;
    padding: 0;
}

.post-preview time {
    color: var(--muted-ink);
}

.post-preview h2 {
    font-size: clamp(1.75rem, 4vw, 2.65rem);
    font-weight: 500;
    letter-spacing: -0.035em;
}

.post-preview-copy > p {
    color: var(--muted-ink);
    max-width: 52ch;
}

@media (max-width: 720px) {
    .blog-body nav {
        padding: 0.85rem 0;
    }

    .blog-body .nav-container {
        flex-direction: row;
        padding: 0 1.25rem;
    }

    .blog-body .nav-links {
        gap: 1.25rem;
    }

    .article-header {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .article-header h1 {
        font-size: clamp(2.65rem, 13vw, 4.25rem);
    }

    .article-content {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .article-lead-media {
        padding: 0;
    }

    .article-pagination {
        grid-template-columns: 1fr;
        margin: 0 1.25rem;
    }

    .article-nav-link + .article-nav-link {
        border-left: 0;
        border-top: 1px solid var(--rule);
    }

    .article-nav-link.older {
        text-align: left;
    }

    .blog-main {
        padding: 0 1.25rem;
    }

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

    .post-preview-image {
        max-height: none;
    }
}

/* Subscriber paywall */
.paywall {
    background: #fff;
    border: 1px solid var(--rule);
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0 auto clamp(4rem, 8vw, 6rem);
    padding: 1.5rem 1.6rem;
    width: min(730px, calc(100% - 3rem));
}

body:not(.paywall-open) #paywall-content {
    padding-bottom: 1.5rem;
}

body:not(.paywall-open) #paywall-content:empty {
    min-height: 0;
    padding-bottom: 0;
}

.paywall .eyebrow {
    margin-bottom: 0.5rem;
}

.paywall p,
.paywall-notice p {
    line-height: 1.6;
    margin: 0 0 0.9rem;
}

.paywall-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.paywall-form label {
    color: var(--muted-ink);
    flex-basis: 100%;
    font-size: 0.9rem;
}

.paywall-form input {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    color: var(--ink);
    flex: 1 1 16rem;
    font: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95rem;
    padding: 0.55rem 0.7rem;
}

.paywall-form button {
    background: var(--primary-color);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
}

.paywall-form button:hover {
    background: var(--secondary-color);
}

.paywall-status {
    color: var(--muted-ink);
    font-size: 0.9rem;
    margin: 0.6rem 0 0;
}

.paywall-status.error {
    color: #b3261e;
}

.paywall-status:empty {
    display: none;
}

.paywall-notice {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 8px;
    font-size: 0.95rem;
    margin-top: 1.25rem;
    padding: 1rem 1.2rem;
}

.paywall-tag {
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--muted-ink);
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-left: 0.5rem;
    padding: 0.1rem 0.55rem;
    text-transform: uppercase;
    vertical-align: middle;
}

.paywall-unlocked {
    border-top: 1px solid var(--rule);
    color: var(--muted-ink);
    font-size: 0.9rem;
    margin: 1.5rem 0 0;
    padding-top: 1rem;
}

.paywall-unlocked a {
    color: inherit;
}

body.paywall-open .paywall-tag {
    display: none;
}

.article-card .paywall-unlocked {
    box-sizing: border-box;
    margin: 0 auto clamp(3rem, 6vw, 5rem);
    width: min(730px, calc(100% - 3rem));
}
