/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.2;
    color: #333;
    background-color: #FAF9F6;
    padding: 1.5rem;
    width: 60%;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Blog Post specific styles */
.post-page .post-content {
    font-family: 'EB Garamond', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Navigation */
nav {
    margin-bottom: 1.5rem;
}

nav a {
    color: #000;
    text-decoration: none;
    margin-right: 2rem;
    font-size: 0.875rem;
    font-weight: 400;
}

nav a:hover {
    text-decoration: underline;
}

nav a.active {
    font-weight: 600;
}

/* Hero Section */
.hero {
    margin-bottom: 2rem;
    position: relative;
    height: 300px;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.hero h1 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.hero p {
    font-size: 0.875rem;
    opacity: 0.9;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.hero-text .social-link {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.hero-text .social-link:hover {
    opacity: 0.8;
}

/* Projects Section */
.projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.project-thumbnail {
    aspect-ratio: 1;
    border: 1px solid #E5E5E5;
    background-color: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
    height: 150px;
    width: 150px;
    flex-shrink: 0;
}

.project-thumbnail:hover {
    opacity: 0.8;
}

.project h2 {
    font-size: 0.75rem;
    font-weight: 400;
    padding-top: 2px;
}

/* Bio Page */
.bio-content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 2rem;
}

.bio-content h1 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

.profile-photo {
    margin-bottom: 3rem;
    text-align: left;
}

.profile-photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

.bio-text {
    margin-bottom: 3rem;
}

.bio-text p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-info {
    margin: 2rem 0;
    color: #666;
    line-height: 1.8;
}

.contact-info .social-link {
    color: #000;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
}

.contact-info .social-link:hover {
    text-decoration: underline;
}

.achievements h2 {
    font-size: 1rem;
    font-weight: 400;
    margin: 2rem 0 1rem;
}

.achievements ul {
    list-style: none;
    margin-bottom: 2rem;
}

.achievements li {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Thoughts Grid */
.thoughts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.thought-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.thought-thumbnail {
    aspect-ratio: 16/9;
    border: 1px solid #E5E5E5;
    background-color: transparent;
    margin-bottom: 0.5rem;
}

.thought-card h2 {
    font-size: 1rem;
    font-weight: 400;
}

.thought-excerpt {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.read-more {
    color: #000;
    text-decoration: none;
    font-size: 0.875rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Blog Post */
.post {
    max-width: 700px;
    margin: 0 auto;
    padding-top: 2rem;
}

.post h1 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

.post-content {
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-block;
    margin-top: 3rem;
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
}

.back-link:hover {
    color: #000;
}

/* Chatbot UI styles */
.container {
    display: flex;
    flex-direction: column;
    height: 70vh;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    overflow: hidden;
}

.chat-window {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #fff;
}

.chat-message {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    max-width: 70%;
    line-height: 1.4;
}

.bot-message {
    background-color: #F0F0F0;
    align-self: flex-start;
}

.user-message {
    background-color: #007BFF;
    color: white;
    align-self: flex-end;
}

.chat-message p {
    margin: 0;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #E5E5E5;
    background-color: #F9F9F9;
}

#userInput {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

#sendButton {
    border: none;
    background-color: #007BFF;
    color: white;
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    margin-left: 1rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

#sendButton:hover {
    background-color: #0056b3;
}

.thinking p {
    font-style: italic;
    color: #666;
}

/* Generated Images */
.generated-image {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Styles for image attachments in chat */
.input-area {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #E5E5E5;
    background-color: #F9F9F9;
}

.image-attachment-area {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    border-bottom: 1px solid #E5E5E5;
}

.image-previews {
    display: flex;
    gap: 0.5rem;
    flex-grow: 1;
    overflow-x: auto;
}

.image-preview-container {
    position: relative;
    flex-shrink: 0;
}

.preview-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.remove-image-button {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}

.add-image-button {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    transition: background-color 0.2s;
}

.add-image-button:hover {
    background-color: #d0d0d0;
}

.add-image-button svg {
    stroke: #333;
}

.user-message .message-images {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.user-message .message-images img {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 1200px) {
    body {
        width: 80%;
    }
}

@media (max-width: 768px) {
    body {
        width: 90%;
        padding: 1rem;
    }

    nav {
        margin-bottom: 1rem;
    }

    nav a {
        display: inline-block;
        margin-right: 1rem;
        margin-bottom: 0.25rem;
    }

    .hero {
        height: 150px;
        margin-bottom: 1.5rem;
    }

    .projects {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.0rem;
    }

    .project-thumbnail {
        height: 150px;
        width: 150px;
    }

    .thoughts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post {
        padding: 1rem;
    }

    .post h1 {
        font-size: 1.5rem;
    }
}

.project-link {
    color: #000;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    padding-top: 2px;
}

.project-link:hover {
    text-decoration: underline;
}