* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #000000;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    flex: 1;
}

.logo .icon {
    width: 25px;
    height: 25px;
    background: #2563eb;
    margin-right: 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text a{
    text-decoration: none;
    color: white;
}

.logo-name {
    font-size: 18px;
    font-weight: bold;
}

.logo-title {
    font-size: 12px;
    color: #888;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #2563eb;
}

/* Mobile menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Mobile Navigation */
.nav-menu.mobile-active {
    display: flex;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: #000;
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 999;
    gap: 0;
}

.nav-menu.mobile-active li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #333;
}

.nav-menu.mobile-active li:last-child {
    border-bottom: none;
}

.nav-menu.mobile-active a {
    display: block;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.nav-menu.mobile-active a:hover {
    background: #1a1a1a;
    color: #2563eb;
}

/* Hero Section */
.hero {
    padding: 60px 0 40px;
    text-align: center;
    background: radial-gradient(circle at center, #2d2d2d 0%, #1a1a1a 70%);
}

.profile-card {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 20px;
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 25px;
    background: #444;
    /* display: flex; */
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #888;
    border: 4px solid #2563eb;
    object-fit: cover; /* باعث می‌شود عکس بدون تغییر نسبت، کادر را پر کند */
    display: block;
}

.profile-name {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #2563eb, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-title {
    font-size: 16px;
    color: #888;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
    white-space: nowrap;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #888;
    border: 2px solid #444;
}

.btn-secondary:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-3px);
}

/* About Section */
.about {
    padding: 80px 0;
    background: #1a1a1a;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 50px;
    justify-content: center;
}

.section-title .icon {
    width: 35px;
    height: 35px;
    background: #2563eb;
    margin-right: 15px;
    border-radius: 8px;
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 40px;
    line-height: 1.8;
}

.about-greeting {
    font-size: 40px;
    margin-bottom: 25px;
}

.about-subtitle {
    font-size: 20px;
    color: #888;
    margin-bottom: 35px;
}

/* Resume Section */
.resume {
    padding: 80px 0;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
    gap: 20px;
}

.experience-card {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    border-left: 4px solid #2563eb;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-5px);
}

.experience-date {
    color: #2563eb;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}

.experience-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
}

.experience-company {
    color: #888;
    margin-bottom: 15px;
}

.experience-description {
    color: #ccc;
    line-height: 1.6;
    font-size: 15px;
}

/* Skills Section */
.skills-section {
    background: #1e1e1e;
    padding: 40px 30px;
    border-radius: 15px;
    margin-top: 40px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.skill-category h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #fff;
}

.skill-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #ccc;
}

.skill-item .icon {
    width: 16px;
    height: 16px;
    background: #2563eb;
    margin-right: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Projects Section */
.projects {
    padding: 80px 0;
    background: #1a1a1a;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.project-card {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.project-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(45deg, #2563eb, #60a5fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 15px;
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 20px;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 8px;
}

.project-role {
    color: #888;
    margin-bottom: 12px;
    font-size: 14px;
}

.project-description {
    color: #ccc;
    line-height: 1.6;
    font-size: 14px;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #ccc;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #333;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.contact-item {
    text-align: center;
}

.contact-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #fff;
}

.contact-item p {
    color: #888;
    font-size: 14px;
}

/* Footer */
.footer {
    background: #000;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #333;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer p {
    color: #888;
    font-size: 14px;
}

.footer a {
    color: #2563eb;
    text-decoration: none;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }

    .logo {
        font-size: 16px;
    }

    .logo .icon {
        width: 20px;
        height: 20px;
    }

    .logo-name {
        font-size: 16px;
    }

    .logo-title {
        font-size: 10px;
    }

    .hero {
        padding: 40px 0 30px;
    }

    .profile-card {
        margin: 0 10px;
        padding: 30px 15px;
        border-radius: 15px;
    }

    .profile-img {
        width: 100px;
        height: 100px;
        font-size: 40px;
        margin-bottom: 20px;
    }

    .profile-name {
        font-size: 28px;
    }

    .profile-title {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn {
        width: 200px;
        text-align: center;
    }

    .about {
        padding: 60px 0;
    }

    .about-greeting {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .about-subtitle {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .about-text {
        font-size: 15px;
        text-align: left;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
        text-align: center;
    }

    .section-title .icon {
        width: 30px;
        height: 30px;
    }

    .resume {
        padding: 60px 0;
    }

    .resume-header {
        flex-direction: column;
        text-align: center;
    }

    .resume-header h2 {
        font-size: 24px;
    }

    .experience-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .experience-title {
        font-size: 20px;
    }

    .skills-section {
        padding: 30px 20px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .projects {
        padding: 60px 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }

    .project-image {
        height: 150px;
        font-size: 14px;
    }

    .project-content {
        padding: 20px;
    }

    .contact {
        padding: 60px 0;
    }

    .contact-form {
        padding: 25px 20px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 40px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer p {
        font-size: 13px;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .profile-card {
        margin: 0 5px;
        padding: 25px 10px;
    }

    .profile-name {
        font-size: 24px;
    }

    .about-greeting {
        font-size: 28px;
    }

    .section-title {
        font-size: 24px;
    }

    .experience-card {
        padding: 15px;
    }

    .skills-section {
        padding: 25px 15px;
    }

    .project-content {
        padding: 15px;
    }

    .contact-form {
        padding: 20px 15px;
    }
}


/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #333;
    border-radius: 50%;
    border-top-color: #2563eb;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth scrolling effect */
html {
    scroll-behavior: smooth;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Touch improvements for mobile */
@media (hover: none) and (pointer: coarse) {

    .btn:hover,
    .social-links a:hover,
    .nav-menu a:hover {
        transform: none;
    }

    .experience-card:hover,
    .project-card:hover {
        transform: none;
    }

    .btn:active,
    .social-links a:active {
        transform: scale(0.95);
    }
}