/* ==========================================================================
   NANAZ CODE - CYBERPUNK & CODING THEME STYLESHEET
   Author: Nanaz Code Team
   Fonts: Vazirmatn (FA), JetBrains Mono (Code), Orbitron (Cyber Headings)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=JetBrains+Mono:ital,wght@0,300;0,500;0,700;1,400&family=Orbitron:wght@600;800;900&family=Vazirmatn:wght@300;400;500;700;900&display=swap');

:root {
    --bg-dark: #06090e;
    --bg-surface: #0b101d;
    --bg-card: rgba(14, 20, 34, 0.85);
    --bg-card-border: rgba(0, 243, 255, 0.18);
    
    --cyan: #00f3ff;
    --cyan-glow: rgba(0, 243, 255, 0.4);
    --green: #00ff66;
    --green-glow: rgba(0, 255, 102, 0.35);
    --purple: #a855f7;
    --pink: #ff007f;
    --yellow: #facc15;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-fa: 'Vazirmatn', -apple-system, sans-serif;
    --font-code: 'JetBrains Mono', 'Fira Code', monospace;
    --font-cyber: 'Orbitron', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Setup */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: var(--font-fa);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Matrix Canvas */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    opacity: 0.18;
    pointer-events: none;
}

/* Cyber Grid Effect Overlay */
.cyber-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.cyber-title {
    font-family: var(--font-fa);
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, var(--cyan) 50%, var(--green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
}

.cyber-code-font {
    font-family: var(--font-code);
    direction: ltr;
    display: inline-block;
}

.text-cyan { color: var(--cyan) !important; }
.text-green { color: var(--green) !important; }
.text-purple { color: var(--purple) !important; }
.text-pink { color: var(--pink) !important; }

/* Header & Navigation Bar */
.navbar-cyber {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(6, 9, 14, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 243, 255, 0.15);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cyber-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-family: var(--font-cyber);
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
}

.cyber-logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(0,243,255,0.2), rgba(0,255,102,0.2));
    border: 1.5px solid var(--cyan);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 1.2rem;
    box-shadow: 0 0 15px var(--cyan-glow);
    animation: pulseGlow 3s infinite alternate;
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    position: relative;
    padding: 0.4rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan-glow);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, var(--cyan), #00b4d8);
    color: #06090e;
    font-weight: 700;
    padding: 0.55rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 0 15px var(--cyan-glow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.7);
    color: #000;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    font-size: 1.3rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
}

/* Layout Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.hero-section {
    padding: 5rem 0 4rem;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.3);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--cyan);
    margin-bottom: 1.5rem;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--green);
    animation: blink 1.5s infinite;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Cyber Buttons */
.btn-cyber-primary {
    background: linear-gradient(135deg, var(--cyan), #0284c7);
    color: #06090e;
    font-weight: 700;
    padding: 0.85rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 0 20px var(--cyan-glow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-cyber-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.8);
    color: #000;
}

.btn-cyber-outline {
    background: rgba(14, 20, 34, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: var(--cyan);
    font-weight: 600;
    padding: 0.85rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
}

.btn-cyber-outline:hover {
    background: rgba(0, 243, 255, 0.12);
    border-color: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
    color: #fff;
    transform: translateY(-3px);
}

.btn-code-link {
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
    font-family: var(--font-code);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.btn-code-link:hover {
    background: var(--green);
    color: #06090e;
    box-shadow: 0 0 15px var(--green-glow);
}

/* Terminal Window Widget */
.terminal-window {
    background: #090d16;
    border: 1px solid var(--bg-card-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 243, 255, 0.1);
}

.terminal-header {
    background: #0e1524;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
    display: flex;
    gap: 0.4rem;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-title {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.25rem;
    font-family: var(--font-code);
    font-size: 0.88rem;
    direction: ltr;
    text-align: left;
    color: #a7f3d0;
    min-height: 220px;
}

.terminal-line {
    margin-bottom: 0.6rem;
    display: flex;
    gap: 0.5rem;
}

.terminal-prompt {
    color: var(--cyan);
}

.terminal-output {
    color: var(--text-secondary);
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--cyan);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s infinite;
}

/* Cyber Cards System */
.cyber-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cyber-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent);
}

.cyber-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 243, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 243, 255, 0.15);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.cyber-card:hover .service-icon {
    background: var(--cyan);
    color: #06090e;
    box-shadow: 0 0 20px var(--cyan-glow);
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--cyan);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 243, 255, 0.2);
}

.project-thumb {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: #090d16;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-thumb img {
    transform: scale(1.06);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(6, 9, 14, 0.95) 100%);
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(6, 9, 14, 0.85);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    backdrop-filter: blur(8px);
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    flex-grow: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-family: var(--font-code);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    direction: ltr;
}

.project-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.5rem;
}

/* Category Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    color: var(--text-secondary);
    padding: 0.6rem 1.3rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.filter-btn:hover, .filter-btn.active {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
}

/* Form Controls & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background: rgba(9, 13, 22, 0.9);
    border: 1px solid var(--bg-card-border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: #fff;
    font-family: var(--font-fa);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
    background: rgba(14, 20, 34, 0.95);
}

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

/* Alert Messages */
.cyber-alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.cyber-alert-success {
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
}

.cyber-alert-error {
    background: rgba(255, 0, 127, 0.1);
    border: 1px solid var(--pink);
    color: var(--pink);
}

/* Stats Counter Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 4rem 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-family: var(--font-cyber);
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--cyan);
    text-shadow: 0 0 20px var(--cyan-glow);
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Section Divider Header */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem;
}

.section-subtitle {
    color: var(--cyan);
    font-family: var(--font-code);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    direction: ltr;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

/* Footer Section */
.cyber-footer {
    margin-top: auto;
    background: #04060a;
    border-top: 1px solid rgba(0, 243, 255, 0.15);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.92rem;
}

.footer-heading {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: #fff;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--cyan);
    padding_right: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Keyframe Animations */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px var(--cyan-glow); }
    100% { box-shadow: 0 0 25px var(--cyan-glow), 0 0 35px var(--cyan); }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(6, 9, 14, 0.98);
        border-bottom: 1px solid var(--cyan);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
    }

    .nav-menu.show {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}
