:root {
    /* Colors - Light Theme */
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #666666;
    --color-accent: #000000;
    --color-border: #e0e0e0;
    --color-card-bg: #f9f9f9;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Courier New', monospace;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Layout */
    --max-width-sm: 640px;
    --max-width-md: 768px;
    --max-width-lg: 1024px;
    --max-width-xl: 1280px;
    
    --border-radius: 0.5rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0a0a0a;
        --color-text: #f5f5f5;
        --color-text-secondary: #a0a0a0;
        --color-accent: #ffffff;
        --color-border: #2a2a2a;
        --color-card-bg: #1a1a1a;
    }
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: var(--line-height-normal);
    font-size: var(--text-base);
}

/* Header */
header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) var(--space-lg);
    z-index: 1000;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width-xl);
    margin: 0 auto;
}

header .logo {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.05em;
}

header ul {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    align-items: center;
}

header a {
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

header a:hover {
    color: var(--color-accent);
}

header .nav-cta {
    padding: var(--space-xs) var(--space-md);
    background-color: var(--color-accent);
    color: var(--color-bg);
    border-radius: var(--border-radius);
    font-weight: 500;
}

header .nav-cta:hover {
    opacity: 0.9;
    color: var(--color-bg);
}

/* Main Content */
main {
    max-width: var(--max-width-lg);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

/* Typography */
h1 {
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-md);
}

h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

a {
    color: var(--color-accent);
    text-decoration: underline;
    transition: opacity var(--transition-fast);
}

a:hover {
    opacity: 0.7;
}

/* Hero Section */
.hero {
    margin-bottom: var(--space-2xl);
}

.hero h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.hero p {
    font-size: var(--text-lg);
    max-width: 600px;
}

.hero .cta-button {
    display: inline-block;
    margin-top: var(--space-lg);
    padding: var(--space-sm) var(--space-lg);
    background-color: var(--color-accent);
    color: var(--color-bg);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: opacity var(--transition-fast);
}

.hero .cta-button:hover {
    opacity: 0.9;
}

/* Sections */
.section {
    margin-bottom: var(--space-2xl);
}

.section h2 {
    margin-bottom: var(--space-lg);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-bottom: var(--space-sm);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.card p {
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.card .meta {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--color-border);
    color: var(--color-text-secondary);
    border-radius: calc(var(--border-radius) / 2);
    font-size: var(--text-xs);
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.tag:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

/* Lists */
.post-list, .project-list {
    list-style: none;
}

.post-list li, .project-list li {
    margin-bottom: var(--space-lg);
}

/* Article */
article {
    max-width: var(--max-width-md);
    margin: 0 auto;
}

article header {
    position: static;
    border: none;
    padding: 0;
    margin-bottom: var(--space-xl);
}

article h1 {
    margin-bottom: var(--space-sm);
}

article .meta {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: var(--space-lg) 0;
}

article code {
    background-color: var(--color-card-bg);
    padding: 0.125rem 0.25rem;
    border-radius: calc(var(--border-radius) / 2);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

article pre {
    background-color: var(--color-card-bg);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: var(--space-lg) 0;
}

article pre code {
    background: none;
    padding: 0;
}

/* Forms */
form {
    max-width: var(--max-width-md);
}

label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    font-size: var(--text-sm);
}

input, textarea, select {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    background-color: var(--color-bg);
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-accent);
}

button, .button {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background-color: var(--color-accent);
    color: var(--color-bg);
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

button:hover, .button:hover {
    opacity: 0.9;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
footer {
    margin-top: var(--space-2xl);
    padding: var(--space-xl) var(--space-lg);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

footer p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

footer .social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    list-style: none;
}

footer a {
    color: var(--color-text-secondary);
}

footer a:hover {
    color: var(--color-accent);
}

/* Newsletter */
.newsletter {
    background-color: var(--color-card-bg);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    margin: var(--space-2xl) 0;
}

.newsletter h3 {
    margin-bottom: var(--space-sm);
}

.newsletter p {
    margin-bottom: var(--space-md);
}

.newsletter form {
    display: flex;
    gap: var(--space-sm);
}

.newsletter input {
    flex: 1;
    margin-bottom: 0;
}

/* Blog CTA */
.blog-cta {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    margin: var(--space-2xl) 0;
    text-align: center;
}

.blog-cta h3 {
    margin-bottom: var(--space-sm);
}

.blog-cta p {
    margin-bottom: var(--space-md);
}

/* Categories */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.category-link {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.category-link:hover {
    background-color: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

/* Admin Styles */
.admin-container {
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.admin-header {
    margin-bottom: var(--space-2xl);
}

.admin-section {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.admin-section h2 {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.feature-item {
    padding: var(--space-md);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.feature-item h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
}

.feature-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-sm) 0;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-border);
    transition: var(--transition-normal);
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-normal);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-accent);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.tab {
    padding: var(--space-sm) var(--space-lg);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.tab.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.tab:hover {
    color: var(--color-text);
    opacity: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--color-bg);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    max-width: var(--max-width-md);
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--text-2xl);
    cursor: pointer;
    padding: 0;
    color: var(--color-text);
}

.content-list {
    list-style: none;
}

.content-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-sm);
}

.content-info h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-xs);
}

.content-info p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

.content-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-sm);
}

/* Work with Me Page Styles */
.work-hero {
    text-align: center;
    padding: var(--space-3xl) var(--space-md);
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    color: white;
    border-radius: var(--border-radius);
    margin-bottom: var(--space-2xl);
}

.work-hero h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-lg);
}

.work-hero .lead {
    font-size: var(--text-xl);
    max-width: var(--max-width-md);
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.95;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.benefit-card {
    background-color: var(--color-card-bg);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.benefit-card p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.service-item {
    background-color: var(--color-card-bg);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-xl);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.service-item h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.service-item p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.service-item ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-sm);
}

.service-item li {
    padding-left: var(--space-lg);
    position: relative;
    color: var(--color-text);
}

.service-item li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.process-steps {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
    margin: var(--space-xl) 0;
}

.process-steps li {
    counter-increment: step-counter;
    background-color: var(--color-card-bg);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
    position: relative;
    padding-left: calc(var(--space-3xl) + var(--space-lg));
}

.process-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: var(--space-xl);
    top: var(--space-xl);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: bold;
}

.process-steps strong {
    display: block;
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.process-steps p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

#pricing-info {
    background-color: var(--color-card-bg);
    padding: var(--space-2xl);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    margin: var(--space-xl) 0;
}

#pricing-info h2 {
    margin-bottom: var(--space-lg);
}

#pricing-info ul {
    list-style: none;
    padding: 0;
    margin: var(--space-lg) 0;
}

#pricing-info li {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

#pricing-info li:last-child {
    border-bottom: none;
}

#pricing-info em {
    display: block;
    margin-top: var(--space-lg);
    color: var(--color-text-secondary);
    font-style: italic;
}

#cta-contact {
    text-align: center;
    padding: var(--space-3xl) var(--space-md);
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    color: white;
    border-radius: var(--border-radius);
    margin: var(--space-2xl) 0;
}

#cta-contact h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

#cta-contact p {
    font-size: var(--text-lg);
    max-width: var(--max-width-sm);
    margin: 0 auto var(--space-xl);
    opacity: 0.95;
}

.contact-options {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.contact-options .btn,
.contact-options .btn-outline {
    min-width: 200px;
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--color-primary);
}

.faq-item {
    background-color: var(--color-card-bg);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.faq-item h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.faq-item p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    header nav {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    header ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: var(--text-3xl);
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter form {
        flex-direction: column;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    /* Work with Me responsive */
    .work-hero h1 {
        font-size: var(--text-2xl);
    }
    
    .work-hero .lead {
        font-size: var(--text-lg);
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .service-item ul {
        grid-template-columns: 1fr;
    }
    
    .process-steps li {
        padding-left: var(--space-xl);
    }
    
    .process-steps li::before {
        width: 36px;
        height: 36px;
        font-size: var(--text-lg);
        left: var(--space-md);
        top: var(--space-md);
    }
    
    .contact-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .contact-options .btn,
    .contact-options .btn-outline {
        width: 100%;
    }
}
