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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0b;
    color: #e4e4e7;
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Avatar ring (shared between homepage and blog header) */
.avatar-ring {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.avatar-ring::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a5f 50%, #27272a 100%);
    z-index: 0;
}

.avatar-ring-inner {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.avatar-ring-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 70%;
    display: block;
}

/* Header */
.site-header {
    border-bottom: 1px solid #27272a;
    padding: 1rem 2rem;
}

.site-header nav {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (min-width: 1100px) {
    .site-header nav {
        max-width: 960px;
    }
}

.site-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: #e4e4e7;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-title:hover {
    text-decoration: none;
    color: #3b82f6;
}

.nav-links a {
    margin-left: 1.5rem;
    color: #a1a1aa;
}

.nav-links a:hover {
    color: #e4e4e7;
}

/* Main content */
main {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* On wide screens, give blog posts extra room for margin annotations */
@media (min-width: 1100px) {
    main.main--blog {
        max-width: 960px;
    }

    .blog-post header,
    .blog-post .content {
        max-width: 720px;
    }
}

/* Blog list */
.blog-list h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.post-list {
    list-style: none;
}

.post-list li {
    padding: 1rem 0;
    border-bottom: 1px solid #1f1f23;
    display: flex;
    gap: 1.5rem;
    align-items: baseline;
}

.post-list time {
    color: #52525b;
    font-size: 0.875rem;
    flex-shrink: 0;
    width: 100px;
}

.post-list a {
    font-weight: 500;
}

.empty {
    color: #71717a;
}

/* Blog post */
.blog-post header {
    margin-bottom: 2rem;
}

.blog-post h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-post time {
    color: #71717a;
    font-size: 0.9375rem;
}

.blog-post .content {
    font-size: 1.0625rem;
}

.blog-post .content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.blog-post .content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

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

.blog-post .content ul,
.blog-post .content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

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

.blog-post .content blockquote {
    border-left: 3px solid #3b82f6;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #a1a1aa;
    font-style: italic;
}

.blog-post .content code {
    background: #18181b;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.blog-post .content pre {
    background: #18181b;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.blog-post .content pre code {
    background: none;
    padding: 0;
}

.blog-post .content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Page */
.page h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.page .content p {
    margin-bottom: 1.25rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid #27272a;
    padding: 2rem;
    text-align: center;
    color: #52525b;
    font-size: 0.875rem;
}

/* Tags */
.tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: #1f1f23;
    border-radius: 4px;
    color: #a1a1aa;
}

.tag:hover {
    background: #27272a;
    color: #3b82f6;
    text-decoration: none;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: #71717a;
    font-size: 0.9375rem;
}

.post-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.post-info .tags {
    margin-top: 0.25rem;
}

/* Taxonomy pages */
.taxonomy-list h1,
.taxonomy-posts h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.tag-cloud {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-cloud li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-cloud a {
    font-size: 1rem;
    padding: 0.4rem 0.75rem;
    background: #1f1f23;
    border-radius: 6px;
    color: #e4e4e7;
}

.tag-cloud a:hover {
    background: #27272a;
    text-decoration: none;
}

.tag-cloud .count {
    font-size: 0.75rem;
    color: #52525b;
}

.back-link {
    margin-top: 2rem;
}

@media (max-width: 600px) {
    .site-header {
        padding: 1rem;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    .post-list li {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .post-list time {
        width: auto;
    }
}

/* Highlighted text with attribution */
.highlight-attributed {
    display: inline;
}

.highlight-attributed .highlight-by {
    display: inline;
    font-size: 0.75rem;
    color: #52525b;
    margin-left: 0.5em;
    pointer-events: none;
    white-space: nowrap;
}

/* On wide screens, pull attribution into the right margin */
@media (min-width: 1100px) {
    .highlight-attributed .highlight-by {
        display: block;
        float: right;
        clear: right;
        width: 9rem;
        margin-right: -11rem;
        margin-left: 0;
        margin-top: -1.4em;
        font-size: 0.75rem;
        line-height: 1.4;
        color: #52525b;
        text-align: left;
    }
}

/* Medium claps - subtle */
.medium-claps {
    font-size: 0.8125rem;
    color: #52525b;
    letter-spacing: 0.01em;
}

/* Post subtitle (Medium-style deck) */
.post-subtitle {
    font-size: 1.25rem;
    color: #a1a1aa;
    line-height: 1.5;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Hero figure */
.post-hero-figure {
    margin: 0 0 2rem;
}

.post-hero-figure img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.post-hero-figure figcaption,
.video-figure figcaption {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #71717a;
    text-align: center;
}

/* Drop caps */
.dropcap {
    float: left;
    font-size: 3.75rem;
    line-height: 0.8;
    font-weight: 600;
    margin-right: 0.08em;
    margin-top: 0.05em;
    color: #e4e4e7;
}

/* Highlighted text (mark) */
.blog-post .content mark {
    background: rgba(234, 179, 8, 0.18);
    color: #fde68a;
    border-radius: 2px;
    padding: 0 0.1em;
}

/* Responsive video embed */
.video-figure {
    margin: 2rem 0;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #111;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Medium syndication notice */
.medium-syndication {
    margin: 2rem 0;
    padding: 0.75rem 1rem;
    border: 1px solid #27272a;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #71717a;
}

.medium-syndication a {
    color: #71717a;
    text-decoration: underline;
}

/* Responses section */
.medium-responses {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #27272a;
}

.responses-heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.responses-count {
    font-size: 0.875rem;
    font-weight: 400;
    color: #71717a;
    background: #1f1f23;
    padding: 0.1em 0.5em;
    border-radius: 999px;
}

.response-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.response {
    border-bottom: 1px solid #1f1f23;
    padding-bottom: 1.5rem;
}

.response:last-child {
    border-bottom: none;
}

.response-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.response-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.response-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.response-author {
    font-weight: 500;
    font-size: 0.9375rem;
    color: #e4e4e7;
}

.response-date {
    font-size: 0.8125rem;
    color: #71717a;
}

.response-claps {
    font-size: 0.8125rem;
    color: #52525b;
    margin-left: auto;
    white-space: nowrap;
}

.response-body {
    font-size: 0.9375rem;
    color: #a1a1aa;
    margin-bottom: 0;
}

.response-link-card {
    margin-top: 0.75rem;
}

.response-link-card a {
    display: block;
    padding: 0.75rem 1rem;
    border: 1px solid #27272a;
    border-radius: 6px;
    color: #a1a1aa;
    text-decoration: none;
}

.response-link-card a:hover {
    border-color: #3f3f46;
    background: #111;
}

.response-link-card strong {
    display: block;
    color: #e4e4e7;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.response-link-card span {
    display: block;
    font-size: 0.8125rem;
    color: #71717a;
    line-height: 1.4;
}

.response-link-domain {
    margin-top: 0.25rem;
    color: #52525b !important;
    font-size: 0.75rem !important;
}
