/* ==========================================
   Premium Glassmorphism Stylesheet - ZamanDev
   ========================================== */

:root {
    /* Premium Tailored HSL Color Palette */
    --bg-dark: hsl(240, 20%, 5%);
    --panel-bg: hsla(240, 15%, 10%, 0.6);
    --panel-border: hsla(240, 15%, 20%, 0.4);
    
    --accent-purple: hsl(271, 76%, 53%);
    --accent-cyan: hsl(186, 100%, 48%);
    --accent-green: hsl(145, 100%, 45%);
    --text-primary: hsl(0, 0%, 96%);
    --text-secondary: hsl(240, 5%, 70%);
    --text-muted: hsl(240, 5%, 50%);
    
    /* Font Families */
    --font-fa: 'Vazirmatn', sans-serif;
    --font-en: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    transition: background-color 0.5s ease;
}

/* Bilingual Engine Rules */
body.lang-fa {
    font-family: var(--font-fa);
    direction: rtl;
}

body.lang-en {
    font-family: var(--font-en);
    direction: ltr;
}

/* Dual-Language Visibility Toggle - Removed to prevent invisible elements with both data-fa and data-en attributes */


/* Glowing Ambient Background */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    mix-blend-mode: screen;
    animation: pulse 12s infinite alternate ease-in-out;
}

.glow-sphere.purple {
    top: -10%;
    left: 10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    animation-delay: 0s;
}

.glow-sphere.cyan {
    bottom: 5%;
    right: 5%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
    animation-delay: 3s;
}

.glow-sphere.green {
    top: 40%;
    left: 45%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, var(--accent-green), transparent 70%);
    animation-delay: 6s;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.12; }
    50% { transform: scale(1.15) translate(3%, -3%); opacity: 0.18; }
    100% { transform: scale(0.9) translate(-3%, 3%); opacity: 0.12; }
}

/* Glassmorphic Panel Utility */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Header Navbar Style */
header {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1200px;
    z-index: 1000;
    background: hsla(240, 15%, 6%, 0.65);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 12px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 36px;
    width: 36px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 1px;
    font-family: var(--font-en);
}

.logo-accent {
    color: var(--accent-cyan);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px var(--accent-green);
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: inherit;
    animation: ripple 1.6s infinite ease-out;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.5); opacity: 0; }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 12px var(--accent-cyan);
}

/* Bilingual switcher */
.lang-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: 30px;
    padding: 3px;
    font-family: var(--font-en);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--text-primary);
    color: var(--bg-dark);
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 24px 80px 24px;
}

/* Hero Section Style */
.hero-section {
    padding: 48px;
    margin-bottom: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 30px;
    overflow: hidden;
    margin: 0 auto;
}

.image-border-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
}

.personal-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .personal-photo {
    transform: scale(1.06);
}

.hero-text-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Badges */
.badge {
    background: hsla(186, 100%, 48%, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(186, 100, 48, 0.2);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    width: fit-content;
}

.personal-name {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.personal-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-top: -8px;
}

.bio-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Stats Cards inside Hero */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 16px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.stat-card:hover {
    border-color: var(--panel-border);
}

.stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-en);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Headings utilities */
.section-scroll {
    margin-bottom: 100px;
}

.section-heading {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
    border-radius: 3px;
}

body.lang-fa .section-heading::after {
    background: linear-gradient(270deg, var(--accent-cyan), transparent);
}

.section-subheading {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Projects Grid Styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.project-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* Glow-bg effects for cards */
.card-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
}

.card-glow.bg-purple { background-color: var(--accent-purple); }
.card-glow.bg-cyan { background-color: var(--accent-cyan); }
.card-glow.bg-green { background-color: var(--accent-green); }

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}

.project-icon {
    font-size: 1.8rem;
    color: var(--accent-cyan);
}

.project-tag {
    font-family: var(--font-en);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 30px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.project-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    flex-grow: 1;
}

.project-footer {
    margin-top: 12px;
    z-index: 2;
}

.visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.visit-btn i {
    transition: transform 0.3s ease;
}

body.lang-fa .visit-btn i {
    transform: rotate(0deg);
}

body.lang-en .visit-btn i {
    transform: rotate(180deg);
}

.project-card:hover .visit-btn i {
    transform: translateX(-4px);
}

body.lang-en .project-card:hover .visit-btn i {
    transform: translateX(4px);
}

.visit-btn:hover {
    color: var(--text-primary);
}

/* Bots section Styles */
.bots-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.bot-card {
    padding: 40px;
}

.bot-card:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.bot-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 16px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

body.lang-en .bot-badge {
    left: auto;
    right: 20px;
}

.bot-card-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 32px;
    align-items: center;
}

.bot-icon-wrapper {
    width: 100px;
    height: 100px;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent-purple);
    box-shadow: inset 0 0 20px rgba(138, 43, 226, 0.2);
}

.bot-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bot-title {
    font-size: 1.5rem;
    font-weight: 800;
}

.bot-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.bot-actions {
    margin-top: 8px;
}

.bot-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-purple);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(138, 43, 226, 0.35);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.bot-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(138, 43, 226, 0.5);
    background: hsl(271, 76%, 58%);
}

.bots-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

/* Tech cloud section */
.skills-panel {
    padding: 48px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.skills-category {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    font-family: var(--font-en);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(186, 100, 48, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: scale(1.05);
}

/* Contact block style */
.contact-card {
    padding: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.contact-glow {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-green), transparent 70%);
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
}

.contact-heading {
    font-size: 2.2rem;
    font-weight: 800;
}

.contact-desc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
}

.contact-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(74, 240, 145, 0.08);
    border: 1px solid rgba(74, 240, 145, 0.2);
    color: var(--accent-green);
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
}

.pulse-dot-green {
    width: 10px;
    height: 10px;
    background-color: var(--accent-green);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px var(--accent-green);
}

.pulse-dot-green::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: inherit;
    animation: ripple 1.6s infinite ease-out;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 12px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 28px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.contact-btn:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-primary);
}

.contact-btn.telegram {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(0, 240, 255, 0.25);
}

.contact-btn.telegram:hover {
    background: hsl(186, 100%, 53%);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.45);
}

.contact-btn.showcase {
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.06));
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.contact-btn.showcase:hover {
    background: var(--accent-green);
    color: var(--bg-dark);
    box-shadow: 0 10px 24px rgba(74, 240, 145, 0.3);
}

/* Footer styles */
footer {
    border-top: 1px solid var(--panel-border);
    background: hsla(240, 15%, 4%, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px 24px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.copyright span {
    font-weight: 700;
}

.footer-status {
    font-family: var(--font-en);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* RESPONSIVE DESIGN - MEDIA QUERIES */
@media (max-width: 1024px) {
    .skills-panel {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        top: 16px;
        width: calc(100% - 32px);
        padding: 10px 16px;
    }
    
    .nav-links {
        display: none; /* Keep it clean for mobile, just logo and language switcher */
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .hero-text-content {
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        gap: 12px;
    }
    
    .personal-name {
        font-size: 2.2rem;
    }
    
    .skills-panel {
        grid-template-columns: 1fr;
        padding: 24px;
    }
    
    .bot-card-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }
    
    .bot-icon-wrapper {
        margin: 0 auto;
    }
    
    .contact-card {
        padding: 32px 16px;
    }
    
    .contact-heading {
        font-size: 1.6rem;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
