:root {
    --bg-base: #050810;
    --card-bg: rgba(13, 19, 33, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --item-bg: rgba(255, 255, 255, 0.03);
    --item-hover: rgba(56, 189, 248, 0.08);
    --item-border: rgba(255, 255, 255, 0.05);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-secondary: #818cf8;
    --gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --gradient-hover: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(129, 140, 248, 0.15) 100%);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

[data-theme="light"] {
    --bg-base: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(15, 23, 42, 0.08);
    --item-bg: rgba(15, 23, 42, 0.03);
    --item-hover: rgba(2, 132, 199, 0.06);
    --item-border: rgba(15, 23, 42, 0.06);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #0284c7;
    --accent-secondary: #4f46e5;
    --gradient-hover: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(79, 70, 229, 0.08) 100%);
    --shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2.5rem 1rem;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    animation: floatOrb 15s ease-in-out infinite alternate;
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: #0284c7;
    top: -100px;
    right: -150px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #6366f1;
    bottom: -100px;
    left: -150px;
    animation-delay: -7s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, 30px) scale(1.1); }
}

.resume-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: var(--shadow);
    animation: cardEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.resume-header {
    border-bottom: 1px solid var(--item-border);
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.header-actions {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    gap: 0.75rem;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--item-border);
    background: var(--item-bg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn:hover {
    background: var(--item-hover);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.15);
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.avatar-ring {
    width: 110px;
    height: 110px;
    padding: 3px;
    border-radius: 50%;
    background: var(--gradient);
    flex-shrink: 0;
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.3);
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-base);
    padding: 4px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; 
    display: block;
}

.name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    letter-spacing: -0.5px;
}

.job-title {
    font-size: 1.05rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    background: var(--item-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--item-border);
}

.resume-section {
    margin-bottom: 3rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.title-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-hover);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-icon-box i {
    width: 18px;
    height: 18px;
}

.section-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--item-bg);
    border: 1px solid var(--item-border);
    padding: 0.6rem 1.2rem;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    direction: ltr;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.skill-tag:hover {
    background: var(--item-hover);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.15);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.project-card {
    background: var(--item-bg);
    border: 1px solid var(--item-border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hover);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.project-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.4);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card > * {
    position: relative;
    z-index: 1;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.project-title-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.project-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--item-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.project-card:hover .project-icon-box {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

.project-icon {
    width: 20px;
    height: 20px;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 800;
}

.featured-project {
    border-color: rgba(16, 185, 129, 0.3);
}

.project-icon-box.featured {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.project-card:hover .project-icon-box.featured {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 12px;
    white-space: nowrap;
}

.status-badge.inactive {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.project-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.timeline {
    padding-right: 0.5rem;
}

.timeline-item {
    display: flex;
    gap: 1.25rem;
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 6px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 15px var(--accent);
    flex-shrink: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: 7px;
    top: 22px;
    bottom: 0;
    width: 2px;
    background: var(--item-border);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-content {
    background: var(--item-bg);
    border: 1px solid var(--item-border);
    padding: 1.25rem;
    border-radius: 16px;
    flex: 1;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateX(-5px);
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.timeline-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    background: rgba(56, 189, 248, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
}

.card-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--item-border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .resume-container {
        padding: 2rem 1.5rem;
    }
    .header-profile {
        flex-direction: column;
        text-align: center;
        margin-top: 4rem;
        gap: 1.5rem;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}