/* Root + Base ------------------------------------------------------------- */
:root {
    --primary: #6366f1;
    --primary-dark: #4338ca;
    --accent: #14b8a6;
    --bg: #030617;
    --bg-soft: #0f172a;
    --bg-muted: #111a2e;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.2);
    --white: #ffffff;
    --shadow-soft: 0 10px 40px rgba(15, 23, 42, 0.3);
    --blur: blur(24px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Vazirmatn', 'TahomaLocal', Tahoma, 'Segoe UI', Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top, rgba(99, 102, 241, 0.15), transparent 45%),
                radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.1), transparent 35%),
                var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.container {
    width: min(1200px, 90%);
    margin: 0 auto;
}

section {
    padding: 5rem 0;
    content-visibility: auto;
    contain-intrinsic-size: 700px;
}

.section-title {
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 700;
    text-align: center;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.85rem 1.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--white);
    color: var(--white);
}

/* Scroll progress --------------------------------------------------------- */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    z-index: 1100;
    transition: width 0.1s ease-out;
    will-change: width;
}

/* Navbar ------------------------------------------------------------------ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(18px);
    background: rgba(3, 6, 23, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    position: relative;
    padding-bottom: 0.2rem;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a:focus-visible::after {
    width: 100%;
}

.hamburger {
    display: none;
    width: 32px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: 0.3s;
}

/* Hero -------------------------------------------------------------------- */
.hero {
    position: relative;
    padding-top: 6rem;
    padding-bottom: 4rem;
    min-height: 90vh;
    overflow: hidden;
}

.hero-visuals .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    animation: float 12s ease-in-out infinite;
    z-index: 0;
    will-change: transform;
}

.orb-1 {
    width: 240px;
    height: 240px;
    background: rgba(99, 102, 241, 0.35);
    top: 5%;
    left: 10%;
}

.orb-2 {
    width: 180px;
    height: 180px;
    background: rgba(20, 184, 166, 0.3);
    bottom: 10%;
    right: 15%;
    animation-duration: 16s;
}

.orb-3 {
    width: 140px;
    height: 140px;
    background: rgba(14, 165, 233, 0.25);
    top: 20%;
    right: 35%;
    animation-duration: 18s;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    align-items: center;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-kicker {
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.hero-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.2;
    margin: 0;
}

.hero-description {
    color: var(--text-muted);
    max-width: 48ch;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-badges span {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 1rem;
}

.stat-card {
    border-radius: 16px;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    color: var(--primary);
}

.stat-card span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hero-card {
    position: relative;
    border-radius: 32px;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-soft);
    will-change: transform;
    transform-style: preserve-3d;
}

.profile-img {
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    object-fit: cover;
}

.hero-highlight-card {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    transform: translateY(40%);
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem 1.25rem;
    color: var(--white);
    font-size: 0.9rem;
    max-width: 220px;
    backdrop-filter: blur(10px);
}

.hero-highlight-card span {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.scroll-cue {
    margin-top: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.scroll-cue .mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    position: relative;
}

.scroll-cue .wheel {
    width: 4px;
    height: 6px;
    background: var(--white);
    border-radius: 999px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

/* About ------------------------------------------------------------------- */
.about {
    background: var(--bg-soft);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    align-items: start;
}

.about-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.about-card h3 {
    margin-bottom: 1.5rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
    font-weight: 500;
}

.info-list strong {
    color: var(--primary);
    margin-left: 0.5rem;
}

.about-text {
    color: var(--text-muted);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.about-pillars div {
    padding: 1.2rem;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.about-pillars h4 {
    margin: 0 0 0.5rem;
}

/* Services ---------------------------------------------------------------- */
.services {
    background: var(--bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.3), transparent 45%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.4);
}

.service-card:hover::after {
    opacity: 1;
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.service-card ul {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.service-card li {
    margin-bottom: 0.5rem;
    padding-right: 1rem;
    position: relative;
}

.service-card li::before {
    content: '•';
    position: absolute;
    right: 0;
    color: var(--accent);
}

/* Skills ------------------------------------------------------------------ */
.skills {
    background: var(--bg-soft);
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.skills-cloud span {
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.skills-cloud span:hover {
    transform: translateY(-5px);
}

.timeline {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.timeline-item {
    padding: 1.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-year {
    font-weight: 700;
    color: var(--accent);
}

/* Portfolio --------------------------------------------------------------- */
.portfolio {
    background: var(--bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio-card {
    height: 100%;
    padding: 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.portfolio-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-6px);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
}

.portfolio-badge {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.portfolio-description {
    color: var(--text-muted);
    flex: 1;
}

.portfolio-link {
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.portfolio-note {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(253, 224, 71, 0.1);
    border: 1px solid rgba(253, 224, 71, 0.35);
    color: #facc15;
    text-align: center;
}

/* CTA --------------------------------------------------------------------- */
.cta-band {
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.15), rgba(14, 165, 233, 0.15));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4rem 0;
}

.cta-band .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cta-content h2 {
    margin: 0 0 0.5rem;
}

.cta-content p {
    margin: 0;
    color: var(--text-muted);
}

/* Contact ----------------------------------------------------------------- */
.contact {
    background: var(--bg-soft);
}

.contact-content {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.contact-card,
.offer-card {
    border-radius: 24px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.offer-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(67, 56, 202, 0.2));
    box-shadow: var(--shadow-soft);
}

.offer-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    color: var(--text);
}

.offer-list li {
    margin-bottom: 0.6rem;
}

.offer-cta {
    background: rgba(255, 255, 255, 0.08);
    padding: 1rem;
    border-radius: 16px;
    text-align: center;
    font-weight: 600;
}

/* Footer ------------------------------------------------------------------ */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    background: #020617;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-credit {
    margin-top: 0.4rem;
    font-size: 0.85rem;
}

.footer-credit a {
    color: var(--accent);
    font-weight: 500;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* Animations -------------------------------------------------------------- */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes scroll {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, 8px);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 15px);
    }
}

[data-animate] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 820px) {
    .nav-menu {
        position: fixed;
        inset: 0 auto auto 0;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(3, 6, 23, 0.95);
        padding: 2rem;
        width: 70%;
        height: calc(100vh - 70px);
        transition: right 0.3s ease;
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }
}

@media (max-width: 640px) {
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-badges,
    .skills-cloud {
        justify-content: flex-start;
    }

    .cta-band .container {
        flex-direction: column;
        text-align: center;
    }
}

html {
    scroll-behavior: smooth;
}

