/* ===== Variables — dark theme inspired by programming-hero.com ===== */
:root {
    --color-primary: #e855de;
    --color-primary-2: #5400ee;
    --color-blue: #6892ff;
    --color-blue-dark: #1555b5;
    --gradient-primary: linear-gradient(90deg, #e855de 0.01%, #5400ee 100%);
    --gradient-blue: linear-gradient(90deg, #6892ff 0.01%, #1555b5 100%);
    --gradient-hero: linear-gradient(135deg, #2c1367 0%, #7a29a3 60%, #ce1aeb 100%);
    --gradient-heading: linear-gradient(97deg, #d8aaff 15%, #acb5ff 93%);

    --color-bg: #0d0518;
    --color-bg-alt: #130a26;
    --color-card: #170c2c;
    --color-text: #ffffff;
    --color-text-muted: #b3a9c9;
    --color-border: rgba(255, 255, 255, 0.09);

    --color-success-bg: rgba(16, 185, 129, 0.12);
    --color-success-text: #34d399;
    --color-error-bg: rgba(239, 68, 68, 0.12);
    --color-error-text: #f87171;

    --radius: 16px;
    --radius-btn: 10px;
    --max-width: 1320px;
    --font: 'Space Grotesk', 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

.accent { background: var(--gradient-heading); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.85rem 1.9rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    font-size: 0.95rem;
}
.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: 0 8px 22px rgba(232, 85, 222, 0.28); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(232, 85, 222, 0.4); }
.btn-outline { border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); transform: translateY(-3px); }
.btn-ghost { color: var(--color-text-muted); border-color: var(--color-border); }
.btn-ghost:hover { border-color: var(--color-text-muted); color: #fff; }
.btn-sm { padding: 0.55rem 1.3rem; font-size: 0.85rem; }
.btn-full { width: 100%; text-align: center; }
.btn-icon { display: inline-flex; align-items: center; gap: 0.6rem; }

/* ===== Header / Nav ===== */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(13, 5, 24, 0.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
}
.logo { font-size: 1.4rem; font-weight: 700; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 500; color: var(--color-text-muted); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}
.menu-toggle span { width: 26px; height: 3px; background: #fff; border-radius: 2px; }

/* ===== Hero ===== */
.hero { padding: 6rem 0 5rem; position: relative; overflow: hidden; }
.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    opacity: 0.55;
    animation: floatBlob 10s ease-in-out infinite;
}
.hero::before { width: 380px; height: 380px; background: var(--gradient-hero); top: -120px; right: -80px; }
.hero::after { width: 300px; height: 300px; background: var(--gradient-blue); bottom: -100px; left: -60px; animation-delay: -4s; }

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}
.hero-greeting { color: var(--color-primary); font-weight: 600; margin-bottom: 0.5rem; letter-spacing: 0.03em; }
.hero-text h1 { font-size: 3.2rem; font-weight: 700; margin-bottom: 0.25rem; line-height: 1.1; }
.hero-text h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.25rem; }
.hero-desc { max-width: 500px; margin-bottom: 2rem; color: var(--color-text-muted); }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.contact-hero { padding: 4.5rem 0 3rem; }
.contact-hero-content { grid-template-columns: 1fr; text-align: center; }
.contact-hero-content .hero-text { margin: 0 auto; }
.contact-hero-content .hero-desc { margin: 0 auto; }
.contact-hero .hero-text h1 { font-size: 2.6rem; }

.hero-image { position: relative; }
.hero-image img {
    border-radius: 50%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 10px rgba(232, 85, 222, 0.08), 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: floatY 5s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.08); }
}

/* ===== Sections ===== */
.section { padding: 5rem 0; position: relative; }
.section-alt { background: var(--color-bg-alt); }
.section-title { font-size: 2.2rem; margin-bottom: 0.6rem; text-align: center; font-weight: 700; }
.section-subtitle { text-align: center; color: var(--color-text-muted); max-width: 520px; margin: 0 auto 2.5rem; }
.page-section { padding-top: 3.5rem; }
.page-title { font-size: 2.4rem; margin-bottom: 0.5rem; font-weight: 700; }
.page-subtitle { color: var(--color-text-muted); margin-bottom: 2.5rem; }
.text-center { text-align: center; margin-top: 2.5rem; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: start; }
.about-grid p { color: var(--color-text-muted); }
.about-facts li { padding: 0.6rem 0; border-bottom: 1px solid var(--color-border); }

/* ===== Skills ===== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem 1.75rem; }
.skill-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem 1.75rem 1.75rem 1.9rem;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 56px;
    height: 56px;
    border-top: 3px solid var(--skill-color, var(--color-primary));
    border-left: 3px solid var(--skill-color, var(--color-primary));
    border-top-left-radius: var(--radius);
    opacity: 0.7;
}
.skill-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); border-color: rgba(232, 85, 222, 0.4); }
.skill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--skill-color, var(--color-primary));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}
.skill-icon.has-logo {
    background: transparent;
    color: var(--skill-color, var(--color-primary));
    padding: 0;
}
.skill-icon.has-logo svg { width: 100%; height: 100%; }
.skill-card h3 { margin-bottom: 0.6rem; }
.skill-card p { color: var(--color-text-muted); font-size: 0.9rem; }

/* ===== Projects ===== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.project-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(84, 0, 238, 0.25); border-color: rgba(232, 85, 222, 0.4); }
.project-img { position: relative; }
.project-img img { width: 100%; height: 200px; object-fit: cover; }
.category-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: rgba(13, 5, 24, 0.75);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
}
.category-badge-inline { background: var(--gradient-primary); color: #fff; }
.project-info { padding: 1.4rem; }
.project-info h3 { margin-bottom: 0.5rem; }
.project-info p { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 0.9rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.tag { background: rgba(232, 85, 222, 0.12); color: #f0a6ea; font-size: 0.75rem; padding: 0.3rem 0.7rem; border-radius: 20px; }

.project-detail { max-width: 800px; }
.project-detail img.project-detail-img { border-radius: var(--radius); margin: 1.5rem 0; border: 1px solid var(--color-border); }
.back-link { color: var(--color-primary); font-weight: 500; }
.project-detail-desc { margin: 1.5rem 0; color: var(--color-text-muted); }

/* ===== Portfolio categories ===== */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.75rem; }
.category-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.category-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(84, 0, 238, 0.25); border-color: rgba(232, 85, 222, 0.4); }
.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
}
.category-card h3 { margin-bottom: 0.5rem; }
.category-count { color: var(--color-text-muted); font-size: 0.9rem; }

.category-pills { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 2.5rem; }
.category-pill {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.category-pill:hover { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.category-pill.active { background: var(--gradient-primary); color: #fff; border-color: transparent; }

/* ===== Forms ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.45rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem 0.95rem;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-text);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #6e6486; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--color-primary); }
.form-check label { display: flex; align-items: center; gap: 0.5rem; font-weight: normal; }
.form-check input { width: auto; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; }
.contact-form { max-width: 500px; }

.contact-info-list { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-info-item:hover { transform: translateX(6px); border-color: rgba(232, 85, 222, 0.4); box-shadow: 0 10px 26px rgba(84, 0, 238, 0.18); }
.contact-info-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-color, var(--color-primary));
    color: #fff;
}
.contact-info-label { display: block; font-size: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.2rem; }
.contact-info-value { display: block; font-weight: 600; color: #fff; word-break: break-word; }

.alert { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1.5rem; }
.alert-success { background: var(--color-success-bg); color: var(--color-success-text); border: 1px solid rgba(52, 211, 153, 0.3); }
.alert-error { background: var(--color-error-bg); color: var(--color-error-text); border: 1px solid rgba(248, 113, 113, 0.3); }
.alert-error ul { padding-left: 1.2rem; list-style: disc; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--color-border); background: var(--color-bg-alt); padding: 4rem 0 0; margin-top: 3rem; }

.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-col h4 { font-size: 1rem; margin-bottom: 1.2rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-links a { color: var(--color-text-muted); transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

.footer-logo { display: inline-block; font-size: 1.5rem; font-weight: 700; margin-bottom: 0.9rem; }
.footer-desc { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 1.3rem; max-width: 320px; }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    transition: all 0.2s ease;
}
.footer-social a:hover { background: var(--gradient-primary); border-color: transparent; color: #fff; transform: translateY(-3px); }

.footer-lead p { color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 1.1rem; }
.footer-subscribe-form {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}
.footer-subscribe-form input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.85rem;
}
.footer-subscribe-form input::placeholder { color: #6e6486; }
.footer-subscribe-form input:focus { outline: none; background: rgba(255, 255, 255, 0.08); }
.footer-subscribe-form button {
    border: none;
    padding: 0 1.4rem;
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}
.footer-subscribe-form button:hover { opacity: 0.9; }
.footer-subscribe-success { color: var(--color-success-text); font-size: 0.85rem; margin-top: 0.8rem; }

.footer-bottom { border-top: 1px solid var(--color-border); padding: 1.5rem 0; text-align: center; }
.footer-bottom p { color: var(--color-text-muted); font-size: 0.85rem; }

/* ===== WhatsApp floating button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    z-index: 999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6); }
.whatsapp-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    animation: whatsappPulse 2.2s ease-out infinite;
    z-index: -1;
}
@keyframes whatsappPulse {
    0% { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(1.8); opacity: 0; }
}
@media (max-width: 560px) {
    .whatsapp-float { width: 52px; height: 52px; bottom: 16px; right: 16px; }
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--color-border);
        display: none;
        gap: 1rem;
    }
    .nav-links.open { display: flex; }
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-image { order: -1; max-width: 220px; margin: 0 auto; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 2.4rem; }
}
