@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

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

body {
    background-color: #111111;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Login button */
.login-container {
    position: fixed;
    top: 0;
    right: 0;
    padding: 16px 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-link {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 10px;
    font-size: 14px;
    font-family: inherit;
    color: #828282;
    text-decoration: none;
    transition: color 0.15s ease;
}

.login-link:hover {
    color: #FFFFFF;
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 32px;
    padding: 0 14px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 400;
    color: #FFFFFF;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.2);
}

.login-button .ripple,
.submit-button .ripple {
    position: absolute;
    border-radius: 100%;
    background: currentColor;
    transform: scale(0);
    opacity: 0.35;
    animation: ripple-expand 1s cubic-bezier(0, 0, 0.2, 1) forwards;
    pointer-events: none;
    z-index: 0;
}

@keyframes ripple-expand {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

.login-button:hover {
    background-color: #151515;
}

.login-button:active {
    transform: scale(0.98);
    color: #828282;
}

.login-button-primary {
    background-color: #1C1C1C;
}

.login-button-primary:hover {
    background-color: #2D2D2D;
}

.login-button-primary:active {
    background-color: #1C1C1C;
    color: #828282;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 10vw;
    min-height: 10vh;
}

img {
    height: max(48px, min(5vw, 5vh));
    width: auto;
}

.background-image {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 2115px;
    height: 1674px;
    opacity: 0.89;
    pointer-events: none;
    z-index: -1;
}

.background-image img {
    position: absolute;
    bottom: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    mix-blend-mode: hard-light;
    object-fit: cover;
}

/* Email Form Styles */
.email-form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 20px;
    width: 100%;
    max-width: 430px;
    padding: 0 20px;
    position: relative;
}

.email-form {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    background-color: #090909;
    border-radius: 16px;
    padding: 10px 20px;
    box-shadow: inset 0px 4px 4px #121212;
    outline: 1px solid transparent;
    outline-offset: -1px;
    transition: outline-color 0.2s ease;
}

.email-form:focus-within {
    outline-color: #8CABFF;
}

.email-input {
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    font-family: inherit;
    background-color: transparent;
    border: none;
    color: #FFFFFF;
    outline: none;
}

.email-input::placeholder {
    color: #828282;
}

.submit-button {
    padding: 8px 14px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 400;
    background-color: #1C1C1C;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    box-shadow: 
        inset 0px 0.5px 0px rgba(255, 255, 255, 0.1),
        0px 1px 2px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.submit-button:hover {
    background-color: #2D2D2D;
}

.submit-button:active {
    transform: scale(0.98);
    color: #828282;
}

.submit-button:disabled {
    background-color: rgba(255, 255, 255, 0.01);
    color: #373737;
    cursor: not-allowed;
    transform: none;
}

.email-form {
    transition: outline-color 0.2s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.email-form.fade-out {
    opacity: 0;
    visibility: hidden;
}

.form-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    height: 54px;
    padding: 0 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-message.fade-in {
    opacity: 1;
}

.form-message:empty {
    visibility: hidden;
}

.form-message.success {
    color: #828282;
}

.form-message.error {
    color: #EB5757;
}

/* Shimmer effect - text only */
.shimmer-target[data-shimmer="active"] {
    background: linear-gradient(
        105deg,
        #828282 0%,
        #828282 40%,
        #FFFFFF 48%,
        #FFFFFF 52%,
        #828282 60%,
        #828282 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: shimmer-text 1.8s ease-out forwards;
}

@keyframes shimmer-text {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@media (max-width: 480px) {
    .email-form {
        flex-direction: column;
        padding: 16px 20px;
        gap: 12px;
    }
    
    .email-input {
        width: 100%;
        text-align: center;
    }
    
    .submit-button {
        width: 100%;
    }

    .login-container {
        padding: 12px 12px;
    }

    .login-button {
        font-size: 13px;
        padding: 0 10px;
    }
}

/* ---- Blog ---- */

.blog-page {
    display: block;
    overflow: auto;
    padding: 0 20px;
}

.blog-nav {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 0 48px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.blog-nav a {
    color: #828282;
    text-decoration: none;
    transition: color 0.15s ease;
}

.blog-nav a:hover {
    color: #FFFFFF;
}

.blog-nav-sep {
    color: #242424;
}

/* Blog index */

.blog-index {
    max-width: 680px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.blog-index h1 {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 40px;
}

.blog-post-list {
    list-style: none;
}

.blog-post-list li + li {
    margin-top: 4px;
}

.blog-post-list a {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #FFFFFF;
    transition: background-color 0.15s ease;
}

.blog-post-list a:hover {
    background-color: #1C1C1C;
}

.blog-post-list time {
    font-size: 14px;
    color: #828282;
    white-space: nowrap;
    flex-shrink: 0;
}

.blog-post-list span {
    font-size: 16px;
    font-weight: 400;
}

/* Blog post */

.blog-post {
    max-width: 680px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.blog-post-header {
    margin-bottom: 40px;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #828282;
    margin-bottom: 8px;
}

.blog-post-meta a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.blog-post-meta a:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.blog-post-header h1 {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.3;
}

.blog-post-content {
    font-size: 16px;
    line-height: 1.75;
    color: #BBBBBB;
}

.blog-post-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #FFFFFF;
    margin-top: 40px;
    margin-bottom: 16px;
}

.blog-post-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
    margin-top: 32px;
    margin-bottom: 12px;
}

.blog-post-content p {
    margin-bottom: 20px;
}

.blog-post-content a {
    color: #8CABFF;
    text-decoration: none;
}

.blog-post-content a:hover {
    text-decoration: underline;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.blog-post-content li {
    margin-bottom: 8px;
}

.blog-post-content strong {
    color: #FFFFFF;
    font-weight: 600;
}

.blog-post-content code {
    font-family: 'Fira Code', 'Fira Mono', 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.9em;
    color: rgb(244, 244, 245);
    background-color: #1C1C1C;
    padding: 2px 6px;
    border-radius: 4px;
}

.blog-post-content pre {
    background-color: #1C1C1C;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

@media (min-width: 481px) {
    .blog-post-content pre {
        width: 120%;
        margin-left: -10%;
    }
}

.blog-post-content pre code {
    background: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

.blog-post-content blockquote {
    border-left: 3px solid #242424;
    padding-left: 16px;
    margin-bottom: 20px;
    color: #828282;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.blog-post-content th,
.blog-post-content td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #242424;
}

.blog-post-content th {
    color: #FFFFFF;
    font-weight: 500;
}

.blog-post-content hr {
    border: none;
    border-top: 1px solid #242424;
    margin: 32px 0;
}

/* Syntax highlighting (Prism.js) — matches app token colors */

.blog-post-content .token.comment,
.blog-post-content .token.prolog,
.blog-post-content .token.doctype,
.blog-post-content .token.cdata {
    color: #A0A1A9;
}

.blog-post-content .token.punctuation {
    color: #FFFFFF;
}

.blog-post-content .token.property,
.blog-post-content .token.tag,
.blog-post-content .token.boolean,
.blog-post-content .token.number,
.blog-post-content .token.constant,
.blog-post-content .token.symbol,
.blog-post-content .token.deleted {
    color: #CE9E4B;
}

.blog-post-content .token.selector,
.blog-post-content .token.attr-name,
.blog-post-content .token.string,
.blog-post-content .token.char,
.blog-post-content .token.builtin,
.blog-post-content .token.inserted {
    color: #3BBD59;
}

.blog-post-content .token.operator,
.blog-post-content .token.entity,
.blog-post-content .token.url,
.blog-post-content .language-css .token.string,
.blog-post-content .style .token.string {
    color: #8CABFF;
}

.blog-post-content .token.atrule,
.blog-post-content .token.attr-value,
.blog-post-content .token.keyword {
    color: #EE58E3;
}

.blog-post-content .token.function,
.blog-post-content .token.class-name {
    color: #3BBD59;
}

.blog-post-content .token.regex,
.blog-post-content .token.important,
.blog-post-content .token.variable {
    color: #CE9E4B;
}

@media (max-width: 480px) {
    .blog-post-header h1 {
        font-size: 24px;
    }

    .blog-post-list a {
        flex-direction: column;
        gap: 4px;
    }
}

/* Visually hidden but accessible to screen readers and crawlers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}