/* Manrope Font - Self Hosted */
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/manrope-v20-latin-regular.woff2') format('woff2'),
         url('fonts/manrope-v20-latin-regular.woff') format('woff');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/manrope-v20-latin-500.woff2') format('woff2'),
         url('fonts/manrope-v20-latin-500.woff') format('woff');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/manrope-v20-latin-600.woff2') format('woff2'),
         url('fonts/manrope-v20-latin-600.woff') format('woff');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/manrope-v20-latin-700.woff2') format('woff2'),
         url('fonts/manrope-v20-latin-700.woff') format('woff');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/manrope-v20-latin-800.woff2') format('woff2'),
         url('fonts/manrope-v20-latin-800.woff') format('woff');
}

/* CSS Variables for Light/Dark Mode */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-card: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #86868b;
    --border-color: #d2d2d7;
    --accent-color: #ff6b35;
    --accent-hover: #ff7b45;
    --accent-light-bg: #fff5eb;
    --accent-light-border: #ffd6b3;
    --accent-text: #e85d04;
    --link-color: #0071e3;
    --link-hover: #0077ed;
    --android-color: #3ddc84;
    --android-hover: #2dcc74;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    --badge-shadow: rgba(232, 93, 4, 0.15);
}

[data-theme="dark"] {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-card: #1a1a1a;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #6e6e73;
    --border-color: #3d3d3d;
    --accent-color: #ff7b45;
    --accent-hover: #ff8c5a;
    --accent-light-bg: #2a1a10;
    --accent-light-border: #4d2a15;
    --accent-text: #ff9966;
    --link-color: #4da3ff;
    --link-hover: #66b3ff;
    --android-color: #4de890;
    --android-hover: #66f0a3;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
    --badge-shadow: rgba(255, 123, 69, 0.25);
}

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

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1000px;
    width: 100%;
    text-align: center;
}

/* Logo */
.site-logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 16px;
}

/* Screen reader only - for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Settings Bar (Language + Theme Switcher) */
.settings-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Fancy Pill Switcher */
.pill-switcher {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 50px;
    padding: 4px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.pill-switcher:hover {
    box-shadow: 0 4px 16px var(--shadow-color);
}

/* Language Switcher */
.language-switcher {
    font-size: 13px;
    font-weight: 600;
}

.language-switcher a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 50px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    z-index: 1;
}

.language-switcher a:hover {
    color: var(--text-primary);
}

.language-switcher a.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-color) 0%, #f7931e 100%);
    box-shadow: 0 2px 8px var(--badge-shadow);
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.theme-toggle .moon-icon {
    position: absolute;
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

/* Legacy separator - hidden but kept for compatibility */
.lang-separator {
    display: none;
}

h1 {
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-light-bg) 0%, var(--accent-light-bg) 100%);
    color: var(--accent-text);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--accent-light-border);
    transition: all 0.2s ease;
}

.hero-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--badge-shadow);
}

.description {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Portfolio Section */
.portfolio-section {
    margin: 60px 0;
}

.platform-title {
    font-size: 24px;
    font-weight: 600;
    margin: 40px 0 30px;
    color: var(--text-primary);
    text-align: left;
    letter-spacing: -0.3px;
}

.platform-title:first-of-type {
    margin-top: 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.portfolio-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.portfolio-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-icon-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: linear-gradient(135deg, #3ddc84 0%, #2dcc74 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-content {
    flex: 1;
    min-width: 0;
}

.portfolio-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.portfolio-item p {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.portfolio-item a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.portfolio-item a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.portfolio-item.android {
    border-color: var(--android-color);
}

.portfolio-item.android a {
    color: var(--android-color);
}

.portfolio-item.android a:hover {
    color: var(--android-hover);
}

/* Contact Section */
.contact-section {
    margin: 60px 0 40px;
    width: 100%;
}

.contact-intro {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.contact-toggle {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color) 0%, #f7931e 100%);
    color: #ffffff;
    border: none;
    padding: 16px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -0.2px;
    text-decoration: none;
}

.contact-toggle:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #ffa940 100%);
    transform: scale(1.05);
    box-shadow: 0 8px 24px var(--badge-shadow);
    color: #ffffff;
    text-decoration: none;
}

.contact-form-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
    margin-top: 0;
}

.contact-form-container.active {
    max-height: 700px;
    margin-top: 40px;
}

.contact-form {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 40px;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, background-color 0.3s ease;
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-btn {
    background-color: var(--link-color);
    color: #ffffff;
    border: none;
    padding: 14px 40px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background-color: var(--link-hover);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Form Status Messages */
.form-status {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.form-status.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

[data-theme="dark"] .form-status.success {
    background-color: #1e3a2f;
    color: #75d99a;
    border-color: #2d5a43;
}

[data-theme="dark"] .form-status.error {
    background-color: #3a1e1e;
    color: #f5a0a0;
    border-color: #5a2d2d;
}

/* Footer */
.footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-muted);
    transition: border-color 0.3s ease;
}

.footer-links {
    margin-top: 12px;
}

.footer-links a {
    color: var(--link-color);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.cookie-notice {
    margin-top: 20px;
    font-size: 11px;
    color: var(--text-muted);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Logo - now with transparent background */
.site-logo {
    transition: filter 0.3s ease;
}

/* Contact page styles */
.contact-page-section {
    margin: 40px 0;
}

.contact-page-section .contact-form-container {
    max-height: none;
    margin-top: 30px;
}

.back-link {
    margin-top: 40px;
}

.back-link a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.back-link a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* ==========================================
   BLOG STYLES
   ========================================== */

/* Blog Container */
.blog-container {
    max-width: 900px;
}

/* Blog Header */
.blog-header {
    margin-bottom: 50px;
}

.site-logo-small {
    max-width: 180px;
    margin-bottom: 30px;
}

.blog-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #f7931e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Blog List */
.blog-list-section {
    margin: 40px 0;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.blog-loading,
.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

/* Blog Card */
.blog-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow-hover);
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 24px;
}

.blog-card-date {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 10px 0;
    line-height: 1.3;
}

.blog-card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.blog-card-read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    transition: color 0.2s ease;
}

.blog-card:hover .blog-card-read-more {
    color: var(--accent-hover);
}

/* Blog Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}

.pagination-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.pagination-num {
    padding: 10px 14px;
}

.pagination-current {
    background: linear-gradient(135deg, var(--accent-color) 0%, #f7931e 100%);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* Blog Article */
.blog-article {
    max-width: 720px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.blog-back-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.blog-back-link:hover {
    text-decoration: underline;
}

.meta-separator {
    margin: 0 8px;
    color: var(--border-color);
}

.article-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 16px;
}

.article-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Article Featured Image */
.article-featured-image {
    margin: 40px 0;
    border-radius: 12px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-featured-image figcaption {
    padding: 12px 0;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Article Content */
.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 28px;
    font-weight: 600;
    margin: 48px 0 20px;
    color: var(--text-primary);
}

.article-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 16px;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 24px;
}

.article-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--accent-hover);
}

.article-content ul,
.article-content ol {
    margin: 24px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 12px;
}

.article-content blockquote {
    margin: 32px 0;
    padding: 24px 30px;
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
    font-size: 18px;
    font-style: italic;
    color: var(--text-primary);
}

.article-content pre {
    margin: 24px 0;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow-x: auto;
}

.article-content code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    color: var(--accent-color);
}

.article-content pre code {
    color: var(--text-primary);
}

/* Article Footer */
.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.article-tags .tag {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.article-share a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.article-share a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Blog Navigation */
.blog-navigation {
    margin: 50px 0;
    text-align: center;
}

.back-to-blog {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
}

.back-to-blog:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 48px;
    }

    .tagline {
        font-size: 22px;
    }

    .description {
        font-size: 17px;
    }

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

    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .app-content {
        text-align: center;
    }

    .contact-form {
        padding: 30px 24px;
    }

    /* Settings bar responsive */
    .settings-bar {
        top: 12px;
        right: 12px;
        gap: 10px;
    }

    .language-switcher a {
        padding: 6px 10px;
        font-size: 12px;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    /* Blog responsive */
    .blog-title {
        font-size: 36px;
    }

    .blog-list {
        grid-template-columns: 1fr;
    }

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

    .article-content h2 {
        font-size: 24px;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}