/* ==========================================================================
   Design Tokens & Modern Styling
   ========================================================================== */
:root {
    --bg-main: #0a0e17;
    --bg-surface: #111827;
    --bg-card: #162032;
    --bg-card-hover: #1e2c44;
    
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.25);
    
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    --card-gradient: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
    
    --success: #22c55e;
    --success-glow: rgba(34, 197, 94, 0.4);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --border-color: #334155;
    --border-light: rgba(255, 255, 255, 0.08);
    
    --font-fa: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'Fira Code', monospace;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-fa);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.25s ease;
}

ul {
    list-style: none;
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.25rem;
}

.logo-accent {
    font-family: var(--font-code);
    color: var(--primary-light);
    font-weight: 700;
    background: rgba(56, 189, 248, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-light);
}

.nav-cta {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-light) !important;
    padding: 0.45rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary-light);
    font-weight: 600;
}

.nav-cta:hover {
    background: var(--primary-light);
    color: var(--bg-main) !important;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Avatar Card */
.avatar-card {
  position: relative;
  width: 100px;
	height: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 360px;
  padding: 0px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.avatar-img {
  display: block;
  width: 100px;
  height: 100px;
  min-height: 100px;
  object-fit: cover;
  border-radius: 360px;
  border: 2px solid rgba(255,255,255,0.1);
  background-color: #1a2337;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--success);
  background: rgba(52, 211, 153, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
}
.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success); 
}



/* Hero Section */
.hero-section {
    padding: 5.5rem 0 4.5rem;
    background: radial-gradient(circle at 10% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 900;
    margin-bottom: 0.4rem;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 1.25rem;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 2;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.8rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: 0.25s ease;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #0b0f19;
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-light);
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

.btn-block {
    width: 100%;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--border-light);
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-light);
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 0.2rem;
}

/* Pascal Code Card */
.code-card {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 25px 35px -10px rgba(0, 0, 0, 0.6);
    direction: ltr;
    text-align: left;
    font-family: var(--font-code);
}

.code-card-header {
    background: #161b22;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #30363d;
}

.window-buttons {
    display: flex;
    gap: 6px;
    margin-right: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-title {
    color: #8b949e;
    font-size: 0.85rem;
}

.code-card pre {
    padding: 1.25rem 1.5rem;
    font-size: 0.9rem;
    line-height: 1.7;
    overflow-x: auto;
}

.code-card .keyword { color: #ff7b72; font-weight: 600; }
.code-card .variable { color: #79c0ff; }
.code-card .property { color: #d2a8ff; }
.code-card .string { color: #a5d6ff; }
.code-card .number { color: #79c0ff; }
.code-card .comment { color: #8b949e; font-style: italic; }

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.sub-title {
    color: var(--primary-light);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 2.1rem;
    font-weight: 800;
    margin-top: 0.4rem;
}

.section-divider {
    width: 55px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
    margin: 0.8rem auto 0;
}

/* Experience Timeline */
.experience-section {
    padding: 5.5rem 0;
    background: var(--bg-surface);
}

.timeline {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    border-right: 2px solid #2d3748;
    padding-right: 2rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    right: -2.45rem;
    top: 0.4rem;
    width: 14px;
    height: 14px;
    background: var(--bg-surface);
    border: 3px solid #64748b;
    border-radius: 50%;
}

.timeline-dot.current {
    border-color: var(--success);
    background: var(--success);
    box-shadow: 0 0 14px var(--success-glow);
}

.timeline-date {
    color: var(--primary-light);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 1.6rem;
    border-radius: var(--radius-md);
    transition: 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.timeline-item.highlight .timeline-card {
    border-color: rgba(56, 189, 248, 0.4);
    background: linear-gradient(180deg, #18263d 0%, #162032 100%);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.company-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.company-badge.primary {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-light);
}

.status-tag {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.role-summary {
    color: var(--text-muted);
    font-size: 0.96rem;
    margin: 0.9rem 0 1.2rem;
    line-height: 1.9;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    background: #0f172a;
    color: #93c5fd;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    border: 1px solid rgba(147, 197, 253, 0.12);
}

/* Skills */
.skills-section {
    padding: 5.5rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.skill-category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 1.8rem;
    border-radius: var(--radius-md);
    transition: 0.3s ease;
}

.skill-category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.skill-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.2rem;
}

.skill-category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.skill-list li {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-list li i {
    color: var(--primary-light);
    font-size: 0.82rem;
}

/* Projects & Systems */
.projects-section {
    padding: 5.5rem 0;
    background: var(--bg-surface);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.8rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 2rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    transition: 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-badge {
    align-self: flex-start;
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-light);
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

.project-features {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.project-features div {
    font-size: 0.85rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-features div i {
    color: var(--primary-light);
    font-size: 0.8rem;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.project-stack span {
    background: #0f172a;
    color: #94a3b8;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-family: var(--font-code);
}

/* Articles Section */
.articles-section {
    padding: 5.5rem 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
}

.article-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 2rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    transition: 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.article-tag {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
}

.article-read-time {
    color: var(--text-dim);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.article-excerpt {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.8;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.author-note {
    color: var(--text-dim);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.read-link {
    color: var(--primary-light);
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.read-link:hover {
    gap: 0.6rem;
}

/* Contact */
.contact-section {
    padding: 5.5rem 0;
    background: var(--bg-surface);
}

.contact-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.8rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
}

.contact-info h2 {
    font-size: 1.85rem;
    margin-bottom: 0.8rem;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.9;
    margin-bottom: 1.8rem;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.info-item i {
    width: 44px;
    height: 44px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.info-item span {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.info-item p {
    margin: 0;
    font-weight: 600;
    color: var(--text-main);
    direction: ltr;
    text-align: right;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.25s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-light);
    padding: 2.2rem 0;
    background: #080c14;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.copyright {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Responsiveness */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .contact-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-stats {
        grid-template-columns: 1fr;
    }
    .timeline {
        padding-right: 1.5rem;
    }
    .timeline-dot {
        right: -1.95rem;
    }
}

/* Recommendations Section */
.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.8rem;
}
.rec-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 2rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    transition: 0.3s ease;
}

.rec-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.rec-quote {
  font-size: 1.6rem;
  color: var(--primary);
  opacity: 0.4;
  margin-bottom: 0.5rem;
}
.rec-text {
  color: #cbd5e1;
  font-size: 0.93rem;
  font-style: italic;
}