:root {
    --bg-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #666666;
    --border-color: #eeeeee;
    --accent-color: #000000;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    /* Prevent scrolling for the "app" feel */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Badge */
.badge-container {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#badge-text {
    animation: rotate 15s linear infinite;
    fill: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.blog-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    letter-spacing: 0.5px;
}

.blog-link:hover {
    color: var(--text-primary);
}

/* Subscribe Link */
.subscribe-container {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 10;
}

.subscribe-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 14px;
    font-family: var(--font-main);
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.subscribe-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #ddd;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .subscribe-container {
        top: 20px;
        right: 20px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
    }

    .badge-container {
        /* Adjust badge to not overlap if needed, or hide subscribe input on very small screens */
    }
}

/* Map Canvas */
/* Map Background */
#map-background {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 700px;
    /* Constrained width */
    height: auto;
    z-index: 0;
    opacity: 0.5;
    /* Increased visibility */
    pointer-events: none;
    filter: invert(0) grayscale(100%);
    /* Ensure it reads as dark dots on white */
}

/* Profile Card */
.profile-card {
    position: relative;
    z-index: 2;
    text-align: center;
    background: transparent;
    padding: 40px 20px;
    animation: fadeIn 1s ease-out;
}

.avatar-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.title {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 32px;
}

/* Social Links */
.social-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.social-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.social-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #ddd;
}

.social-pill img {
    filter: grayscale(100%);
    opacity: 0.8;
}

.social-pill:hover img {
    filter: none;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .badge-container {
        top: 20px;
        left: 20px;
        transform: scale(0.8);
    }

    .profile-card {
        padding: 30px 20px;
        width: 90%;
    }
}

/* Blog Styles */
.blog-body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
    display: block;
}

.blog-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

.blog-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

.blog-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 24px;
    margin: 0 -24px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.post-card:hover {
    background: #f9f9f9;
}

.post-date {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.post-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.loading-text,
.error-text,
.no-posts {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Article Styles */
.article-main {
    padding-top: 140px;
}

.article-header {
    margin-bottom: 48px;
}

.article-title {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-top: 12px;
}

.article-body {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 1.5em;
}

.article-body h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 2em 0 1em;
    letter-spacing: -0.3px;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 1.5em 0 0.75em;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2em 0;
}

.article-body a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover {
    color: var(--text-secondary);
}

.article-body blockquote {
    border-left: 3px solid var(--border-color);
    padding-left: 20px;
    margin: 1.5em 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-body code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-body pre {
    background: #f5f5f5;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body ul,
.article-body ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
}

.article-body li {
    margin-bottom: 0.5em;
}

@media (max-width: 600px) {
    .blog-header {
        padding: 20px 24px;
    }

    .blog-main {
        padding: 100px 20px 60px;
    }

    .blog-title {
        font-size: 28px;
    }

    .article-title {
        font-size: 28px;
    }

    .post-card {
        margin: 0 -20px;
        padding: 20px;
    }
}

/* Projects Styles */
.projects-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

.projects-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 40px;
}

.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-card:hover .browser-frame {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.browser-frame {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

.browser-dots {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
}

.browser-content {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f5f5;
}

.browser-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.project-info {
    padding: 20px 4px;
}

.project-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.project-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 600px) {
    .projects-main {
        padding: 100px 20px 60px;
    }

    .projects-title {
        font-size: 28px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}