
:root {
    --color-bg-light: #f7f8fc;
    --color-bg-dark: #0c1020;
    --color-surface-light: #ffffff;
    --color-surface-dark: #151a2c;
    --color-border-light: #e1e4f0;
    --color-border-dark: #22263a;
    --color-text-main-light: #101326;
    --color-text-main-dark: #f5f7ff;
    --color-text-muted-light: #596074;
    --color-text-muted-dark: #bcc3e2;
    --color-primary: #4169e1;
    --color-primary-soft: rgba(65,105,225,0.08);
    --color-primary-strong: #3655c7;
    --color-accent: #ffb545;
    --color-danger: #ff4d6a;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --shadow-soft: 0 18px 45px rgba(15,23,42,0.12);
    --shadow-subtle: 0 8px 24px rgba(15,23,42,0.08);

    --transition-fast: 0.18s ease-out;
    --transition-med: 0.25s ease;

    --font-main: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}



*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background: var(--color-bg-light);
    color: var(--color-text-main-light);
    line-height: 1.7;
    direction: rtl;
}

body[data-theme="dark"] {
    background: radial-gradient(circle at top, #151a2c 0, #050710 50%, #020309 100%);
    color: var(--color-text-main-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.section {
    padding: 64px 0;
}

.section-alt {
    background: linear-gradient(135deg, rgba(65,105,225,0.04), rgba(255,255,255,0.02));
}

.section-header {
    text-align: right;
    margin-bottom: 40px;
}

.section-header-tight {
    margin-bottom: 24px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.section-subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .section-subtitle {
    color: var(--color-text-muted-dark);
}


.navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(247,248,252,0.97), rgba(247,248,252,0.9));
    border-bottom: 1px solid var(--color-border-light);
}

body[data-theme="dark"] .navbar {
    background: linear-gradient(to bottom, rgba(5,7,16,0.96), rgba(5,7,16,0.9));
    border-bottom-color: rgba(45,55,99,0.9);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 10%, #fff8, #4169e1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 8px 18px rgba(65,105,225,0.4);
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
}

.nav-brand-title {
    font-weight: 700;
    font-size: 15px;
}

.nav-brand-subtitle {
    font-size: 12px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .nav-brand-subtitle {
    color: var(--color-text-muted-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--color-text-muted-light);
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

body[data-theme="dark"] .nav-link {
    color: var(--color-text-muted-dark);
}

.nav-link:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    transform: translateY(-1px);
}

body[data-theme="dark"] .nav-link:hover {
    background: rgba(65,105,225,0.09);
    color: #dee3ff;
}

.nav-link.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(65,105,225,0.35);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-toggle {
    display: none;
    width: 38px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--color-border-light);
    background: rgba(255,255,255,0.9);
    padding: 6px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

body[data-theme="dark"] .nav-toggle {
    background: #111524;
    border-color: #262a3f;
}

.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: var(--color-text-main-light);
}

body[data-theme="dark"] .nav-toggle span {
    background: var(--color-text-main-dark);
}

.toggle-pill {
    position: relative;
    width: 86px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid var(--color-border-light);
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    padding: 2px;
    cursor: pointer;
    overflow: hidden;
}

body[data-theme="dark"] .toggle-pill {
    background: #111524;
    border-color: #262a3f;
}

.toggle-pill-labels {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 11px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .toggle-pill-labels {
    color: var(--color-text-muted-dark);
}

.toggle-pill-thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    right: 3px;
    width: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4169e1, #7f9cff);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-med);
}



.hero-section {
    padding-top: 72px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0,2fr) minmax(0,1.4fr);
    gap: 32px;
    align-items: center;
}

.hero-kicker {
    font-size: 15px;
    color: var(--color-primary-strong);
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.3;
    margin: 0 0 10px;
}

.hero-subtitle {
    margin: 0 0 20px;
    color: var(--color-text-muted-light);
    font-size: 15px;
}

body[data-theme="dark"] .hero-subtitle {
    color: var(--color-text-muted-dark);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 14px;
    padding: 9px 18px;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast),
        border-color var(--transition-fast);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 12px 30px rgba(65,105,225,0.4);
}

.btn-primary:hover {
    background: var(--color-primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 15px 40px rgba(65,105,225,0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-main-light);
    border-color: var(--color-border-light);
}

body[data-theme="dark"] .btn-ghost {
    color: var(--color-text-main-dark);
    border-color: #283054;
}

.btn-ghost:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.btn-secondary {
    background: #111524;
    color: #fdfdff;
}

body[data-theme="dark"] .btn-secondary {
    background: #fdfdff;
    color: #050715;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.4);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    
}

.hero-meta-item {
    min-width: 110px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-subtle);
     text-align: center;
}

body[data-theme="dark"] .hero-meta-item {
    background: rgba(11,14,32,0.96);
    border-color: #24294f;
}

.hero-meta-label {
    font-size: 11px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .hero-meta-label {
    color: var(--color-text-muted-dark);
}

.hero-meta-value {
    display: block;
    font-weight: 800;
    font-size: 18px;
}

.hero-profile-card {
    perspective: 1100px;
}

.hero-profile-inner {
    position: relative;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at top left, #edf1ff, #fefefe);
    box-shadow: var(--shadow-soft);
    padding: 24px 20px 20px;
    text-align: center;
    transform: rotateY(-5deg) rotateX(4deg);
}

body[data-theme="dark"] .hero-profile-inner {
    background: radial-gradient(circle at top left, #1c2140, #070a16);
}

.hero-avatar-wrapper {
    position: relative;
    margin-bottom: 14px;
}

.hero-avatar-ring {
    width: 94px;
    height: 94px;
    border-radius: 999px;
    background: conic-gradient(from 120deg, #4169e1, #ffb545, #ff4d6a, #4169e1);
    filter: blur(18px);
    opacity: 0.9;
    margin: 0 auto;
}

.hero-avatar {
    position: absolute;
    top: 0;                        
    left: 50%;
    transform: translateX(-50%);

    width: 120px;                 
    height: 120px;
    border-radius: 50%;

    background-image: url("rkakayan.jpg");
    background-size: cover;
    background-position: center 35%;   
    background-repeat: no-repeat;

    border: 3px solid rgba(255,255,255,0.95);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);   
    backdrop-filter: blur(4px);                   
    overflow: hidden;
    z-index: 2;
}


.hero-avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
}

.hero-avatar-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25); /* حلقه آبی لطیف */
    animation: avatarGlow 3s ease-in-out infinite;
}


@keyframes avatarGlow {
    0%, 100% {
        box-shadow:
            0 0 0 4px rgba(59, 130, 246, 0.25),
            0 8px 18px rgba(0, 0, 0, 0.18);
    }
    50% {
        box-shadow:
            0 0 0 6px rgba(59, 130, 246, 0.4),
            0 14px 30px rgba(0, 0, 0, 0.28);
    }
}


.hero-name {
    margin: 4px 0 2px;
    font-size: 18px;
    font-weight: 800;
}

.hero-role {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .hero-role {
    color: var(--color-text-muted-dark);
}

.hero-tags {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.hero-tags li {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.04);
    font-size: 11px;
}

body[data-theme="dark"] .hero-tags li {
    background: rgba(255,255,255,0.06);
}

.hero-profile-footer {
    border-top: 1px dashed rgba(137,147,180,0.6);
    margin-top: 12px;
    padding-top: 12px;
}



.timeline {
    position: relative;
    padding: 10px 0;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 28px;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(65,105,225,0.05),
        rgba(65,105,225,0.35),
        rgba(65,105,225,0.05)
    );
}

.timeline-item {
    position: relative;
    padding-right: 64px;
    padding-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    right: 22px;
    top: 9px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #fff;
    border: 3px solid var(--color-primary);
}

body[data-theme="dark"] .timeline-dot {
    background: #050712;
}

.timeline-content {
    border-radius: var(--radius-md);
    padding: 10px 14px;
    background: rgba(255,255,255,0.94);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-subtle);
}

body[data-theme="dark"] .timeline-content {
    background: rgba(10,15,35,0.95);
    border-color: #242a4c;
}

.timeline-year {
    font-size: 11px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .timeline-year {
    color: var(--color-text-muted-dark);
}

.timeline-title {
    font-size: 15px;
    margin: 2px 0 4px;
}

.timeline-text {
    font-size: 13px;
    margin: 0;
}

.timeline-item-current .timeline-content {
    border-color: var(--color-primary);
}



.resume-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 24px;
}

.card {
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-subtle);
}

body[data-theme="dark"] .card {
    background: rgba(10,14,30,0.98);
    border-color: #252a45;
}

.card-title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 700;
}

.resume-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resume-item-header h4 {
    margin: 0;
    font-size: 14px;
}

.resume-item-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(65,105,225,0.08);
    color: var(--color-primary-strong);
}

body[data-theme="dark"] .resume-item-badge {
    background: rgba(126,152,255,0.16);
    color: #d8e0ff;
}

.resume-item p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .resume-item p {
    color: var(--color-text-muted-dark);
}



.awards-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
}

.award-item {
    margin: 0;
}

.award-image-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    margin-bottom: 8px;
}

body[data-theme="dark"] .award-image-wrapper {
    border-color: #252a45;
}

.award-caption h4 {
    margin: 0 0 4px;
    font-size: 14px;
}

.award-caption p {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .award-caption p {
    color: var(--color-text-muted-dark);
}

.award-meta {
    font-size: 11px;
    color: var(--color-primary-strong);
}



.family-tree-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.family-tree-image img {
    border-radius: var(--radius-md);
    border: 1px dashed var(--color-border-light);
}

body[data-theme="dark"] .family-tree-image img {
    border-color: #2a3050;
}

.family-tree-text {
    font-size: 13px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .family-tree-text {
    color: var(--color-text-muted-dark);
}



.section-cta {
    padding: 56px 0;
}

.cta-grid {
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    background: radial-gradient(circle at top left, rgba(65,105,225,0.14), rgba(65,105,225,0.04));
    border: 1px solid rgba(65,105,225,0.2);
    display: grid;
    grid-template-columns: minmax(0,2fr) minmax(0,1.4fr);
    gap: 16px;
    align-items: center;
}

body[data-theme="dark"] .cta-grid {
    background: radial-gradient(circle at top left, rgba(79,102,255,0.32), rgba(3,7,22,0.9));
    border-color: rgba(126,152,255,0.5);
}

.cta-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}



.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.chip {
    border-radius: 999px;
    border: 1px solid var(--color-border-light);
    background: rgba(255,255,255,0.96);
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

body[data-theme="dark"] .chip {
    background: rgba(10,14,32,0.96);
    border-color: #252a45;
    color: var(--color-text-muted-dark);
}

.chip-active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(65,105,225,0.4);
}

.chip:hover {
    transform: translateY(-1px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

body[data-theme="dark"] .gallery-item {
    background: rgba(10,14,32,0.96);
    border-color: #252a45;
}

.gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.gallery-item figcaption {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .gallery-item figcaption {
    color: var(--color-text-muted-dark);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 70;
}

.lightbox.show {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3,5,16,0.82);
    backdrop-filter: blur(12px);
}

.lightbox-content {
    position: relative;
    max-width: 720px;
    width: 92%;
    border-radius: var(--radius-lg);
    background: #050814;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    padding: 16px 16px 12px;
    z-index: 1;
}

.lightbox-close {
    position: absolute;
    top: 9px;
    left: 12px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.lightbox-content img {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 6px;
}

.lightbox-content p {
    margin: 0;
    font-size: 13px;
    color: #dfe4ff;
}


.app-stats-item-total {
    border-radius: 999px;
    padding-inline: 0.9rem;
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.95) 0, rgba(255,255,255,0) 40%),
        linear-gradient(135deg, #e0f2ff, #c7d2fe);
    border: 1px solid rgba(59,130,246,0.32);
    box-shadow:
        0 10px 25px rgba(15,23,42,0.14),
        0 0 0 1px rgba(148,163,184,0.1);
}


.app-stats-item-online {
    border-radius: 999px;
    padding-inline: 0.9rem;
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.9) 0, rgba(255,255,255,0) 40%),
        linear-gradient(135deg, #dcfce7, #bbf7d0);
    border: 1px solid rgba(34,197,94,0.32);
    box-shadow:
        0 10px 22px rgba(34,197,94,0.18),
        0 0 0 1px rgba(148,163,184,0.08);
}


.app-stats-item-total .app-stats-label,
.app-stats-item-online .app-stats-label {
    color: #64748b;  
    font-weight: 500;
    letter-spacing: 0.02em;
}

.app-stats-item-total .app-stats-value,
.app-stats-item-online .app-stats-value {
    color: #0f172a;   
}


body[data-theme="dark"] .app-stats-item-total {
    background: radial-gradient(circle at top, #1d4ed8, #1e293b);
    border-color: rgba(129,140,248,0.9);
}

body[data-theme="dark"] .app-stats-item-online {
    background: radial-gradient(circle at top, #16a34a, #052e16);
    border-color: rgba(74,222,128,0.9);
}


.apps-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px;
}

.app-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.app-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 10%, #fff, #4169e1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

.app-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.app-card-meta {
    font-size: 11px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .app-card-meta {
    color: var(--color-text-muted-dark);
}

.app-card-body {
    font-size: 13px;
    color: var(--color-text-muted-light);
    margin-bottom: 10px;
}

body[data-theme="dark"] .app-card-body {
    color: var(--color-text-muted-dark);
}

.app-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.app-card-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.04);
}

body[data-theme="dark"] .app-card-tag {
    background: rgba(255,255,255,0.08);
}

.app-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.app-card-link {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border-light);
    background: rgba(255,255,255,0.96);
}

body[data-theme="dark"] .app-card-link {
    background: rgba(10,14,32,0.96);
    border-color: #252a45;
}


.contact-grid {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(0,1.5fr);
    gap: 32px;
}

.contact-intro .section-title {
    margin-bottom: 8px;
}

.contact-list {
    margin: 14px 0 0;
    padding: 0 16px 0 0;
    font-size: 13px;
    color: var(--color-text-muted-light);
}

body[data-theme="dark"] .contact-list {
    color: var(--color-text-muted-dark);
}

.contact-form-wrapper {
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-subtle);
    padding: 18px 16px;
}

body[data-theme="dark"] .contact-form-wrapper {
    background: rgba(10,14,30,0.98);
    border-color: #252a45;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px 14px;
}

.form-group-full {
    grid-column: 1/-1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 13px;
}

.form-control,
.form-select,
textarea {
    border-radius: 10px;
    border: 1px solid var(--color-border-light);
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] textarea {
    background: #050716;
    border-color: #252a45;
    color: var(--color-text-main-dark);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(65,105,225,0.35);
}

.alert {
    margin-top: 12px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
}

.alert-success {
    background: rgba(36,187,120,0.08);
    border: 1px solid rgba(36,187,120,0.5);
    color: #157a52;
}


.footer {
    padding: 32px 0 20px;
    background: radial-gradient(circle at top, #050814 0, #02030a 55%, #000 100%);
    color: #c6ceff;
    border-top: 1px solid rgba(73,85,148,0.6);
}


.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.5fr;
    gap: 22px;
    align-items: flex-start;
}

.footer-column {
    min-width: 0;
}

.footer-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
}

.footer-text {
    margin: 0;
    font-size: 13px;
    color: #a3aedf;
}

.footer-subtitle {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.footer-links li {
    margin-bottom: 5px;
}

.footer-links a {
    color: #d6deff;
    transition: color 0.2s ease, transform 0.15s ease;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-meta {
    font-size: 12px;
    color: #8c94c5;
    margin-top: 6px;
}

.footer-bottom {
    margin-top: 20px;
    border-top: 1px solid rgba(90,102,173,0.6);
    padding-top: 10px;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-bottom a {
    color: #aab3ff;
}



body[data-lang="en"] {
    direction: ltr;
    text-align: left;
}

body[data-lang="en"] .navbar-inner {
    flex-direction: row;
}

body[data-lang="en"] .nav-brand-text {
    text-align: left;
}

body[data-lang="en"] .nav-links {
    direction: ltr;
    text-align: left;
}

body[data-lang="en"] .nav-links .nav-link {
    text-align: left;
}


body[data-lang="en"] .section-header {
    text-align: left;
}

body[data-lang="en"] .hero-section {
    text-align: left;
}

body[data-lang="en"] .hero-actions {
    justify-content: flex-start;
}

body[data-lang="en"] .hero-meta {
    justify-content: flex-start;
}

body[data-lang="en"] .timeline-line {
    left: 28px;
    right: auto;
}

body[data-lang="en"] .timeline-item {
    padding-left: 64px;
    padding-right: 0;
}

body[data-lang="en"] .timeline-dot {
    left: 22px;
    right: auto;
}


body[data-lang="en"] .resume-grid,
body[data-lang="en"] .apps-grid,
body[data-lang="en"] .gallery-grid,
body[data-lang="en"] .app-stats-grid,
body[data-lang="en"] .cta-grid,
body[data-lang="en"] .contact-grid {
    direction: ltr;
}


body[data-lang="en"] .card,
body[data-lang="en"] .app-card,
body[data-lang="en"] .contact-form-wrapper {
    text-align: left;
}

body[data-lang="en"] .contact-list {
    padding: 0 0 0 16px;
    text-align: left;
}

body[data-lang="en"] .footer-grid {
    direction: ltr;
}

body[data-lang="en"] .footer-column {
    text-align: left;
}

body[data-lang="en"] .footer-links li a {
    text-align: left;
}

.card,
.app-card-body,
.hero-subtitle,
.timeline-text,
.contact-list,
.footer-text {
    word-break: break-word;
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: minmax(0,1.6fr) minmax(0,1.3fr);
        gap: 24px;
    }
    .resume-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .apps-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .gallery-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
    .contact-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .cta-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}


@media (max-width: 768px) {
    /* Navbar mobile */
    .navbar-inner {
        height: 60px;
    }
    .nav-links {
        position: fixed;
        inset: 60px 0 auto 0;
        background: rgba(247,248,252,0.98);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--color-border-light);
        flex-direction: column;
        padding: 10px 16px 16px;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition-med), opacity var(--transition-med);
        gap: 4px;
        text-align: right;
    }
    body[data-theme="dark"] .nav-links {
        background: rgba(5,7,16,0.98);
        border-bottom-color: #252a45;
    }
    .nav-links.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-link {
        width: 100%;
        padding: 8px 10px;
    }
    .nav-toggle {
        display: flex;
    }
    body[data-lang="en"] .nav-links {
        direction: ltr;
        text-align: left;
    }

    .section {
        padding: 52px 0;
    }
    .section-header {
        text-align: center;
    }
    .hero-section {
        padding-top: 60px;
        text-align: center;
    }
    .hero-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-meta {
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    .hero-profile-inner {
        transform: none;
        margin-top: 10px;
    }

  
    body[data-lang="en"] .section-header,
    body[data-lang="en"] .hero-section {
        text-align: center;
    }
    body[data-lang="en"] .hero-actions,
    body[data-lang="en"] .hero-meta {
        justify-content: center;
    }
    body[data-lang="en"] .card,
    body[data-lang="en"] .app-card,
    body[data-lang="en"] .contact-form-wrapper {
        text-align: center;
    }

    .timeline-line {
        right: 18px;
        left: auto;
    }
    .timeline-item {
        padding-right: 52px;
        padding-left: 0;
    }
    body[data-lang="en"] .timeline-line {
        left: 18px;
        right: auto;
    }
    body[data-lang="en"] .timeline-item {
        padding-left: 52px;
        padding-right: 0;
    }


    .resume-grid,
    .apps-grid,
    .gallery-grid,
    .app-stats-grid,
    .cta-grid,
    .contact-grid {
        grid-template-columns: minmax(0,1fr);
    }

 
    .card,
    .app-card,
    .contact-form-wrapper {
        text-align: center;
        margin-inline: auto;
        width: 100%;
    }
    .app-card-header {
        justify-content: center;
    }
    .app-card-tags,
    .app-card-links {
        justify-content: center;
    }

  
    .awards-grid {
        grid-template-columns: minmax(0,1fr);
    }

  
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 18px;
    }
    .footer-column {
        text-align: center;
    }
    body[data-lang="en"] .footer-column {
        text-align: center;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .section {
        padding: 44px 0;
    }
    .hero-title {
        font-size: 18px;
        line-height: 1.5;
    }
    .hero-meta {
        flex-direction: column;
    }

    .gallery-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .form-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .cta-grid {
        padding: 18px 14px;
    }
    .footer-grid {
        grid-template-columns: minmax(0,1fr);
    }

    .card,
    .app-card,
    .contact-form-wrapper {
        max-width: 100%;
    }
}


@media (max-width: 520px) {
    .section {
        padding: 44px 0;
    }

    .hero-title {
        font-size: 18px;
        line-height: 1.5;
    }

    
    .nav-brand-title {
        font-size: 14px;
        line-height: 1.4;
    }

    .nav-brand-subtitle {
        font-size: 10px;
        line-height: 1.4;
        display: block;
        margin-top: 2px;
    }

    .hero-meta {
        flex-direction: column;
    }

    .gallery-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .form-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .cta-grid {
        padding: 18px 14px;
    }
    .footer-grid {
        grid-template-columns: minmax(0,1fr);
    }

    .card,
    .app-card,
    .contact-form-wrapper {
        max-width: 100%;
    }
}
@media (max-width: 400px) {
    .nav-brand-title {
        font-size: 13px;
    }

    .nav-brand-subtitle {
        font-size: 9px;
    }
}

@media (max-width: 360px) {
   
    .container {
        padding: 0 10px;
    }

    .section {
        padding: 36px 0;
    }

    .navbar-inner {
        height: 56px;
        gap: 10px;
    }

    .nav-brand-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .nav-brand-title {
        font-size: 13px;
        line-height: 1.3;
    }

    .nav-brand-subtitle {
        font-size: 9px;
        line-height: 1.3;
        max-width: 140px; 
        white-space: normal;
    }

    .nav-toggle {
        width: 34px;
        height: 30px;
    }

    
    .nav-links {
        inset: 56px 0 auto 0;
        padding: 8px 12px 12px;
    }

    .nav-link {
        font-size: 13px;
        padding: 7px 8px;
    }

    
    .hero-section {
        padding-top: 54px;
    }

    .hero-title {
        font-size: 16px;
        line-height: 1.5;
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .hero-actions .btn {
        font-size: 13px;
        padding: 8px 14px;
    }

    .hero-meta-item {
        min-width: 100px;
        padding: 8px 10px;
    }

    .hero-meta-value {
        font-size: 16px;
    }


    .card {
        padding: 16px 12px;
    }

    .card-title {
        font-size: 15px;
    }

    .resume-item-header h4 {
        font-size: 13px;
    }

    .resume-item p,
    .app-card-body,
    .timeline-text,
    .contact-list,
    .footer-text {
        font-size: 12px;
    }

    .apps-grid,
    .app-stats-grid,
    .gallery-grid,
    .contact-grid,
    .cta-grid,
    .resume-grid,
    .awards-grid,
    .footer-grid {
        grid-template-columns: minmax(0,1fr);
    }

    
    .gallery-item img {
        height: 120px;
    }

    .contact-form-wrapper {
        padding: 14px 12px;
    }

    .form-control,
    .form-select,
    textarea {
        font-size: 12px;
        padding: 7px 9px;
    }

    
    .footer {
        padding: 24px 0 16px;
    }

    .footer-title {
        font-size: 16px;
    }

    .footer-subtitle {
        font-size: 13px;
    }

    .footer-bottom {
        font-size: 10px;
    }
}

@media (max-width: 320px) {
    .nav-brand-title {
        font-size: 12px;
    }

    .nav-brand-subtitle {
        font-size: 8px;
    }

    .hero-title {
        font-size: 15px;
    }

    .hero-subtitle {
        font-size: 12px;
    }

    .btn {
        font-size: 12px;
        padding: 7px 12px;
    }

    .hero-meta-item {
        min-width: 95px;
    }
}


.back-to-top {
    position: fixed;
    bottom: 24px;
   
    left: 24px;
    z-index: 60;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--color-border-light);
    background: rgba(255,255,255,0.95);
    box-shadow: 0 10px 24px rgba(15,23,42,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition:
        opacity 0.25s ease-out,
        visibility 0.25s ease-out,
        transform 0.25s ease-out,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


body[data-theme="dark"] .back-to-top {
    background: rgba(10,14,32,0.95);
    border-color: #252a45;
    box-shadow: 0 16px 36px rgba(0,0,0,0.7);
}


.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-icon {
    font-size: 18px;
    line-height: 1;
    color: var(--color-primary-strong);
}

body[data-theme="dark"] .back-to-top-icon {
    color: #dfe4ff;
}


@media (hover: hover) {
    .back-to-top:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 40px rgba(15,23,42,0.25);
    }
    body[data-theme="dark"] .back-to-top:hover {
        box-shadow: 0 20px 48px rgba(0,0,0,0.8);
    }
}

body[data-lang="en"] .back-to-top {
    left: auto;
    right: 24px;
}

@media (max-width: 600px) {
    .back-to-top {
        bottom: 18px;
        width: 38px;
        height: 38px;
        left: 18px;
    }
    body[data-lang="en"] .back-to-top {
        right: 18px;
        left: auto;
    }
}


.footer {
    background: linear-gradient(135deg, #0f172a, #111827);
    color: #e5e7eb;
    padding: 40px 0 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

body[data-theme="light"] .footer {
    background: #f9fafb;
    color: #111827;
    border-top-color: rgba(148, 163, 184, 0.35);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.9;
    color: rgba(226, 232, 240, 0.8);
}

body[data-theme="light"] .footer-text {
    color: #4b5563;
}

.footer-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #cbd5f5;
}

body[data-theme="light"] .footer-subtitle {
    color: #1f2937;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.footer-links a {
    color: #e5e7eb;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease, transform 0.15s ease;
}

body[data-theme="light"] .footer-links a {
    color: #374151;
}

.footer-links a::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: #6366f1;
    transition: width 0.2s ease;
}

.footer-links a:hover {
    color: #a5b4fc;
    transform: translateY(-1px);
}

body[data-theme="light"] .footer-links a:hover {
    color: #4f46e5;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-meta {
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(156, 163, 175, 0.9);
}

body[data-theme="light"] .footer-meta {
    color: #6b7280;
}


@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 24px;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
        
        .abzar-stat-container {
            width: 100%;
            overflow-x: auto;
            display: flex;
            justify-content: center;
            background: var(--bg-body, #f8f9fa);
            padding: 15px;
            border-radius: 8px;
            margin-top: 10px;
        }
        
        [data-theme="dark"] .abzar-stat-container {
            background: rgba(255, 255, 255, 0.05);
        }
        
.app-stats-card--site {
    gap: 1rem;
}


.abzar-stat-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-top: 0.5rem;
}


.abzar-stat-inner {
    width: 100%;
    max-width: 320px; 
    margin: 0 auto;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--card-bg, rgba(0,0,0,0.03));
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}


[data-theme="dark"] .abzar-stat-inner {
    background: rgba(255,255,255,0.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}


.abzar-stat-inner * {
    font-family: inherit !important;
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    direction: rtl;
    text-align: center;
    box-sizing: border-box;
}


.abzar-stat-inner a {
    color: inherit !important;
    text-decoration: none !important;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.abzar-stat-inner a:hover {
    opacity: 1;
}

.abzar-stat-inner table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.abzar-stat-inner td,
.abzar-stat-inner th {
    padding: 0.25rem 0.3rem !important;
    border: none !important;
}

.abzar-credit-hidden {
    display: none !important;
}

@media (max-width: 576px) {
    .abzar-stat-inner {
        max-width: 100%;
        padding: 0.6rem 0.75rem;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .abzar-stat-inner * {
        font-size: 0.72rem !important;
    }
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "IRANSans", "Vazirmatn", sans-serif;
    line-height: 1.7;
}


.section {
    padding-block: 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: clamp(1.4rem, 2.1vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    max-width: 650px;
    margin: 0.25rem auto 0;
    font-size: 0.9rem;
    opacity: 0.8;
}



.app-stats {
    margin-bottom: 2.5rem;
}

.app-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}


.card.app-stats-card {
    border-radius: 18px;
    padding: 1.3rem 1.4rem;
    background: var(--card-bg, rgba(255,255,255,0.9));
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}


[data-theme="dark"] .card.app-stats-card {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.85);
}

.card.app-stats-card > h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.app-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.85rem;
}


.app-stats-item {
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.app-stats-item-total,
.app-stats-item-online {
    background: linear-gradient(
        145deg,
        rgba(63, 131, 248, 0.22),
        rgba(30, 64, 175, 0.28)
    );
    color: #0f172a; 
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(96, 165, 250, 0.45);
}


@media (hover: hover) and (pointer: fine) {
    .app-stats-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
        background: rgba(148, 163, 184, 0.09);
    }
}

.app-stats-label {
    font-size: 0.78rem;
    opacity: 0.75;
}

.app-stats-value {
    font-size: 0.98rem;
    font-weight: 700;
}

.app-stats-note {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    opacity: 0.7;
}


.app-stats-card--site {
    margin-top: 1.5rem;
    gap: 0.8rem;
}


.abzar-stat-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.abzar-stat-inner {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.05);
    border: 1px dashed rgba(148, 163, 184, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

[data-theme="dark"] .abzar-stat-inner {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.4);
}

.abzar-stat-inner * {
    font-family: inherit !important;
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
    direction: rtl;
    text-align: center;
    box-sizing: border-box;
}

.abzar-stat-inner a {
    color: inherit !important;
    text-decoration: none !important;
    opacity: 0.65;
    transition: opacity 0.2s ease;
}

.abzar-stat-inner a:hover {
    opacity: 1;
}

.abzar-stat-inner table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.abzar-stat-inner td,
.abzar-stat-inner th {
    padding: 0.25rem 0.3rem !important;
    border: none !important;
}

.abzar-credit-hidden {
    display: none !important;
}


.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.2rem;
    margin-top: 1.8rem;
}

.app-card {
    border-radius: 18px;
    padding: 1rem 1.1rem;
    background: var(--card-bg, rgba(255,255,255,0.95));
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .app-card {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
}

@media (hover: hover) and (pointer: fine) {
    .app-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
        border-color: rgba(59, 130, 246, 0.45);
    }
}

.app-card-title {
    font-size: 0.98rem;
    font-weight: 700;
}

.app-card-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
}

.app-card-meta {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    opacity: 0.7;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}

.app-card-actions {
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.app-card-actions a {
    font-size: 0.78rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.app-card-actions a:hover {
    border-color: rgba(59, 130, 246, 0.8);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}


@media (max-width: 768px) {
    .section {
        padding-block: 2.2rem;
    }

    .app-stats-grid {
        grid-template-columns: 1fr;
    }

    .card.app-stats-card {
        padding: 1.05rem 1.1rem;
        border-radius: 16px;
    }

    .app-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .app-stats-item {
        padding: 0.55rem 0.65rem;
    }

    .section-header {
        margin-bottom: 1.8rem;
    }

    .apps-grid {
        gap: 1rem;
        margin-top: 1.4rem;
    }
}

@media (max-width: 480px) {
    .app-stats-row {
        grid-template-columns: 1fr;
    }

    .app-card {
        padding: 0.9rem 1rem;
        border-radius: 15px;
    }
}

.section {
    padding: 48px 0 64px;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-title {
    font-size: clamp(1.6rem, 2vw, 2rem);
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.section-subtitle {
    max-width: 640px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.8;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.gallery-filters .chip {
    border: none;
    outline: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    background: rgba(148, 163, 184, 0.18);
    color: inherit;
    transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease, box-shadow 0.12s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gallery-filters .chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .gallery-filters .chip {
    background: rgba(148, 163, 184, 0.18);
    color: #0f172a;
}

[data-theme="dark"] .gallery-filters .chip {
    background: rgba(148, 163, 184, 0.16);
    color: #e5e7eb;
}

.gallery-filters .chip-active {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.gallery-item {
    grid-column: span 12;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(15, 23, 42, 0.02);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    cursor: zoom-in;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    backdrop-filter: blur(10px);
}

[data-theme="light"] .gallery-item {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .gallery-item {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(51, 65, 85, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 260px;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-item:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
        border-color: rgba(37, 99, 235, 0.7);
    }
}

.gallery-item figcaption {
    padding: 10px 12px 12px;
    font-size: 0.86rem;
    line-height: 1.6;
    opacity: 0.85;
}

@media (min-width: 640px) {
    .gallery-grid {
        gap: 18px;
    }
    .gallery-item {
        grid-column: span 6; 
    }
}

@media (min-width: 992px) {
    .gallery-grid {
        gap: 20px;
    }
    .gallery-item {
        grid-column: span 3; 
    }
}


.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.lightbox.show {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: min(900px, 92vw);
    max-height: 86vh;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 18px;
    padding: 10px 10px 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    animation: lightboxFadeIn 0.2s ease-out;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    object-fit: contain;
    background: #020617;
}

.lightbox-content p {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #e5e7eb;
    text-align: center;
    line-height: 1.6;
}

.lightbox-close {
    position: absolute;
    top: 8px;
    left: 8px;  /* چون RTL هست، بستن سمت چپ جذاب‌تره */
    border: none;
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.lightbox-close:hover {
    background: rgba(248, 250, 252, 0.98);
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.7);
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .section {
        padding: 32px 0 48px;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .gallery-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-filters .chip {
        white-space: nowrap;
    }

    .gallery-item figcaption {
        font-size: 0.8rem;
    }

    .lightbox-content {
        max-width: 94vw;
        max-height: 80vh;
        padding: 8px 8px 12px;
    }
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    z-index: 2;
    opacity: 0.9;
}

.lightbox-nav:hover {
    background: rgba(248, 250, 252, 0.98);
    color: #0f172a;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
    opacity: 1;
}

.lightbox-prev {
    right: 12px; 
}

.lightbox-next {
    left: 12px;  
}
/* Extra small devices – up to 300px مدیا زیر 300 یادت باشه*/
@media (max-width: 300px) {

    body {
        font-size: 12px;
    }

    .container {
        padding-inline: 10px;
    }

    
    .navbar-inner {
        height: 56px;
        padding-inline: 8px;
    }

    .nav-brand {
        gap: 6px;
    }

    .nav-brand-avatar {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .nav-brand-title {
        font-size: 11px;
    }

    .nav-brand-subtitle {
        font-size: 8px;
    }

    .nav-toggle {
        width: 32px;
        height: 32px;
    }

    .toggle-pill {
        transform: scale(0.9);
        transform-origin: center;
    }

    .hero-section {
        padding-top: 56px;
    }

    .hero-grid {
        gap: 18px;
    }

    .hero-kicker {
        font-size: 11px;
    }

    .hero-title {
        font-size: 15px;
        line-height: 1.5;
    }

    .hero-subtitle {
        font-size: 11px;
        line-height: 1.6;
    }

    .hero-actions {
        flex-direction: column;
        gap: 8px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding-block: 8px;
        font-size: 12px;
    }

    .hero-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-meta-item {
        width: 100%;
        padding: 8px 10px;
    }

    .hero-profile-card {
        max-width: 100%;
    }

    .hero-profile-inner {
        padding: 14px 12px;
    }

    .hero-avatar-wrapper {
        width: 96px;
        height: 96px;
    }

    .profile-name {
        font-size: 15px;
    }

    .hero-role {
        font-size: 11px;
    }

    .hero-tags {
        gap: 4px;
    }

    .hero-tags li {
        font-size: 10px;
        padding: 2px 6px;
    }

    
    .section {
        padding: 44px 0;
    }

    .section-title {
        font-size: 16px;
    }

    .section-subtitle {
        font-size: 11px;
    }

    .card {
        padding: 14px 12px;
    }

    .timeline {
        padding-inline: 0;
    }

    .timeline-item {
        padding-inline: 10px;
    }

    .timeline-year {
        font-size: 11px;
    }

    .timeline-title {
        font-size: 13px;
    }

    .timeline-text {
        font-size: 11px;
    }

    
    .resume-grid {
        gap: 16px;
    }

    .resume-item-header h4 {
        font-size: 12px;
    }

    .resume-item-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    .resume-item p {
        font-size: 11px;
    }

    .awards-grid {
        gap: 10px;
    }

    .award-caption h4 {
        font-size: 12px;
    }

    .award-caption p,
    .award-meta {
        font-size: 11px;
    }

    .cta-grid {
        gap: 14px;
    }

    .cta-actions {
        flex-direction: column;
        gap: 8px;
    }

    .cta-actions .btn {
        width: 100%;
        justify-content: center;
        font-size: 12px;
        padding-block: 8px;
    }

    
    .footer-grid {
        gap: 16px;
    }

    .footer-title {
        font-size: 14px;
    }

    .footer-subtitle {
        font-size: 12px;
    }

    .footer-text,
    .footer-links li,
    .footer-links a {
        font-size: 11px;
    }

    .back-to-top {
        width: 34px;
        height: 34px;
        bottom: 14px;
        right: 14px;
        font-size: 14px;
    }
}
