/* КЛЮЧОВИ НАСТРОЙКИ И ПАЛЕТА */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 24px);
}

/* БУТОНИ И ОБЩИ ЕЛЕМЕНТИ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 48px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

.text-blue { color: var(--primary); }

/* НАВИГАЦИОННА ЛЕНТА */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo span { color: var(--primary); }
.logo-icon {
    background: var(--primary);
    color: white !important;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 1rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    margin: 0 12px;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
}

/* ГЛАВНА СЕКЦИЯ (HERO) */
.hero {
    padding: clamp(56px, 7vw, 84px) 0;
    background: radial-gradient(circle at 90% 10%, #eff6ff 0%, transparent 40%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dbeafe;
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 20px;
}

.hero-text h1 span { color: var(--primary); }

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-actions .btn {
    flex: 1 1 220px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.feature-item {
    display: flex;
    gap: 12px;
}

.feature-item i {
    font-size: 1.2rem;
    margin-top: 3px;
}

.feature-item h4 {
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.hero-image {
    position: relative;
}

.image-placeholder {
    width: 100%;
    height: clamp(320px, 34vw, 420px);
    background: #1e293b;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: visible;
    position: relative;
}

.image-placeholder img,
.about-img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.status-pill {
    position: absolute;
    bottom: -20px;
    left: 20px;
    background: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-pill small {
    display: block;
    color: var(--text-muted);
    font-weight: 400;
}

/* ЗАГЛАВИЯ НА СЕКЦИИ */
.section-title {
    text-align: center;
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 40px;
}

/* ТЕХНОЛОГИЧЕН СТЕК */
.tech-stack {
    padding: clamp(48px, 6vw, 72px) 0;
    background: white;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stack-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    min-width: 0;
}

.stack-card i { font-size: 1.8rem; }
.stack-card svg {
    width: 1.8rem;
    height: 1.8rem;
    flex: 0 0 auto;
}
.stack-card span { font-weight: 500; font-size: 0.95rem; }
.tech-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}
/* ПОРТФОЛИО */
.portfolio { padding: clamp(56px, 7vw, 84px) 0; }

.portfolio-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.tab-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.project-img-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.font-dark { background: #0f172a; color: white; }
.font-light { background: #f1f5f9; color: #0f172a; }

.project-body { padding: 25px; }

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.project-header h3 { font-size: 1.25rem; color: #0f172a; }

.project-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.tag-blue { background: #eff6ff; color: var(--primary); }
.tag-orange { background: #fff7ed; color: #ea580c; }

.project-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    min-height: 45px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.project-tech span {
    font-size: 0.8rem;
    background: var(--bg-light);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 4px;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.github-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.portfolio-more {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ЗА МЕН */
.about {
    padding: clamp(56px, 7vw, 84px) 0;
    background: white;
}

.about-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.section-badge {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.about-text h2 {
    font-size: 2.3rem;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 20px;
}

.about-lead {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 25px;
}

.about-list { list-style: none; }
.about-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.about-stats-side {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.about-img-placeholder {
    width: 100%;
    height: clamp(220px, 26vw, 280px);
    background: #e2e8f0;
    border-radius: 14px;
    position: relative;
    overflow: visible;
}

.inner-pill { bottom: 15px; left: 15px; }

.stats-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background: var(--bg-light);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-item { text-align: center; }
.stat-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}
.stat-lbl { font-size: 0.75rem; color: var(--text-muted); }
.stat-subtext {
    grid-column: span 3; /* Разпъва текста по цялата дължина на трите колони */
    text-align: center;
    font-size: 0.8rem;   /* Малко по-голям от етикетите, но по-малък от числата */
    font-style: italic;  /* Наклонен шрифт за по-луксозно и отделено усещане */
    color: var(--text-muted); /* Използва същия сив цвят от вашите променливи */
    margin-top: 10px;    /* Добавя малко разстояние под трите колони */
}


/* ФУТЪР */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: clamp(48px, 6vw, 72px) 0 20px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #334155;
}

.footer h4 {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.footer ul li a:hover { color: white; }

.footer-info .logo { color: white; margin-bottom: 15px; }
.footer-info p { font-size: 0.9rem; margin-bottom: 15px; line-height: 1.5; }

.social-icons { display: flex; gap: 12px; }
.social-icons a {
    color: #94a3b8;
    background: #1e293b;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.social-icons a:hover { background: var(--primary); color: white; }

.footer-tech-list { font-size: 0.9rem; line-height: 1.6; }
.contact-details li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.85rem;
}

/* АНИМАЦИИ */
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* МЕДИЙНИ ЗАПИТВАНИЯ ЗА МОБИЛНИ УСТРОЙСТВА */
@media (max-width: 968px) {
    .hero-container, .about-container, .footer-grid {
        grid-template-columns: 1fr;
    }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-menu, .btn-nav { display: none; }
    .hero-text h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
    .hero-features { grid-template-columns: 1fr; }
    .image-placeholder { height: 300px; }
    .about-container { gap: 32px; }
    .footer-grid { gap: 28px; }
}

@media (max-width: 640px) {
    .portfolio-grid { grid-template-columns: 1fr; }
    .hero {
        padding-top: 44px;
    }
    .hero-actions .btn {
        flex: 1 1 100%;
    }
    .hero-features {
        gap: 16px;
    }
    .project-header,
    .project-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .stats-box {
        grid-template-columns: 1fr;
    }
    .stat-subtext {
        grid-column: span 1;
        margin-top: 15px; /* Малко повече разстояние на мобилни устройства */
    }
    .footer-grid {
        gap: 24px;
    }
    .status-pill {
        left: 12px;
        right: 12px;
        width: auto;
        justify-content: center;
        text-align: center;
    }
    .inner-pill {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
}

@media (max-width: 480px) {
    .section-title,
    .about-text h2 {
        font-size: clamp(1.6rem, 7vw, 2rem);
    }
    .hero-text h1 {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
    }
    .hero-text p,
    .about-lead {
        font-size: 1rem;
    }
    .stack-card {
        justify-content: flex-start;
    }
    .project-body {
        padding: 20px;
    }
    .project-img-placeholder {
        height: 160px;
    }
    .image-placeholder {
        height: 280px;
    }
    .about-img-placeholder {
        height: 220px;
    }
    .about-list li {
        align-items: flex-start;
    }
}
