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

body {
    font-family: 'Vazirmatn', 'Segoe UI', monospace;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    padding: 2rem;
    direction: rtl;
}

.code-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(45deg, rgba(0, 255, 255, 0.02) 0px, rgba(0, 255, 255, 0.02) 2px, transparent 2px, transparent 8px);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.portfolio-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    border-radius: 2.5rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    padding: 2.5rem;
}

.header-port {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid #38bdf8;
    padding-bottom: 1.5rem;
}

.header-port h1 {
    font-size: 2rem;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-port h1 i {
    color: #38bdf8;
}

.back-home {
    background: #1e293b;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    border: 1px solid #38bdf8;
}

.back-home:hover {
    background: #38bdf8;
    color: #0f172a;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.project-card {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 1.8rem;
    overflow: hidden;
    border: 1px solid #334155;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: #38bdf8;
    box-shadow: 0 20px 30px -10px #00000080;
}

.project-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(145deg, #2d3a5e, #1a253c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #38bdf8;
    position: relative;
    overflow: hidden;
}

.project-img i {
    z-index: 2;
}

.project-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0,255,255,0.1) 0px, rgba(0,255,255,0.1) 2px, transparent 2px, transparent 8px);
    pointer-events: none;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.4rem;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech {
    background: #0f172a;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #7dd3fc;
    font-family: monospace;
}

.project-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.project-link:hover {
    gap: 12px;
}

.footer-port {
    margin-top: 3rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    color: #7e8aa2;
    font-size: 0.8rem;
}

@media (max-width: 680px) {
    .portfolio-card {
        padding: 1.5rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}