:root {
    /* Light theme (default) */
    --primary: #000000;
    --background: #ffffff;
    --text: #000000;
    --text-secondary: #666666;
    --border: #e5e5e5;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark theme */
        --primary: #ffffff;
        --background: #111111;
        --text: #ffffff;
        --text-secondary: #a0a0a0;
        --border: #333333;
    }
}

/* Optional: Add a class for manual theme switching */
[data-theme="dark"] {
    --primary: #ffffff;
    --background: #111111;
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --border: #333333;
}

/* Optional: Add a class for manual theme switching */
[data-theme="light"] {
    --primary: #000000;
    --background: #ffffff;
    --text: #000000;
    --text-secondary: #666666;
    --border: #e5e5e5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    line-height: 1.5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--text);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.75rem;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 2rem 0 1rem;
}

h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 500;
    margin: 1.5rem 0 1rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--primary);
    background: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    color: var(--primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background-color: color-mix(in srgb, var(--text) 5%, transparent);
}

/* Form elements */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.15s ease;
    background-color: var(--background);
    color: var(--text);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Section */
.section {
    margin: 4rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

/* Cards */

.card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    padding: 24px;
    background-color: var(--background);
    transition: border-color 0.15s ease;
}

.card:hover {
    border-color: var(--primary);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.card-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

/* Footer */

.footer {
    margin-top: 96px;
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-social {
    display: flex;
    gap: 24px;
}

/* Theme selector styles */
.theme-select {
    display: inline-flex;
    border: 1px solid var(--border);
    background: var(--background);
}

.theme-select button {
    padding: 6px 8px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.theme-select button.active {
    background-color: var(--border);
    color: var(--text);
}

.theme-select svg {
    width: 14px;
    height: 14px;
}

.theme-select path {
    fill: currentColor;
}

/* Update the footer CSS if needed */
.footer-theme {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* FAQs */

.faq {
    max-width: 680px;
    margin: 0 auto;
}

.faq details {
    border-bottom: 1px solid var(--border);
}

.faq summary {
    padding: 24px 0;
    cursor: pointer;
    list-style: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none; /* Prevents text selection */
    -webkit-user-select: none; /* For Safari */
}

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

.faq summary::after {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='currentColor' stroke-width='1.5' stroke-linecap='square'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.faq details[open] summary::after {
    transform: rotate(180deg);
}

.faq details[open] .faq-answer {
    padding: 0 0 24px 0;
}

.faq-answer {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Header */

.header {
    position: sticky;
    top: 0;
    background-color: transparent;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* For Safari */
    background-color: color-mix(in srgb, var(--background) 80%, transparent);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

.nav-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-buttons .btn {
    padding: 8px 16px;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

.article {
    padding: 120px 0;
    max-width: 680px;
    margin: 0 auto;
}

.article [contenteditable] {
    outline: none;
}

.article-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.article-title[contenteditable="true"]:empty:before {
    content: attr(data-placeholder);
    color: #888;
    font-style: italic;
}

.article-description {
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 40px;
}
