*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #09090b; --bg-card: #18181b; --bg-card-hover: #1f1f23;
    --border: #27272a; --border-hover: #3f3f46;
    --text: #fafafa; --text-secondary: #a1a1aa; --text-muted: #71717a;
    --accent: #7c3aed; --accent-light: #a78bfa; --accent-dark: #6d28d9;
    --accent-glow: rgba(124, 58, 237, 0.15);
    --radius: 12px; --radius-lg: 16px; --radius-full: 9999px;
}
body.theme-light {
    --bg: #fafafa; --bg-card: #ffffff; --bg-card-hover: #f4f4f5;
    --border: #e4e4e7; --border-hover: #d4d4d8;
    --text: #09090b; --text-secondary: #52525b; --text-muted: #71717a;
    --accent-glow: rgba(124, 58, 237, 0.08);
}
body.theme-light .site-header { background: rgba(250, 250, 250, 0.85); }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg); color: var(--text);
    line-height: 1.6; -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---- Layout ---- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
@media (max-width: 768px) { .section { padding: 64px 0; } }

/* ---- Typography ---- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 16px;
}
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.section-title { font-size: clamp(28px, 5vw, 42px); font-weight: 800; line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.02em; }
.section-desc { font-size: 17px; color: var(--text-secondary); max-width: 560px; line-height: 1.7; }

/* ---- Header ---- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
}
.site-header .inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 64px;
}
.logo { font-size: 20px; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.nav-desktop { display: flex; align-items: center; gap: 28px; }
.nav-desktop a { font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.nav-desktop a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14px; font-weight: 600; text-decoration: none;
    border-radius: var(--radius-full); transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; padding: 10px 24px; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(124,58,237,0.3); }
.btn-outline { background: transparent; color: var(--text); padding: 10px 24px; border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 8px 12px; }
.btn-ghost:hover { color: var(--text); background: var(--accent-glow); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* ---- Language Switcher ---- */
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 13px; }
.lang-switch a {
    padding: 4px 8px; border-radius: 6px; text-decoration: none;
    color: var(--text-muted); font-weight: 500; transition: all 0.2s;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active { color: var(--accent); background: var(--accent-glow); font-weight: 600; }

/* ---- Theme Toggle ---- */
.theme-btn {
    width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.theme-btn:hover { color: var(--text); border-color: var(--border-hover); }
.theme-btn .icon-sun, .theme-btn .icon-moon { width: 18px; height: 18px; }
body:not(.theme-light) .theme-btn .icon-sun { display: none; }
body.theme-light .theme-btn .icon-moon { display: none; }

/* ---- Hero ---- */
.hero { padding: 140px 0 100px; position: relative; overflow: hidden; }
@media (max-width: 768px) { .hero { padding: 110px 0 64px; } }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 900; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 24px; }
.hero h1 .accent { color: var(--accent); }
.hero-desc { font-size: 18px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-visual {
    position: relative; aspect-ratio: 1; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-glow), transparent 50%);
    border: 1px solid var(--border); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .placeholder-icon {
    width: 120px; height: 120px; color: var(--accent); opacity: 0.3;
}
.hero-glow {
    position: absolute; top: -200px; right: -200px; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

/* ---- Stats Row ---- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 640px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-item { text-align: center; padding: 24px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); }
.stat-number { font-size: 32px; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---- Cards Grid ---- */
.cards-grid { display: grid; gap: 20px; }
.cards-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cards-grid.cols-3, .cards-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-grid.cols-2, .cards-grid.cols-3, .cards-grid.cols-4 { grid-template-columns: 1fr; } }

.card {
    padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--border);
    background: var(--bg-card); transition: all 0.25s ease;
}
.card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); transform: translateY(-2px); }
.card-icon {
    width: 44px; height: 44px; border-radius: 10px; background: var(--accent-glow);
    color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ---- About ---- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }
.about-points { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.about-points li {
    display: flex; gap: 12px; align-items: flex-start;
    font-size: 15px; color: var(--text-secondary); line-height: 1.6;
}
.about-points li .check {
    flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
    background: var(--accent-glow); color: var(--accent);
    display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.about-points li .check svg { width: 12px; height: 12px; }

/* ---- Portfolio ---- */
.project-card { text-decoration: none; color: inherit; display: block; }
.project-card .thumb {
    aspect-ratio: 16/10; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent-glow), var(--bg-card));
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); transition: border-color 0.25s;
}
.project-card:hover .thumb { border-color: var(--accent); }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.project-card .tech { font-size: 13px; color: var(--text-muted); }
.project-card .arrow {
    display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600;
    color: var(--accent); margin-top: 8px; transition: gap 0.2s;
}
.project-card:hover .arrow { gap: 8px; }

.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 24px; }
.bot-card {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card);
    text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.bot-card:hover { border-color: #229ed9; background: rgba(34,158,217,0.06); }
.bot-card .tg-icon { width: 20px; height: 20px; color: #229ed9; flex-shrink: 0; }

/* ---- Skills ---- */
.skills-group { margin-bottom: 28px; }
.skills-group h3 { font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.skills-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
    padding: 6px 14px; border-radius: var(--radius-full); font-size: 13px; font-weight: 500;
    border: 1px solid var(--border); color: var(--text-secondary); transition: all 0.2s;
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ---- Pricing ---- */
.pricing-card { padding: 32px; text-align: center; }
.pricing-card.featured { border-color: var(--accent); position: relative; }
.pricing-card .plan-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.pricing-card .plan-price { font-size: 40px; font-weight: 900; color: var(--accent); letter-spacing: -0.02em; }
.pricing-card .plan-price small { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.pricing-card .plan-desc { font-size: 14px; color: var(--text-secondary); margin: 12px 0 24px; }

/* ---- Experience ---- */
.timeline-item { display: flex; gap: 20px; padding-bottom: 32px; position: relative; }
.timeline-dot {
    flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%;
    background: var(--accent); margin-top: 6px; position: relative; z-index: 1;
}
.timeline-item::before {
    content: ''; position: absolute; left: 5px; top: 18px; bottom: 0;
    width: 2px; background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-period { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.timeline-role { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.timeline-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.timeline-stack { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-family: monospace; }

/* ---- Testimonials ---- */
.testimonial-card { padding: 28px; }
.testimonial-card .quote { font-size: 15px; color: var(--text-secondary); line-height: 1.7; font-style: italic; margin-bottom: 16px; }
.testimonial-card .quote::before { content: '\201c'; font-size: 32px; color: var(--accent); line-height: 0; vertical-align: -8px; margin-right: 4px; }
.testimonial-card .author { display: flex; align-items: center; gap: 12px; }
.testimonial-card .avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--accent-glow); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.testimonial-card .author-name { font-size: 14px; font-weight: 600; }
.testimonial-card .author-role { font-size: 13px; color: var(--text-muted); }

/* ---- FAQ ---- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; background: var(--bg-card); }
.faq-q {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 20px; cursor: pointer; font-size: 15px; font-weight: 600;
    color: var(--text); transition: color 0.2s; background: none; border: none; width: 100%; text-align: left;
}
.faq-q:hover { color: var(--accent); }
.faq-q .chevron { width: 20px; height: 20px; color: var(--text-muted); transition: transform 0.25s; flex-shrink: 0; }
.faq-item.open .faq-q .chevron { transform: rotate(180deg); }
.faq-a { padding: 0 20px 18px; font-size: 14px; color: var(--text-secondary); line-height: 1.7; display: none; white-space: pre-line; }
.faq-item.open .faq-a { display: block; }

/* ---- Blog ---- */
.blog-card { text-decoration: none; color: inherit; display: block; }
.blog-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; transition: color 0.2s; }
.blog-card:hover h3 { color: var(--accent); }
.blog-card p { font-size: 14px; color: var(--text-secondary); }
.blog-card .read-more { font-size: 14px; font-weight: 600; color: var(--accent); margin-top: 10px; display: inline-block; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-links { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.contact-link {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px;
    border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card);
    text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.contact-link:hover { border-color: var(--accent); background: var(--accent-glow); }
.contact-link .link-icon { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.form-input, .form-textarea {
    width: 100%; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text); font-size: 15px; font-family: inherit;
    transition: border-color 0.2s; outline: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 120px; }

/* ---- Footer ---- */
.site-footer { padding: 48px 0; border-top: 1px solid var(--border); }
.footer-inner {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-copy { font-size: 13px; color: var(--text-muted); }
.footer-socials { display: flex; gap: 8px; }
.footer-socials a {
    width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); text-decoration: none; transition: all 0.2s;
}
.footer-socials a:hover { border-color: var(--accent); color: var(--accent); }
.footer-socials a svg { width: 18px; height: 18px; }

/* ---- Mobile Menu ---- */
.mobile-menu-btn {
    display: none; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); cursor: pointer;
    align-items: center; justify-content: center;
}
@media (max-width: 900px) {
    .nav-desktop, .header-actions .lang-switch, .header-actions .btn-primary { display: none; }
    .mobile-menu-btn { display: flex; }
}
.mobile-overlay {
    position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.mobile-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 210;
    width: min(320px, 85vw); background: var(--bg); border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform 0.3s ease; display: flex; flex-direction: column;
}
.mobile-panel.open { transform: translateX(0); }
.mobile-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.mobile-panel-close {
    width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.mobile-nav { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.mobile-nav a {
    display: block; padding: 12px 16px; border-radius: var(--radius);
    font-size: 15px; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: all 0.2s;
}
.mobile-nav a:hover { color: var(--text); background: var(--accent-glow); }
.mobile-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }

/* ---- Back to Top ---- */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px; z-index: 50;
    width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(124,58,237,0.3);
    opacity: 0; pointer-events: none; transition: all 0.3s; cursor: pointer; border: none;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,0.4); }
.back-to-top svg { width: 20px; height: 20px; }

/* ---- Scroll Animations ---- */
[data-animate] { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
[data-animate].in-view { opacity: 1; transform: translateY(0); }

/* ---- Cookie Notice ---- */
.cookie-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: var(--bg-card); border-top: 1px solid var(--border);
    padding: 16px 24px; transform: translateY(100%); transition: transform 0.3s;
}
.cookie-bar.visible { transform: translateY(0); }
.cookie-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cookie-inner p { font-size: 14px; color: var(--text-secondary); }

/* ---- CTA ---- */
.cta-section {
    border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card);
    padding: 64px; text-align: center; position: relative; overflow: hidden;
}
@media (max-width: 640px) { .cta-section { padding: 40px 24px; } }
.cta-section::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, var(--accent-glow), transparent 70%);
    pointer-events: none;
}

/* ---- Portfolio filter ---- */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-tab {
    padding: 6px 16px; border-radius: var(--radius-full); font-size: 13px; font-weight: 600;
    border: 1px solid var(--border); background: transparent; color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--border-hover); color: var(--text); }
.filter-tab.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 0; border: none; }
