/* Shared Blog Styles - Matches main site aesthetic */

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

body {
    font: -apple-system-body;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1a;
    max-width: 580px;
    margin: 0 auto;
    padding: 80px 24px;
    background-color: #f4f1ea;
}

/* Navigation */
nav {
    margin-bottom: 80px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

nav a {
    color: #8e8e93;
    text-decoration: none;
    font-size: 14px;
    transition: color .15s;
}

nav a.active,
nav a:hover {
    color: #000;
}

/* Blog Content */
article {
    margin-bottom: 80px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1a1a1a;
    line-height: 1.3;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 48px 0 16px;
    color: #1a1a1a;
}

h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 32px 0 12px;
    color: #1a1a1a;
}

h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #1a1a1a;
}

p {
    margin-bottom: 16px;
    color: #1a1a1a;
}

/* Highlight effect */
.highlight {
    position: relative;
    padding: 2px 4px;
    background: linear-gradient(180deg, transparent 60%, rgba(255, 235, 59, 0.5) 60%);
}

/* Links */
a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #d1d1d6;
    transition: border-color .15s;
}

a:hover {
    border-bottom-color: #000;
}

/* Lists */
ul, ol {
    margin: 16px 0 16px 24px;
    padding-left: 0;
}

ul {
    list-style: none;
}

ul li {
    margin-bottom: 8px;
    color: #1a1a1a;
    padding-left: 0;
}

ul li::before {
    content: '♠ ';
    color: #1a1a1a;
    font-weight: bold;
    margin-right: 8px;
}

ol li {
    margin-bottom: 8px;
    color: #1a1a1a;
}

/* Code blocks */
pre {
    background-color: #f5f5f7;
    border: 1px solid #d1d1d6;
    border-radius: 6px;
    padding: 16px;
    margin: 24px 0;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 13px;
    background-color: #f5f5f7;
    padding: 2px 6px;
    border-radius: 3px;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

th {
    background-color: #f5f5f7;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #d1d1d6;
}

td {
    padding: 12px;
    border-bottom: 1px solid #f5f5f7;
}

tr:last-child td {
    border-bottom: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 24px 0;
    border-radius: 0px;
    cursor: pointer;
    transition: opacity 0.2s;
}

img:hover {
    opacity: 0.8;
}

/* Videos */
video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 24px auto;
    border-radius: 6px;
    border: 1px solid #d1d1d6;
}

/* Expanded image overlay */
.img-expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.2s;
}

.img-expanded img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 0;
    cursor: zoom-out;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Blockquotes */
blockquote {
    border-left: 3px solid #d1d1d6;
    padding-left: 16px;
    margin: 24px 0;
    color: #8e8e93;
    font-style: italic;
}

/* Horizontal rule */
hr {
    border: none;
    border-top: 1px solid #d1d1d6;
    margin: 48px 0;
}

/* Footer/End marker */
.end-marker {
    text-align: center;
    margin-top: 80px;
    padding-top: 24px;
    border-top: 1px solid #d1d1d6;
    color: #8e8e93;
    font-size: 13px;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 32px;
    color: #8e8e93;
    text-decoration: none;
    font-size: 14px;
    border-bottom: none;
    transition: color .15s;
}

.back-link:hover {
    color: #000;
}

.back-link::before {
    content: '← ';
}

/* Metadata */
.post-meta {
    color: #8e8e93;
    font-size: 13px;
    margin-bottom: 32px;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 60px 20px;
    }
    
    nav {
        margin-bottom: 60px;
    }
    
    nav ul {
        gap: 24px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    pre {
        padding: 12px;
        font-size: 12px;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 8px;
    }
}