* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

header {
    text-align: center;
    padding: 50px 20px;
    background-color: #2c3e50;
    color: #fff;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.social-links a {
    margin: 0 10px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

section {
    padding: 50px 20px;
    max-width: 1000px;
    margin: auto;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

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

.project-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.project-card img {
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}


.project-card h3 {
    margin: 10px;
    font-size: 1.2rem;
    color: #2c3e50;
}

.project-card p {
    margin: 0 10px 10px 10px;
    flex-grow: 1;
}

.project-links {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: #f4f4f4;
}

.project-links a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

hr {
    border: none;           /* حذف حالت پیش‌فرض خط */
    height: 3px;            /* ضخامت خط */
    background-color: #ccc; /* رنگ ملایم خاکستری */
    margin: 5px 30px;      /* فاصله از بالا/پایین و دو طرف */
    border-radius: 1px;     /* لبه‌های نرم و صاف */
}

span {
    background-color: #a8e6a2; /* سبز ملایم */
    border-radius: 4px;         /* گوشه‌های گرد */
    padding: 2px 6px;           /* فاصله داخلی برای خوانایی */
    font-weight: 500;           /* کمی ضخیم */
    color: #1b3a1b;             /* رنگ متن تیره برای کنتراست */
    margin: 5px 5px 5px 0;      /* فاصله از بغل و پایین */
    display: inline-block;      /* خودش اندازه مناسب داشته باشه */
}


footer {
    text-align: center;
    padding: 20px;
    background-color: #2c3e50;
    color: #fff;
}

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

.cert-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cert-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.cert-card p {
    padding: 10px;
    font-weight: bold;
    font-size: 0.95rem;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
