/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin: 1rem 0;
}

/* Compact project links */
p strong a {
    display: block;
    line-height: 1.6;
}

p:has(strong a) {
    margin: 0;
    line-height: 1.6;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.home-link {
    font-weight: 500;
    font-size: 1.1rem;
    color: #000;
}

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

.nav-links a {
    color: #666;
    font-size: 0.95rem;
}

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

/* Content */
article {
    margin-bottom: 3rem;
}

article header {
    margin-bottom: 2rem;
}

article header h1 {
    margin: 0 0 0.5rem 0;
    border: none;
    padding: 0;
}

time {
    color: #666;
    font-size: 0.9rem;
}

.content {
    max-width: none;
}

/* About page layout */
.about-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin: 2rem 0;
}

.about-text {
    flex: 2;
}

.about-image {
    flex: 1;
    max-width: 300px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0;
}

/* Lists */
ul, ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

li {
    margin: 0.5rem 0;
}

/* Video embeds */
.video-embed {
    position: relative;
    width: 100%;
    height: 50vh;
    max-height: 500px;
    margin: 2rem auto;
    display: block;
}

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

/* Images */
img {
    max-width: 100%;
    height: auto;
    max-height: 50vh;
    margin: 2rem auto;
    display: block;
    object-fit: contain;
}

/* Project page layout */
.project-article .content > p:first-of-type img:first-child {
    margin-top: 0;
    margin-bottom: 0;
}

.project-header {
    margin: 2rem 0;
    text-align: center;
}

.project-header h1 {
    margin: 0 0 0.5rem 0;
    border: none;
    font-size: 2.5rem;
}

.project-header time {
    display: block;
    color: #999;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Content fold */
.below-fold {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 1s ease, opacity 0.8s ease;
}

.below-fold.revealed {
    max-height: 50000px;
    opacity: 1;
}

/* Scroll indicator */
.scroll-indicator {
    text-align: center;
    margin: 4rem 0 2rem 0;
    opacity: 0.3;
    transition: opacity 0.5s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    width: 100%;
}

.scroll-indicator:hover {
    opacity: 0.7;
}

.scroll-indicator span {
    font-size: 2rem;
    color: #666;
    animation: bounce 2s infinite;
    display: inline-block;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Code */
code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.9em;
}

pre {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 2rem 0;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Blockquotes */
blockquote {
    border-left: 3px solid #ddd;
    margin: 2rem 0;
    padding-left: 1rem;
    color: #666;
    font-style: italic;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 1rem 0.5rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-links {
        gap: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .about-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .about-image {
        max-width: 250px;
        align-self: center;
    }
}