/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --blue-900: #0a1e3d;
    --blue-800: #12315c;
    --blue-700: #1a4a7a;
    --blue-600: #2563a0;
    --blue-500: #3b82c4;
    --blue-400: #60a5d9;
    --blue-300: #93c5ed;
    --blue-200: #bfdbfa;
    --blue-100: #e0edff;
    --blue-50: #f0f7ff;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.14);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    --font: 'Vazirmatn', 'Inter', system-ui, -apple-system, sans-serif;
}
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}
body {
    font-family: var(--font);
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
::selection {
    background: var(--blue-500);
    color: #fff;
}
img {
    max-width: 100%;
    display: block;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}

/* ===== SCROLL SNAP SECTIONS ===== */
.section {
    min-height: 100vh;
    min-height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 60px;
    position: relative;
    overflow: hidden;
}
.section-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ===== NAV ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}
.nav-logo {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--blue-800);
    letter-spacing: -0.02em;
}
.nav-logo span {
    color: var(--blue-500);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links a {
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
    position: relative;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--blue-700);
    background: var(--blue-100);
}
.nav-links a.active {
    font-weight: 600;
    color: var(--blue-800);
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 4px 8px;
}

/* ===== HERO ===== */
#hero {
    background: linear-gradient(160deg, var(--blue-50) 0%, var(--white) 70%);
    padding-top: 100px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.hero-content h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--blue-900);
    letter-spacing: -0.02em;
}
.hero-content h1 .highlight {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-content .subtitle {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-top: 16px;
    font-weight: 400;
    max-width: 480px;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.hero-badges span {
    background: var(--white);
    padding: 6px 18px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--blue-700);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--blue-200);
}
.hero-cta {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}
.btn-primary {
    background: var(--blue-700);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 160, 0.3);
}
.btn-primary:hover {
    background: var(--blue-800);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(37, 99, 160, 0.35);
}
.btn-outline {
    background: transparent;
    color: var(--blue-700);
    border: 2px solid var(--blue-300);
}
.btn-outline:hover {
    background: var(--blue-50);
    border-color: var(--blue-500);
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.hero-image .avatar-wrap {
    width: 340px;
    height: 340px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--white);
    background: var(--white);
    position: relative;
}
.hero-image .avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.hero-image .orbit {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1.5px dashed var(--blue-200);
    animation: spin 30s linear infinite;
    pointer-events: none;
}
.hero-image .orbit-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--blue-400);
    border-radius: 50%;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(59, 130, 196, 0.4);
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* floating badges on hero */
.float-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue-800);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    white-space: nowrap;
}
.float-badge:nth-child(2) {
    top: 8%;
    right: -8%;
    animation-delay: 0.5s;
}
.float-badge:nth-child(3) {
    bottom: 12%;
    left: -10%;
    animation-delay: 1.2s;
}
.float-badge:nth-child(4) {
    bottom: 30%;
    right: -12%;
    animation-delay: 2s;
    font-size: 0.7rem;
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ===== ABOUT ===== */
#about {
    background: var(--white);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.about-text h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--blue-900);
    margin-bottom: 16px;
}
.about-text h2 .highlight {
    color: var(--blue-500);
}
.about-text p {
    color: var(--gray-600);
    margin-bottom: 16px;
    font-size: 1.02rem;
}
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}
.about-stats .stat {
    background: var(--blue-50);
    padding: 18px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--blue-100);
}
.about-stats .stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--blue-700);
}
.about-stats .stat span {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.about-skills {
    background: var(--gray-50);
    padding: 32px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}
.about-skills h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue-800);
    margin-bottom: 16px;
}
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.skill-tags span {
    background: var(--white);
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.skill-tags span:hover {
    border-color: var(--blue-400);
    background: var(--blue-50);
    color: var(--blue-700);
}

/* ===== SERVICES ===== */
#services {
    background: linear-gradient(170deg, var(--blue-50) 0%, var(--white) 100%);
}
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--blue-500);
    text-transform: uppercase;
    background: var(--blue-100);
    padding: 4px 16px;
    border-radius: 40px;
    margin-bottom: 8px;
}
.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--blue-900);
    margin-bottom: 12px;
}
.section-desc {
    color: var(--gray-500);
    max-width: 600px;
    font-size: 1.05rem;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.service-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: var(--transition);
    text-align: center;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue-200);
}
.service-card .icon {
    font-size: 2.4rem;
    color: var(--blue-500);
    margin-bottom: 12px;
}
.service-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue-900);
    margin-bottom: 6px;
}
.service-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ===== PORTFOLIO ===== */
#portfolio {
    background: var(--white);
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 40px;
}
.portfolio-item {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    cursor: pointer;
}
.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue-200);
}
.portfolio-item .thumb {
    height: 200px;
    background: var(--gray-100);
    overflow: hidden;
    position: relative;
}
.portfolio-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.portfolio-item:hover .thumb img {
    transform: scale(1.04);
}
.portfolio-item .info {
    padding: 18px 20px 20px;
}
.portfolio-item .info h4 {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--blue-900);
}
.portfolio-item .info p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}
.portfolio-item .info .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.portfolio-item .info .tags span {
    font-size: 0.65rem;
    background: var(--blue-50);
    padding: 2px 12px;
    border-radius: 40px;
    color: var(--blue-700);
    font-weight: 500;
}

/* ===== BLOG ===== */
#blog {
    background: var(--gray-50);
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 40px;
}
.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue-200);
}
.blog-card .thumb {
    height: 160px;
    background: linear-gradient(135deg, var(--blue-200), var(--blue-100));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: var(--blue-500);
}
.blog-card .body {
    padding: 20px 22px 22px;
}
.blog-card .body .meta {
    font-size: 0.7rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.blog-card .body h4 {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--blue-900);
    margin-bottom: 6px;
    line-height: 1.4;
}
.blog-card .body p {
    font-size: 0.88rem;
    color: var(--gray-500);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card .body .read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--blue-600);
    transition: var(--transition);
}
.blog-card .body .read-more:hover {
    color: var(--blue-800);
    gap: 12px;
}

/* ===== CONTACT ===== */
#contact {
    background: var(--blue-900);
    color: #fff;
}
#contact .section-title {
    color: #fff;
}
#contact .section-desc {
    color: rgba(255, 255, 255, 0.7);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 40px;
    align-items: start;
}
.contact-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.contact-info p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}
.contact-info .item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.85);
}
.contact-info .item i {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--blue-300);
}
.contact-info .social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.contact-info .social a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.7);
}
.contact-info .social a:hover {
    background: var(--blue-500);
    color: #fff;
    transform: translateY(-3px);
}
.contact-form {
    background: rgba(255, 255, 255, 0.06);
    padding: 32px 28px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}
.contact-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: var(--font);
    font-size: 0.95rem;
    transition: var(--transition);
    margin-bottom: 16px;
    outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--blue-400);
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 0 0 4px rgba(59, 130, 196, 0.15);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}
.contact-form .btn-primary {
    width: 100%;
    justify-content: center;
    background: var(--blue-500);
    box-shadow: 0 4px 20px rgba(59, 130, 196, 0.3);
}
.contact-form .btn-primary:hover {
    background: var(--blue-400);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--blue-950);
    padding: 24px 32px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.footer a {
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}
.footer a:hover {
    color: var(--blue-300);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--gray-400);
    font-size: 0.65rem;
    animation: bob 2.4s ease-in-out infinite;
    z-index: 2;
}
.scroll-indicator i {
    font-size: 1.2rem;
}
@keyframes bob {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 {
    transition-delay: 0.1s;
}
.reveal-delay-2 {
    transition-delay: 0.2s;
}
.reveal-delay-3 {
    transition-delay: 0.3s;
}
.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content .subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-cta {
        justify-content: center;
    }
    .hero-badges {
        justify-content: center;
    }
    .hero-image .avatar-wrap {
        width: 240px;
        height: 240px;
    }
    .hero-image .orbit {
        width: 300px;
        height: 300px;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .float-badge {
        display: none;
    }
}
@media (max-width: 768px) {
    .navbar {
        padding: 10px 16px;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 20px 24px;
        border-bottom: 1px solid var(--gray-200);
        gap: 4px;
    }
    .nav-links.open {
        display: flex;
    }
    .nav-toggle {
        display: block;
    }
    .section {
        padding: 70px 16px 40px;
        min-height: 100dvh;
    }
    .hero-image .avatar-wrap {
        width: 180px;
        height: 180px;
    }
    .hero-image .orbit {
        width: 240px;
        height: 240px;
    }
    .about-stats {
        grid-template-columns: 1fr 1fr;
    }
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 1.8rem;
    }
}
@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    .about-stats {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    .contact-form {
        padding: 20px 16px;
    }
}

/* ===== UTILITY ===== */
.text-center {
    text-align: center;
}
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}
.gap-8 {
    gap: 8px;
}
.mt-8 {
    margin-top: 8px;
}
.mt-16 {
    margin-top: 16px;
}
.mt-24 {
    margin-top: 24px;
}
.mt-40 {
    margin-top: 40px;
}
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}