/* =========================================================
   Portfolio dark theme — built on top of Bootstrap 5
   Color system, layout and components for all 5 pages.
   ========================================================= */

:root {
    --bg-body: #0a0e1b;
    --bg-body-alt: #0c1122;
    --bg-card: #121729;
    --bg-card-hover: #161c34;
    --bg-elevated: #171d35;

    --border-subtle: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.22);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-blue: #3b82f6;
    --accent-purple: #7c6cf0;
    --accent-indigo: #6366f1;
    --accent-cyan: #38bdf8;

    --accent-orange: #f59e0b;
    --accent-teal: #14b8a6;
    --accent-green: #22c55e;
    --accent-pink: #ec4899;

    --gradient-brand: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    --gradient-btn: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-purple) 100%);

    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --shadow-glow: 0 0 0 1px var(--border-subtle), 0 20px 40px -20px rgba(99, 102, 241, 0.25);

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-fa: 'Vazirmatn', 'Inter', system-ui, sans-serif;
}

html[dir="rtl"] body {
    font-family: var(--font-fa);
}

html[dir="ltr"] body {
    font-family: var(--font-sans);
}

/* ---------- base ---------- */

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    background-image:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
        radial-gradient(ellipse 700px 500px at 85% 10%, rgba(56, 189, 248, 0.10), transparent 60%);
    background-attachment: fixed;
}

a { text-decoration: none; }

.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

.text-secondary-custom { color: var(--text-secondary) !important; }
.text-muted-custom { color: var(--text-muted) !important; }

.bg-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.bg-card-hover {
    transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}

.bg-card-hover:hover {
    border-color: var(--border-strong);
    background-color: var(--bg-card-hover);
    transform: translateY(-3px);
}

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

.btn-brand {
    background: var(--gradient-btn);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: .65rem 1.5rem;
    border-radius: var(--radius-md);
    transition: box-shadow .2s ease, transform .2s ease;
}

.btn-brand:hover {
    color: #fff;
    box-shadow: 0 10px 25px -8px rgba(124, 108, 240, 0.6);
    transform: translateY(-1px);
}

.btn-outline-brand {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    font-weight: 600;
    padding: .65rem 1.5rem;
    border-radius: var(--radius-md);
    transition: background-color .2s ease, border-color .2s ease;
}

.btn-outline-brand:hover {
    background-color: var(--bg-elevated);
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

/* ---------- image placeholders (design mockups from the PSD/Figma) ---------- */

.img-placeholder {
    background-color: var(--bg-elevated);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: .85rem;
    padding: 1rem;
    min-height: 220px;
}

/* ---------- navbar ---------- */

.navbar-brand-portfolio {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    color: var(--text-primary) !important;
}

.navbar-brand-portfolio .logo-badge {
    width: 38px;
    height: 38px;
    border-radius: .6rem;
    background: var(--gradient-btn);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.site-navbar {
    background-color: rgba(10, 14, 27, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
}

.site-navbar .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: .5rem 1rem !important;
    position: relative;
}

.site-navbar .nav-link.active,
.site-navbar .nav-link:hover {
    color: var(--text-primary);
}

.site-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: -2px;
    height: 2px;
    background: var(--gradient-brand);
    border-radius: 2px;
}

.lang-switch a {
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: .2rem .55rem;
    border-radius: .4rem;
}

.lang-switch a.active {
    color: var(--text-primary);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-strong);
}

/* ---------- breadcrumb ---------- */

.page-breadcrumb {
    font-size: .8rem;
    color: var(--text-muted);
}

.page-breadcrumb a { color: var(--text-muted); }
.page-breadcrumb a:hover { color: var(--text-secondary); }

/* ---------- hero (home) ---------- */

.hero-section { padding: 5rem 0 3rem; }

.hero-greeting {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.hero-name {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
}

.hero-subtitle {
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 1.15rem;
}

/* fake terminal window */
.terminal-window {
    background-color: #0d1120;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glow);
}

.terminal-header {
    background-color: #10162a;
    padding: .65rem .9rem;
    display: flex;
    gap: .4rem;
    border-bottom: 1px solid var(--border-subtle);
}

.terminal-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-body {
    padding: 1.1rem 1.2rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: .8rem;
    line-height: 1.9;
    color: #c7d2fe;
    direction: ltr;
    text-align: left;
}

.terminal-body .cmd { color: #f1f5f9; }
.terminal-body .muted { color: var(--text-muted); }
.terminal-body .ok { color: var(--accent-green); }

/* tech stack pills */
.tech-pill {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: .6rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    font-size: .9rem;
    color: var(--text-primary);
}

.tech-pill i { font-size: 1.1rem; color: var(--accent-purple); }

/* ---------- generic icon tile ---------- */

.icon-tile {
    width: 48px;
    height: 48px;
    border-radius: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    flex-shrink: 0;
}

.icon-tile.purple { background: linear-gradient(135deg, #7c6cf0, #6366f1); }
.icon-tile.blue   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.icon-tile.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.icon-tile.teal   { background: linear-gradient(135deg, #2dd4bf, #14b8a6); }
.icon-tile.green  { background: linear-gradient(135deg, #4ade80, #22c55e); }
.icon-tile.pink   { background: linear-gradient(135deg, #f472b6, #ec4899); }

/* ---------- project card ---------- */

.project-card { overflow: hidden; }

.project-card .project-thumb {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.badge-soft {
    background-color: rgba(124, 108, 240, 0.14);
    color: #b4a9f8;
    font-weight: 600;
    font-size: .75rem;
    padding: .35rem .7rem;
    border-radius: .5rem;
    border: 1px solid rgba(124, 108, 240, 0.25);
}

.link-arrow {
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.link-arrow i { transition: transform .2s ease; }
.link-arrow:hover i { transform: translateX(3px); }
html[dir="rtl"] .link-arrow:hover i { transform: translateX(-3px); }

/* ---------- CTA banner ---------- */

.cta-banner {
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.18), rgba(56, 189, 248, 0.08));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.cta-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(124, 108, 240, 0.15);
    border: 1px solid rgba(124, 108, 240, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* ---------- about page ---------- */

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    color: var(--text-secondary);
    margin-bottom: .6rem;
}

.checklist li i { color: var(--accent-indigo); margin-top: .2rem; }

.timeline {
    position: relative;
    padding-inline-start: 1.9rem;
    border-inline-start: 2px solid var(--border-strong);
}

.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    inset-inline-start: -2.45rem;
    top: .1rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-indigo);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.timeline-year {
    font-size: .75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: .03em;
}

.skill-row { margin-bottom: 1.1rem; }

.skill-row .skill-label {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    margin-bottom: .4rem;
    color: var(--text-secondary);
}

.skill-row .skill-label span:first-child { color: var(--text-primary); font-weight: 600; }

.skill-bar-bg {
    height: 6px;
    border-radius: 999px;
    background-color: var(--bg-elevated);
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--gradient-brand);
}

/* ---------- services page ---------- */

.service-card { padding: 1.75rem; height: 100%; }

.service-num {
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* ---------- contact page ---------- */

.contact-info-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-info-item i {
    width: 38px;
    height: 38px;
    border-radius: .6rem;
    background-color: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--accent-green);
}

.availability-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.form-control-dark,
.form-select-dark {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: .7rem .9rem;
}

.form-control-dark::placeholder { color: var(--text-muted); }

.form-control-dark:focus,
.form-select-dark:focus {
    background-color: var(--bg-elevated);
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 .2rem rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

.form-select-dark option { background-color: var(--bg-card); color: var(--text-primary); }

/* ---------- footer ---------- */

.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2rem 0;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: .6rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color .2s ease, border-color .2s ease;
}

.footer-social a:hover { color: var(--text-primary); border-color: var(--accent-purple); }

/* ---------- responsive ---------- */

@media (max-width: 767.98px) {
    .hero-name { font-size: 2.1rem; }
    .section { padding: 3rem 0; }
}
