/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #CD853F;
    --dark-color: #2C1810;
    --light-color: #F5F5DC;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --gradient-1: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    --gradient-2: linear-gradient(135deg, #2C1810 0%, #8B4513 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo a:hover {
    color: var(--secondary-color);
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-2);
    color: var(--white);
    text-align: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(139, 69, 19, 0.3) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--light-color);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s both;
    margin-bottom: 2rem;
}

.hero-social {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 1s both;
}

.social-link {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.social-link span {
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: var(--transition);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px) scale(1.1);
    border-color: var(--white);
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--white);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
    animation: scrollDown 2s infinite;
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 1.5rem;
}

/* About Section */
.about {
    background: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    aspect-ratio: 721/1280;
    object-fit: cover;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 2;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.about-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Experience Section */
.experience {
    background: var(--white);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-1);
    transform: translateX(50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    z-index: 2;
    box-shadow: var(--shadow);
}

.timeline-icon svg {
    width: 30px;
    height: 30px;
    color: var(--white);
}

.timeline-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    width: calc(50% - 40px);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-date {
    display: inline-block;
    background: var(--gradient-1);
    color: var(--white);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Skills Section */
.skills {
    background: var(--light-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Gallery Section */
.gallery {
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:first-child {
    aspect-ratio: 721/1280;
}

.gallery-item:nth-child(2) {
    aspect-ratio: 960/1280;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 24, 16, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay p {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay p {
    transform: translateY(0);
}

/* Contact Section */
.contact {
    background: var(--light-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 2;
    font-size: 1.1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.contact-link:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-icon-svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-item:hover .contact-icon-svg {
    fill: var(--secondary-color);
    transform: scale(1.1);
}

.contact-form-wrapper {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-message {
    display: none;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.form-message--success {
    background: rgba(34, 139, 34, 0.12);
    color: #1a6b1a;
    border: 1px solid rgba(34, 139, 34, 0.3);
}

.form-message--error {
    background: rgba(180, 50, 50, 0.1);
    color: #a32a2a;
    border: 1px solid rgba(180, 50, 50, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-link {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    font-size: 1rem;
}

.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.footer-social-link span {
    font-size: 1.2rem;
}

.footer-social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: var(--transition);
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-credit {
    font-size: 0.9rem;
    opacity: 0.85;
    color: var(--light-color);
    margin-top: 0.25rem;
}

.footer-credit-link {
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.footer-credit-link:hover {
    border-bottom-color: var(--white);
    opacity: 1;
}

.footer-seo {
    font-size: 0.9rem;
    opacity: 0.8;
    color: var(--light-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scrollDown {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow);
        transition: var(--transition);
        gap: 1rem;
    }

    .nav-menu.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        right: 30px;
    }

    .timeline-item {
        flex-direction: row !important;
    }

    .timeline-icon {
        right: 30px;
        transform: translateX(50%);
    }

    .timeline-content {
        width: calc(100% - 100px);
        margin-right: auto !important;
        margin-left: 0 !important;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-social {
        gap: 1rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
    }

    .footer-social {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }

    .hero-social {
        gap: 0.8rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .social-link span {
        font-size: 1.2rem;
    }

    .footer-social-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Print Styles for SEO */
@media print {
    .navbar,
    .hero-buttons,
    .contact-form-wrapper,
    .footer {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}
