@font-face {
    font-family: 'Dana-medium';
    src: url('../font/dana-medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Dana-bold';
    src: url('../font/dana-bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Morabba-Bold';
    src: url('../font/Morabba-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Morabba-Medium';
    src: url('../font/Morabba-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

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

/* رنگ‌ها و اندازه های استفاده شده */
:root {
    --green: #92FE9D;
    --cyan: #00C9FF;
    --dark: #0f0f0f;
    --light: #ffffff;

    --border-radius: 12px;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    
    --spacing-sm: 15px;
    --spacing-md: 30px;
    --spacing-lg: 50px;
    
    --container-width: 1200px;
}

body {
    font-family: 'Dana', sans-serif;
    background-color: #92FE9D;
    color: #0f0f0f;
    direction: rtl;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: block;
}

header {
    background: linear-gradient(
    #00C9FF 80%,
    #92FE9D 100%);
    padding: 20px 15px;
    color: #000;
    position: fixed;
    width: 100%;
    height: auto;
}

header h1 {
    margin: 10px 0;
    font-size: 2.2rem;
    text-align: right;
}

.menu-toggle {
    display: none;
}

.site-logo {
    font-family: 'Morabba-Bold', sans-serif;
    font-weight: 700;
}

.hamburger {
    display: none;
    cursor: pointer;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1003;
    transition: transform 0.3s ease;
}

.hamburger svg line {
    transition: transform 0.3s ease, opacity 0.2s ease, stroke 0.2s ease;
    transform-origin: 50% 50%;
}

.hamburger:hover {
    transform: translateY(-50%) scale(1.15);
}

#menu-toggle:checked + .container .hamburger .line1 {
    transform: translateY(20px) rotate(45deg);
}

#menu-toggle:checked + .container .hamburger .line2 {
    opacity: 0;
}

#menu-toggle:checked + .container .hamburger .line3 {
    transform: translateY(-20px) rotate(-45deg);
}

#menu-toggle:checked + .container .hamburger svg line {
    stroke: #ffffff;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(#00C9FF 80%, #92FE9D 100%);
    text-align: right;
    padding: calc(var(--header-height, 160px) + 20px) 20px 40px 20px;
    z-index: 1002;
    transform: translateX(-110%);
    transition: transform 0.35s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0;
    margin: 0;
}

#menu-toggle:checked ~ .mobile-menu {
    transform: translateX(0);
}

.mobile-menu a {
    color: #0f0f0f;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5rem;
    padding: 15px;
    display: block;
    border-radius: var(--border-radius);
}

.mobile-menu a:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.mobile-menu a.active {
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    padding: 0;
    flex-wrap: wrap;
}

nav a {
    color: #0f0f0f;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.nav-icon {
    vertical-align: middle;
    margin-left: 8px;
    fill: currentColor;
}

nav a:hover {
    color: #92FE9D;
    text-decoration: underline;
}

main {

    padding-top: var(--header-height, 160px);
    padding-right: 40px;
    padding-left: 40px;
    min-height: calc(100vh - 147.9px);
    width: 100%;
}

main a {
    color: #ffffff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
}

header {
    position: fixed;
    z-index: 1200;
    width: 100%;
}

header a, .site-header a, .main-nav a, .mobile-menu a {
    color: #0f0f0f;
    text-decoration: none;
}

.main-nav a.active, .mobile-menu a.active {
    background: rgba(0,0,0,0.25);
    color: #ffffff;
}
.main-nav a:hover, .mobile-menu a:hover {
    color: #92FE9D;
}

.about-link1 :hover {
    color: #00C9FF;
    text-decoration: underline;
}

.about-link2 :hover {
    color: #00C9FF;
    text-decoration: underline;
}

.profile-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 6px solid #00C9FF;
    box-shadow: var(--shadow);
}

.profile-image img:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.portfolio-preview {
    padding: var(--spacing-md);
}

.portfolio-list {
    padding: var(--spacing-md);
    border: 1px solid #0f0f0f;
    border-radius: var(--border-radius);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.portfolio-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.portfolio-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}
.product-info {
    padding: 14px 16px;
    text-align: right;
}
.product-info h3 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
}
.product-info p {
    margin: 0 0 12px 0;
    color: #333;
    line-height: 1.4;
}
.btn {
    display: inline-block;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    color: #0f0f0f;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.figcaption {
    font-weight: 600;
}

.skills-list ul {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    list-style: none;
}

.skills-list li {
    background: #00C9FF;
    color: #0f0f0f;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #00C9FF;
    border-radius: var(--border-radius);
    font-family: 'Dana', sans-serif;
}

button {
    background: #00C9FF;
    color: #0f0f0f;
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

button:hover {
    background: #92FE9D;
    transform: translateY(-3px);
}

footer {
    background: linear-gradient(
    #92FE9D 10%,
    #00C9FF 70%);
    color:#0f0f0f;
    text-align: center;
    padding-top: 40px;
    margin-top: 50px;
    padding-bottom: 2%;
    width: 100%;
}

footer a {
    color: #0f0f0f;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    width: auto;
    height: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    width: 70px;
    height: 70px;
    background: #ffffff;
    padding: 0;
    vertical-align: top;
    border-radius: 50%;
}

.social-links img {
    width: 42px;
    height: 42px;
    margin: 0;
    display: block;
    transform-origin: center center;
    filter: grayscale(100%);
}

/* وقتی هاور میشه، آیکون رنگی بشه */
a.telegram:hover img { filter: none; }
a.whatsapp:hover img { filter: none; }
a.eitaa:hover img   { filter: none; }

/* کمی بزرگ‌تر شدن آیکون موقع هاور */
.social-links a:hover img {
    transform: scale(1.5);
    transition: transform 0.18s ease;
}

@media (max-width: 480px) {
    .social-links a { width: 60px; height: 60px; }
    .social-links img { width: 36px; height: 36px; }
}

@media (max-width: 460px) {
    main {
        padding-right: 20px;
        padding-left: 20px;
    }
    .portfolio-list {
        padding: 12px;
        overflow: hidden;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .portfolio-card img {
        height: 120px;
    }
    .product-info {
        padding: 10px 12px;
    }
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* صفحه‌ی موبایل */
@media ( max-width : 768px ) {
    main {
        padding-top: 180px;
    }
    header {
        text-align: center;
    }
    header h1 {
        font-size: 1.8rem;
    }
    nav ul {
        display: none;
    }
    .container {
        position: relative;
        padding-left: 70px;
        text-align: center;
    }
    .hamburger {
        display: block;
    }
    .main-nav ul {
        display: none;
    }
    .site-logo {
        font-size: 1.8rem;
    }
    .portfolio-card img {
        height: 140px; 
    }
}

/* تقریبا بزرگ مثلا تبلت */
@media (min-width: 768px) {
    main {
        padding-top: 230px;
    }
    .about-section {
        display: flex;
        align-items: center;
        gap: 50px;
    }
    
    .profile-image {
        flex: 1;
    }
    .profile-image img {
        width: 300px;
        height: 300px;
        border-radius: 50%;
        border: 6px solid #00C9FF;
        box-shadow: var(--shadow);
    }
    .about-section div {
        flex: 2;
    }
}

/* بزرگ مثلا کامپیوتر */
@media (min-width: 1024px) {
    main {
        padding-top: 150px;
    }
    .profile-image {
        margin: 0 auto;
    }
    .profile-image img {
        width: 400px;
        height: 400px;
        margin: 0 auto;
        border-radius: 50%;
        border: 6px solid #00C9FF;
        box-shadow: var(--shadow);
    }
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .main-nav ul {
        margin-top: 0;
    }
}