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

:root {
    --primary: #2563eb;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #000000;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
}

body {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #000000;
    background: var(--bg);
}

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

.section-content a,
.intro a,
.section-intro a {
    background: #000000;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
}

main {
    background: #f9fafb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    border-bottom: 2px solid var(--border);
    padding: 1.5rem 0;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    text-transform: uppercase;
}

.cta-btn {
    background: #000000;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}

/* Hero */
.hero {
    padding: 0.5rem 0;
    background: var(--bg-alt);
}

.hero-container {
    padding-bottom: 2rem;
}

.hero-heading-mobile {
    display: none;
}

.hero-heading-desktop {
    display: block;
}

.hero-columns {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.hero-left {
    flex: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 300px;
    height: 300px;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 8px;
    background: white;
}

.hero .intro {
    font-size: 1.2rem;
    color: #000000;
    margin-bottom: 2rem;
}

.hero .social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero .social-links a {
    background: #000000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}



/* Active Projects */
.active-projects {
    padding: 0.5rem 0;
}

.active-projects h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 4px solid #000;
    display: inline-block;
    padding-bottom: 0;
}

.section-intro {
    font-size: 1.1rem;
    color: #000000;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.section-content {
    line-height: 1.6;
}

.section-content ul,
.section-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

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

.projects-list {
    display: grid;
    gap: 2rem;
}

.project-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-item h3 a {
    text-decoration: none;
    color: var(--text);
}

.project-item h3 a:hover {
    color: var(--primary);
}

.project-item p {
    color: #666;
}

/* Featured */
.featured {
    padding: 0.5rem 0;
}

.featured h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 4px solid #000;
    display: inline-block;
    padding-bottom: 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.featured-card {
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 1.5rem;
}

.featured-card .tag {
    display: inline-block;
    background: #000000;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.featured-card .tag:hover {
    background: #333333;
}

.featured-card time {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.featured-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.featured-card h3 a {
    text-decoration: none;
    color: var(--text);
}

.featured-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.featured-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.featured-card .read-more {
    background: #000000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

/* Latest */
.latest {
    padding: 0.5rem 0;
    background: var(--bg-alt);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    border-bottom: 4px solid #000;
    display: inline-block;
    padding-bottom: 0;
}

.see-all {
    background: #000000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--bg);
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 1.5rem;
}

.article-card .tag {
    display: inline-block;
    background: #000000;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.article-card .tag:hover {
    background: #333333;
}

.article-card time {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.article-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.article-card h3 a {
    text-decoration: none;
    color: var(--text);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.article-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.article-card .read-more {
    background: #000000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

/* AWS News Section */
.aws-news {
    padding: 0.5rem 0;
}

.aws-news h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 4px solid #000;
    display: inline-block;
    padding-bottom: 0;
}

/* Articles Section */
.articles-section {
    padding: 0.5rem 0;
    background: var(--bg-alt);
}

.articles-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 4px solid #000;
    display: inline-block;
    padding-bottom: 0;
}

/* Newsletter CTA */
.newsletter-cta {
    background: #000;
    color: white;
    padding: 1rem 0;
}

.newsletter-cta h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.newsletter-cta p {
    margin-bottom: 1.5rem;
}

.newsletter-cta label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.newsletter-cta input[type="email"] {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.newsletter-cta input[type="submit"] {
    background: white;
    color: #000000;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
}

.newsletter-cta .cta-btn {
    background: white;
    color: #000;
}

/* Article Single */
.article-single {
    padding: 4rem 0;
    background: #f5f5f7;
}

.article-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.article-header {
    text-align: center;
    margin-bottom: 4rem;
}

.article-header .meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-header .category {
    color: #6e6e73;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.article-header time {
    color: #6e6e73;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.article-header h1 {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.article-header .lead {
    font-size: 1.5rem;
    line-height: 1.4;
    color: #1d1d1f;
    font-weight: 400;
    max-width: 800px;
    margin: 0 auto;
}

.article-tags-header {
    margin-top: 1.5rem;
    text-align: center;
}

.article-tags-header a {
    display: inline-block;
    background: #000000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    margin: 0.25rem;
    font-size: 0.875rem;
}

.article-tags-header a:hover {
    background: #333333;
}

.article-layout {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.toc {
    flex-shrink: 0;
    width: 250px;
}

.toc details {
    background: #f9fafb;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1rem;
}

.toc summary {
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 1rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc summary::-webkit-details-marker {
    display: none;
}

.toc summary::before {
    content: "☰";
    font-size: 1.5rem;
    line-height: 1;
}

.toc details[open] summary::before {
    content: "✕";
}

.toc nav ul {
    list-style: none;
    padding-left: 0;
}

.toc nav ul ul {
    padding-left: 1rem;
}

.toc nav a {
    color: #000;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.toc nav a:hover {
    text-decoration: underline;
}

.article-content {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #1d1d1f;
    max-width: 692px;
    margin: 0 auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.demo-content {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #1d1d1f;
    max-width: 100%;
    margin: 0 auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #000000;
    letter-spacing: -0.01em;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #000000;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content a {
    background: #000;
    color: #fff;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
}

.article-content a:hover {
    opacity: 0.8;
}

.article-content code {
    background: #e8e8ed;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'SF Mono', Monaco, monospace;
}

.article-content pre {
    background: #1d1d1f;
    color: #f5f5f7;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    max-width: 100%;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    white-space: pre;
    word-wrap: normal;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 3rem auto;
    border: 2px solid #000;
    padding: 8px;
    background: white;
    display: block;
}

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

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

.article-tags {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #d2d2d7;
    text-align: center;
}

.article-tags a {
    display: inline-block;
    background: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    color: #1d1d1f;
    margin: 0.25rem;
    font-size: 0.875rem;
    border: 1px solid #d2d2d7;
}

.article-tags a:hover {
    background: #f5f5f7;
}

/* Article Footer */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #000;
}

.member-cta {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

.member-cta a {
    background: #000000;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
}

.member-cta a:hover {
    background: #333333;
}

.article-newsletter {
    background: #000;
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-newsletter h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
}

.article-newsletter p {
    margin-bottom: 1rem;
}

.article-newsletter label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.article-newsletter input[type="email"] {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.article-newsletter input[type="submit"] {
    background: white;
    color: #000000;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
}

/* Page */
.page {
    padding: 4rem 0;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
}

.content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.content p {
    margin-bottom: 1.5rem;
}

.content h2 {
    margin-top: 2rem;
    border-bottom: 3px solid #000;
}

.content ul {
    padding-left: 2rem;
}

.content img {
    max-width: 100%;
    height: auto;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 8px;
    background: white;
    margin: 2rem auto;
    display: block;
}

/* Footer */
.site-footer {
    background: var(--text);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-col h3 {
    margin-bottom: 1rem;
}

.footer-col h4 {
    margin-bottom: 0.5rem;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .header-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-heading-mobile {
        display: block;
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-heading-desktop {
        display: none;
    }
    
    .hero-columns {
        flex-direction: column;
    }
    
    .hero-image {
        align-self: center;
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    .hero-image img {
        width: 100%;
        height: auto;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-header .lead {
        font-size: 1.25rem;
    }
    
    .article-content {
        font-size: 1.125rem;
        max-width: 100%;
        padding: 0 1rem;
    }

    .article-content pre {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }

    .article-layout {
        flex-direction: column;
    }

    .toc {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .toc details {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .toc details[open] {
        max-height: 80vh;
        overflow-y: auto;
    }

    .article-content {
        margin-top: 60px;
    }
}

@media (min-width: 769px) {
    .toc {
        position: sticky;
        top: 2rem;
        align-self: flex-start;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-image img {
        width: 220px;
        height: 220px;
    }
}
