:root {
    --bg-primary: #03050c;
    --bg-secondary: #070b16;
    --bg-surface: rgba(13, 19, 36, 0.75);
    --bg-card: rgba(16, 24, 46, 0.6);
    --bg-card-hover: rgba(22, 34, 62, 0.85);
    
    --accent-blue: #0052ff;
    --accent-cyan: #00d4ff;
    --accent-indigo: #3b82f6;
    --accent-glow: rgba(0, 212, 255, 0.3);
    --accent-glow-strong: rgba(0, 82, 255, 0.6);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #38bdf8;

    --border-color: rgba(59, 130, 246, 0.2);
    --border-hover: rgba(0, 212, 255, 0.5);
    
    --font-fa: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'Fira Code', 'JetBrains Mono', monospace;
    --font-en: 'Inter', sans-serif;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --box-shadow-glow: 0 0 30px rgba(0, 82, 255, 0.3);
    --box-shadow-card: 0 12px 35px -10px rgba(0, 0, 0, 0.6);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container-max: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(0, 82, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 50%, rgba(0, 212, 255, 0.08) 0%, transparent 40%);
    color: var(--text-primary);
    font-family: var(--font-fa);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.ambient-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: -1;
}

.ambient-top {
    top: 5%;
    right: -100px;
    background: rgba(0, 82, 255, 0.25);
}

.ambient-bottom {
    bottom: 10%;
    left: -100px;
    background: rgba(0, 212, 255, 0.15);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.3;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

code, pre {
    font-family: var(--font-code);
    direction: ltr;
    text-align: left;
}

.container {
    width: 90%;
    max-width: var(--container-max);
    margin: 0 auto;
}

.glass-panel {
    background: linear-gradient(135deg, rgba(13, 19, 36, 0.8) 0%, rgba(7, 11, 22, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--box-shadow-card);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--border-hover);
    box-shadow: 0 14px 40px -10px rgba(0, 82, 255, 0.25);
    transform: translateY(-2px);
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #38bdf8 40%, #0052ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.section-subtitle {
    color: var(--accent-cyan);
    font-family: var(--font-code);
    font-size: 0.95rem;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 0.5rem;
    direction: ltr;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.section-line {
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    margin: 1.2rem auto 0;
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    font-family: var(--font-fa);
}

.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #003db3);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 82, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-glow-strong);
}

.btn-secondary {
    background: rgba(13, 19, 36, 0.9);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 82, 255, 0.12);
    color: var(--accent-cyan);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.35) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.btn-glow:hover::after {
    opacity: 1;
}

.w-100 {
    width: 100%;
}

.mt-1 {
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

.navbar-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: var(--transition-smooth);
}

.navbar-header.scrolled {
    padding: 0.75rem 0;
    background: rgba(3, 5, 12, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.2rem;
}

.logo-box {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #03050c;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-code);
    font-weight: 900;
    font-size: 1.15rem;
    box-shadow: 0 0 20px var(--accent-glow);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 0.3rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: var(--transition-fast);
}

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

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

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

.hero-section {
    padding: clamp(8rem, 15vh, 12rem) 0 5rem;
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

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

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero-subtitle-wrapper {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 2.2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.typing-text {
    color: var(--accent-cyan);
    font-weight: 700;
}

.cursor {
    color: var(--accent-blue);
    animation: blink 0.8s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.tech-stack-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.tech-pill {
    padding: 0.35rem 0.85rem;
    background: rgba(13, 19, 36, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    direction: ltr;
}

.hero-cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.glow-card-hero {
    background: #060a16;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 82, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.card-header-dots {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.card-title-code {
    margin-left: auto;
    color: var(--text-muted);
    font-family: var(--font-code);
    font-size: 0.8rem;
    direction: ltr;
}

.code-block {
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.6;
}

.code-block .kwd { color: #f43f5e; }
.code-block .var { color: #38bdf8; }
.code-block .prop { color: #a78bfa; }
.code-block .str { color: #34d399; }
.code-block .func { color: #fbbf24; }

.stats-section {
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.stat-card {
    padding: 1.8rem 1rem;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--accent-cyan);
    font-family: var(--font-code);
}

.stat-plus {
    font-size: 2rem;
    color: var(--accent-blue);
    font-family: var(--font-code);
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

.about-section {
    padding: 6rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.about-card {
    padding: 2.2rem;
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
}

.about-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--accent-cyan);
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
}

.skills-section {
    padding: 6rem 0;
    background: rgba(5, 8, 17, 0.5);
}

.skill-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-fa);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 0 20px var(--accent-glow-strong);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.skill-card {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skill-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.skill-name {
    font-size: 1.15rem;
    direction: ltr;
    text-align: right;
}

.skill-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: var(--accent-cyan);
    border-radius: 4px;
    font-family: var(--font-code);
}

.skill-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.skill-level-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 3px;
    transition: width 1s ease-in-out;
}

.skill-percent {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-code);
    text-align: left;
    display: block;
    direction: ltr;
}

.projects-section {
    padding: 6rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.2rem;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-image-preview {
    background: #060a16;
    padding: 1.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    min-height: 140px;
}

.project-mock-window {
    background: #03050c;
    border-radius: 8px 8px 0 0;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

.window-bar {
    display: flex;
    gap: 5px;
    margin-bottom: 0.6rem;
}

.w-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.project-code-snippet {
    font-size: 0.8rem;
    color: var(--text-accent);
}

.project-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    direction: ltr;
}

.project-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

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

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

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

.project-actions {
    margin-top: auto;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.terminal-section {
    padding: 6rem 0;
    background: rgba(5, 8, 17, 0.6);
}

.terminal-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-hover);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    direction: ltr;
    text-align: left;
}

.terminal-header {
    background: #0a0f1d;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.btn-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.btn-dot.close { background: #ff5f56; }
.btn-dot.minimize { background: #ffbd2e; }
.btn-dot.maximize { background: #27c93f; }

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

.terminal-badge {
    font-family: var(--font-code);
    font-size: 0.7rem;
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.terminal-body {
    background: #03050c;
    padding: 1.5rem;
    min-height: 280px;
    max-height: 420px;
    overflow-y: auto;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.7;
}

.terminal-line {
    margin-bottom: 0.6rem;
}

.cmd-highlight {
    color: var(--accent-cyan);
    font-weight: 700;
}

.cmd-tag {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.cmd-tag:hover {
    background: var(--accent-blue);
    color: #fff;
}

.terminal-input-row {
    background: #070b16;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-top: 1px solid var(--border-color);
}

.prompt-symbol {
    color: #34d399;
    font-family: var(--font-code);
    font-weight: 700;
    white-space: nowrap;
}

#terminal-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--accent-cyan);
    font-family: var(--font-code);
    font-size: 0.95rem;
}

.terminal-submit-btn {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-family: var(--font-fa);
    font-size: 0.85rem;
    cursor: pointer;
}

.timeline-section {
    padding: 6rem 0;
}

.timeline-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    right: 25px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-blue), transparent);
}

.timeline-item {
    position: relative;
    padding-right: 70px;
    margin-bottom: 2.5rem;
}

.timeline-icon {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 0 15px var(--accent-glow);
    z-index: 2;
}

.timeline-content {
    padding: 1.8rem;
}

.timeline-date {
    display: inline-block;
    color: var(--accent-cyan);
    font-family: var(--font-code);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.timeline-role {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
}

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

.contact-section {
    padding: 6rem 0;
    background: rgba(5, 8, 17, 0.6);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2.5rem;
}

.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-card {
    padding: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.c-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    background: rgba(0, 82, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c-details {
    flex-grow: 1;
}

.c-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.c-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.98rem;
    direction: ltr;
    text-align: right;
}

.copy-btn {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-fa);
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background: var(--accent-blue);
    color: #fff;
}

.social-links-inline {
    display: flex;
    gap: 1rem;
    margin-top: 0.3rem;
}

.social-links-inline a {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    font-weight: 600;
}

.contact-form-wrapper {
    padding: 2.2rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
}

.form-group input, .form-group textarea, .select-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(3, 5, 12, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-fa);
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition-fast);
}

.select-input option {
    background: #070b16;
    color: #fff;
}

.form-group input:focus, .form-group textarea:focus, .select-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.auth-modal-box {
    max-width: 480px;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.auth-tab-btn {
    flex: 1;
    padding: 0.7rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-fa);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.auth-tab-btn.active {
    background: rgba(0, 82, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid var(--border-hover);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.admin-hint-box {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--accent-cyan);
    margin: 1rem 0;
}

.dashboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 5, 12, 0.96);
    backdrop-filter: blur(15px);
    z-index: 1500;
    display: none;
    overflow-y: auto;
    padding: 2rem 0;
}

.dashboard-overlay.active {
    display: block;
}

.dashboard-container {
    max-width: 1100px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 2rem;
    margin-bottom: 1.8rem;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #03050c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
}

.dash-user-name {
    font-size: 1.2rem;
}

.user-role-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.6rem;
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.dashboard-body-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.8rem;
}

.dashboard-sidebar {
    padding: 1.2rem;
}

.dash-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dash-nav-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-fa);
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-align: right;
    cursor: pointer;
    transition: var(--transition-fast);
}

.dash-nav-btn:hover, .dash-nav-btn.active {
    background: rgba(0, 82, 255, 0.15);
    border-color: var(--border-hover);
    color: var(--accent-cyan);
}

.dash-nav-btn.admin-only {
    border-right: 3px solid #f43f5e;
}

.dashboard-content {
    padding: 2rem;
    min-height: 500px;
}

.dash-tab-pane {
    display: none;
}

.dash-tab-pane.active {
    display: block;
}

.dash-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.new-ticket-card {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.btn-group-row {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.ticket-item-card {
    background: rgba(7, 11, 22, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.4rem;
    margin-bottom: 1.2rem;
}

.ticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.ticket-title {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.ticket-status {
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.ticket-status.pending { background: rgba(234, 179, 8, 0.15); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
.ticket-status.answered { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }

.ticket-msg-body {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.ticket-replies-list {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.reply-bubble {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.reply-bubble.admin {
    background: rgba(0, 82, 255, 0.15);
    border-right: 3px solid var(--accent-cyan);
}

.reply-bubble.user {
    background: rgba(255, 255, 255, 0.04);
}

.contract-doc-card {
    background: #050812;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.contract-terms-text {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: 8px;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 1rem 0;
}

.signature-modal-box {
    max-width: 560px;
    text-align: center;
}

.sig-title {
    color: var(--accent-cyan);
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}

.sig-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.canvas-wrapper {
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    overflow: hidden;
}

#signature-pad {
    width: 100%;
    height: 180px;
    cursor: crosshair;
    touch-action: none;
}

.sig-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 5, 12, 0.88);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 90%;
    max-width: 650px;
    padding: 2.5rem;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-cyan);
}

.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toast {
    background: #070b16;
    border: 1px solid var(--accent-cyan);
    color: var(--text-primary);
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease forwards;
    direction: rtl;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.footer {
    background: #020308;
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 0;
}

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

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.8rem;
}

.footer-links h4, .footer-seo h4 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-seo p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-bottom {
    background: #010205;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.back-to-top {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-fa);
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.back-to-top:hover {
    background: var(--accent-blue);
    color: #fff;
}

@media (max-width: 992px) {
    .dashboard-body-grid {
        grid-template-columns: 1fr;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle-wrapper {
        justify-content: center;
    }

    .tech-stack-pills {
        justify-content: center;
    }

    .hero-cta-buttons {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(3, 5, 12, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition-smooth);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 2rem;
    }

    .mobile-toggle {
        display: flex;
    }

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

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