:root {
    --amber: #F2A65A;
    --green: #7FB77E;
}

html {
    scroll-behavior: smooth;
}

.font-fa {
    font-family: 'Vazirmatn', sans-serif;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* ---------- Header ---------- */

#site-header {
    background: transparent;
}

#site-header.scrolled {
    background: rgba(11, 14, 20, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-link::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--amber);
    transition: width 0.25s ease;
}

.nav-link:hover {
    color: #E6E6E6;
}

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

.cta-btn {
    box-shadow: 0 0 0 0 rgba(242, 166, 90, 0.4);
    transition: box-shadow 0.25s ease, background-color 0.2s ease, transform 0.15s ease;
}

.cta-btn:hover {
    box-shadow: 0 0 24px 2px rgba(242, 166, 90, 0.35);
    transform: translateY(-1px);
}

#menu-toggle.is-open .menu-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
#menu-toggle.is-open .menu-bar:nth-child(2) {
    opacity: 0;
}
#menu-toggle.is-open .menu-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- Hero background ---------- */

.hero-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 100%);
}

.hero-glow {
    background: radial-gradient(circle, rgba(242, 166, 90, 0.16) 0%, rgba(242, 166, 90, 0) 70%);
    filter: blur(10px);
}

.floaty {
    animation: floaty 7s ease-in-out infinite;
}
.floaty:nth-of-type(2) {
    animation-duration: 9s;
    animation-delay: 0.5s;
}
.floaty:nth-of-type(3) {
    animation-duration: 8s;
    animation-delay: 1.2s;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
}

/* ---------- Editor window ---------- */

.editor-window {
    background: #0D1117;
}

.editor-body {
    min-height: 220px;
    background:
    linear-gradient(#0D1117, #0D1117) padding-box,
    #0D1117;
}

.editor-body .kw   { color: #C792EA; }   /* keywords: const, function, return */
.editor-body .fn   { color: #82AAFF; }   /* function / property names */
.editor-body .str  { color: var(--green); } /* strings */
.editor-body .cm   { color: #5C6370; }   /* comments */
.editor-body .pn   { color: #9AA1AC; }   /* punctuation */

.code-cursor {
    display: inline-block;
    width: 7px;
    height: 1.1em;
    background: var(--amber);
    margin-inline-start: 2px;
    vertical-align: text-bottom;
    animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ---------- Reveal on load ---------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    .floaty { animation: none; }
    .code-cursor { animation: none; }
}


/* ---------- Stack marquee ---------- */

.stack-marquee {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.stack-track {
    display: flex;
    width: max-content;
    gap: 3.5rem;
    animation: stack-scroll 22s linear infinite;
}

.stack-marquee:hover .stack-track {
    animation-play-state: paused;
}

.stack-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    color: #6B7280;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.stack-item:hover {
    color: #F2A65A;
}

@keyframes stack-scroll {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0%); }
}

@media (prefers-reduced-motion: reduce) {
    .stack-track { animation: none; }
}
/* ---------- Services ---------- */

.svc-card {
    position: relative;
    padding: 2rem 1.75rem;
    border-radius: 0.9rem;
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.svc-card:hover {
    border-color: rgba(242, 166, 90, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -12px rgba(242, 166, 90, 0.15);
}

.svc-tag {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #5C6370;
    margin-bottom: 1.25rem;
}

.svc-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    background: rgba(242, 166, 90, 0.08);
    color: #F2A65A;
    margin-bottom: 1.25rem;
}

.svc-icon svg {
    width: 22px;
    height: 22px;
}

.svc-title {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: #fff;
    margin-bottom: 0.6rem;
}

.svc-desc {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.925rem;
    line-height: 1.85;
    color: #9AA1AC;
    margin-bottom: 1rem;
}

.svc-stack {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #7FB77E;
    direction: ltr;
    text-align: right;
}

/* ---------- Process (tree layout) ---------- */

.proc-tree {
    display: flex;
    flex-direction: column;
}

.proc-center-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(180deg,
        rgba(242,166,90,0.05),
        rgba(242,166,90,0.4) 15%,
        rgba(242,166,90,0.4) 85%,
        rgba(242,166,90,0.05)
    );
}

.proc-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 64px 1fr;
    align-items: center;
    min-height: 8rem;
}

.proc-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
}

.proc-node::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0B0E14;
    border: 2px solid #F2A65A;
    box-shadow: 0 0 0 6px #0B0E14;
    margin-bottom: 0.4rem;
}

.proc-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #6B7280;
    direction: ltr;
}

.proc-side {
    min-height: 1px;
}

.proc-content {
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

/* right-side content (row 1,3,5): pull toward center line */
.proc-row:nth-child(2) .proc-content,
.proc-row:nth-child(4) .proc-content,
.proc-row:nth-child(6) .proc-content {
    margin-right: 1.5rem;
}

/* left-side content (row 2,4): pull toward center line */
.proc-row:nth-child(3) .proc-content,
.proc-row:nth-child(5) .proc-content {
    margin-left: 1.5rem;
    text-align: right;
}

.proc-row:hover .proc-content {
    border-color: rgba(242, 166, 90, 0.35);
}

.proc-title {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.4rem;
}

.proc-desc {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #9AA1AC;
}

/* ---------- Mobile: collapse to single column ---------- */
@media (max-width: 768px) {
    .proc-center-line {
        left: 22px;
    }
    .proc-row {
        grid-template-columns: 44px 1fr;
        min-height: auto;
        padding-bottom: 2.5rem;
    }
    .proc-node {
        width: 44px;
    }
    .proc-side:not(.proc-content) {
        display: none;
    }
    .proc-row:nth-child(2) .proc-content,
    .proc-row:nth-child(3) .proc-content,
    .proc-row:nth-child(4) .proc-content,
    .proc-row:nth-child(5) .proc-content,
    .proc-row:nth-child(6) .proc-content {
        margin: 0 !important;
        text-align: right !important;
    }
}

/* ---------- Work / Portfolio ---------- */

.work-card {
    display: block;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.work-card:hover {
    border-color: rgba(242, 166, 90, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.5);
}

.work-thumb {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #151922;
}

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

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

.work-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.1rem;
    background: linear-gradient(180deg, transparent 40%, rgba(11,14,20,0.9) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-view {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #F2A65A;
}

.work-info {
    padding: 1.1rem 1.35rem 1.4rem;
}

.work-title {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.4rem;
}

.work-tags {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #6B7280;
    direction: ltr;
    text-align: right;
}

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

.cta-input:focus {
    background: #151922;
}

/* ---------- Footer ---------- */

.footer-link {
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #F2A65A;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #9AA1AC;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-icon svg {
    width: 17px;
    height: 17px;
}

.social-icon:hover {
    color: #F2A65A;
    border-color: rgba(242, 166, 90, 0.35);
    transform: translateY(-2px);
}

/* ---------- Testimonials marquee ---------- */

.testi-marquee {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
}

.testi-track {
    display: flex;
    width: max-content;
    gap: 1.25rem;
    padding: 0.5rem 0.75rem;
}

.testi-track-a {
    animation: testi-scroll-rtl 40s linear infinite;
}

.testi-track-b {
    animation: testi-scroll-ltr 40s linear infinite;
}

.testi-marquee:hover .testi-track {
    animation-play-state: paused;
}

@keyframes testi-scroll-rtl {
    from { transform: translateX(0%); }
    to   { transform: translateX(-50%); }
}

@keyframes testi-scroll-ltr {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0%); }
}

.testi-card {
    flex-shrink: 0;
    width: 340px;
    padding: 1.75rem;
    border-radius: 0.9rem;
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.06);
    direction: rtl;
    text-align: right;
}

.testi-text {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    line-height: 1.85;
    color: #C9CDD4;
    margin-bottom: 1.5rem;
}

.testi-author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.testi-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(242, 166, 90, 0.1);
    color: #F2A65A;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
}

.testi-name {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 0.87rem;
    color: #fff;
}

.testi-role {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.76rem;
    color: #6B7280;
    margin-top: 0.1rem;
}

@media (max-width: 640px) {
    .testi-card { width: 280px; }
}

/* ---------- FAQ ---------- */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border-radius: 0.75rem;
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.faq-item.is-open {
    border-color: rgba(242, 166, 90, 0.3);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #E6E6E6;
}

.faq-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #F2A65A;
    font-family: 'JetBrains Mono', monospace;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.faq-item.is-open .faq-icon {
    transform: rotate(45deg);
    background: rgba(242, 166, 90, 0.15);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    line-height: 1.9;
    color: #9AA1AC;
}

/* ---------- Blog ---------- */

.blog-card {
    display: block;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
    border-color: rgba(242, 166, 90, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.5);
}

.blog-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #151922;
}

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

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

.blog-cat {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: #0B0E14;
    background: #F2A65A;
}

.blog-info {
    padding: 1.35rem 1.5rem 1.6rem;
}

.blog-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #6B7280;
    margin-bottom: 0.7rem;
    direction: ltr;
    text-align: right;
}

.blog-title {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 0.6rem;
}

.blog-excerpt {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.87rem;
    line-height: 1.8;
    color: #9AA1AC;
    margin-bottom: 1rem;
}

.blog-readmore {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #F2A65A;
    transition: gap 0.2s ease;
}

.blog-card:hover .blog-readmore {
    color: #f5b877;
}

/* ---------- Contact page ---------- */

.contact-form-wrap {
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #0D1117;
}

.contact-form-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 1.25rem;
    background: #11151C;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-form {
    padding: 1.75rem;
}

.contact-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
}

.contact-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.6rem;
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #E6E6E6;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contact-input::placeholder {
  color: #4B5563;
}

.contact-input:focus {
    border-color: rgba(242, 166, 90, 0.5);
    background: #151922;
}

select.contact-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
}

textarea.contact-input {
    resize: vertical;
    min-height: 120px;
}

.contact-note {
    margin-top: 1rem;
    font-size: 0.72rem;
    color: #5C6370;
}

.contact-info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem;
    border-radius: 0.85rem;
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.contact-info-card:hover {
    border-color: rgba(242, 166, 90, 0.25);
    transform: translateX(-3px);
}

.contact-info-card .svc-icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

.contact-info-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #6B7280;
    margin-bottom: 0.35rem;
}

.contact-info-value {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.92rem;
    color: #E6E6E6;
    line-height: 1.7;
    transition: color 0.2s ease;
}

a.contact-info-value:hover {
    color: #F2A65A;
}

/* ---------- Team (large bio cards) ---------- */

.team-card-lg {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    border-radius: 0.9rem;
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.team-card-lg:hover {
    border-color: rgba(242, 166, 90, 0.25);
    transform: translateY(-3px);
}

.team-avatar-lg {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(242, 166, 90, 0.1);
    color: #F2A65A;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
}

.team-name-lg {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.team-role-lg {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.8rem;
    color: #F2A65A;
    margin-bottom: 0.75rem;
}

.team-bio {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.87rem;
    line-height: 1.85;
    color: #9AA1AC;
    margin-bottom: 1rem;
}

.team-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.team-skill {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: #7FB77E;
    background: rgba(127, 183, 126, 0.08);
    border: 1px solid rgba(127, 183, 126, 0.15);
    direction: ltr;
}

.team-socials {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.team-socials a {
    color: #6B7280;
    transition: color 0.2s ease;
}

.team-socials a:hover {
    color: #F2A65A;
}

.team-socials svg {
    width: 17px;
    height: 17px;
}

/* ---------- Stats ---------- */

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
}

.stat-num {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 2.4rem;
    color: #fff;
    direction: ltr;
}

.stat-label {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    color: #9AA1AC;
    margin-top: 0.4rem;
}

/* ---------- Blog filters ---------- */

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.blog-filter {
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    color: #9AA1AC;
    background: #11151C;
    border: 1px solid rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-filter:hover {
    color: #E6E6E6;
    border-color: rgba(255, 255, 255, 0.15);
}

.blog-filter.is-active {
    color: #0B0E14;
    background: #F2A65A;
    border-color: #F2A65A;
}