
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
   }

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #2ecc71;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --header-height: 80px;
}

body {
            font-family: 'Vazirmatn', sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
            color: var(--dark);
            overflow-x: hidden;
            line-height: 1.6;
            padding-top: var(--header-height);
}
        .container 
        {
            width: 95%;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* Header & Navigation */
        header 
        {
            background: rgba(255, 255, 255, 0.95);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            backdrop-filter: blur(10px);
            height: var(--header-height);
        }

        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-left: 40px;
            padding-right: 40px;
            height: var(--header-height);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--secondary);
        }

.nav-links a 
{
    font-size: 1.1rem;
    position: relative;
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
    padding: 10px;
    display: block;
    color: var(--dark);
}
   
.dropdown-content 
{
    display:none;
    border-radius: 10px;
    position: absolute; /* Ensure it's positioned relative to parent */
    top: 100%;
    inset-inline-start: 0; /* Works for both LTR & RTL */
    background-color: #f9f9f9;
    min-width: 250px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
}
.dropdown-content li 
{
            padding: 10px;
            list-style-type: none;
}

.dropdown:hover .dropdown-content 
{
    display: block;
}
.nav-links .dropdown-content a.disabled {
    color: #b0b0b0;
    pointer-events: none;
    cursor: not-allowed;
}
.nav-links a:after 
{
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 3px;
            background: var(--secondary);
            border-radius: 3px;
            transition: var(--transition);
        }

        .nav-links a:hover:after {
            width: 100%;
        }

        .nav-links a:hover {
            color: var(--secondary);
        }
        .nav-links {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
        }

.nav-links li 
{
    position: relative;
    }
    


.dir-switch 
{
            background: transparent;
            border: 1px solid var(--secondary);
            color: var(--primary);
            padding: 8px 15px;
            border-radius: 30px;
            font-size: 0.9rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s ease;
            max-height:min-content;
        }

        .dir-switch:hover 
        {
            background: var(--secondary);
            color: white;
        }

        /* Hero Section */
        .hero 
        {
           /* position: relative;
            overflow: hidden;
            background-color: #3ae782;*/
            display: flex;
            align-items: flex-start;   /* Align both divs to top */
            gap: 20px;                 /* Space between left and right */
            padding: 20px;
        }
        .hero .left 
        {
            display: block;
            align-items: center;       /* Vertically center image in the div */
            justify-content: center;   /* Horizontally center image (optional) */
            min-width: 150px;          /* Adjust as needed */
            padding: 20px 50px 20px 20px;

        }

        .hero .right 
        {
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Align paragraphs from top */
        gap: 10px;                   /* Space between <p> elements */
        padding: 25px 0px;
        }

.carousel-container
{
  width: 450px;
  height: 300px;
  overflow: hidden;
  position: relative;
  margin: auto;
  border-radius: 10px;
}

.carousel-inner 
{
  display: flex;
  transition: transform 1.5s ease-in-out;
  /*width: 300%;  or 100% * number of slides */
}

.carousel-slide 
{
  flex: 0 0 100%;
  width: 100%;
}

.carousel-slide img 
{
  width: 450px;
  height: 300px;
  object-fit:fill;
  display: block;
}

.carousel-controls 
{
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.carousel-indicator 
{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
  transition: background-color 0.3s ease;
}


.carousel-indicator.active 
{
  background-color: #333;
}

.hero .right h1 
            {
            
            max-width: 650px;
            font-size: 2rem;
            font-weight: 500;
            color: var(--primary);
            top: 0px;
            }

        .hero-bg-elements {
            position: absolute;
            top: 0;
            left: 0;
            padding: auto;
            margin: auto;
            width: 100%;
            height: 100%;
            z-index: 0;
            overflow: hidden;
        }
        
        .math-element {
            position: absolute;
            font-size: 3rem;
            opacity: 0.1;
            color: var(--secondary);
            user-select: none;
        }

        /* Sections */
        section {
            padding: 100px 0;
        }

        .section-header {
            text-align: center;
            margin-bottom: 70px;
        }

        .section-header h2 {
            font-size: 2.8rem;
            color: var(--primary);
            position: relative;
            display: inline-block;
            margin-bottom: 20px;
        }

        .section-header h2:after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: var(--accent);
            border-radius: 2px;
        }

        .section-header p {
            max-width: 700px;
            margin: 0 auto;
            font-size: 1.1rem;
            color: #666;
        }

        /* Biography */
        .bio
        {
            background-color: transparent;
            margin: 0px; 
            padding: 50px 100px;
        }
        .bio-content {
            display: flex;
            gap: 25px;
            align-items: center;
        }
        
        .bio-text {
            flex: 1;
        }

        .bio-text h3 {
            font-size: 2rem;
            margin-bottom: 20px;
            color: var(--primary);
        }

        .bio-text p {
            margin-bottom: 20px;
            font-size: 1.1rem;
        }

        .bio-highlights {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-top: 30px;
        }

        .highlight-card {
            background: white;
            padding: 25px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            transition: var(--transition);
            border-left: 4px solid var(--secondary);
        }
/*
        body.rtl .highlight-card {
            border-left: none;
            border-right: 4px solid var(--secondary);
        }

        body.rtl .bio-content {
            flex-direction: row-reverse;
        }
        body.rtl .section-header {
            text-align: center;
        }
 body.rtl 
        {
            direction: rtl;
            text-align: right;
        }
        body.rtl .logo {
            flex-direction: row-reverse;
        }

        .logo i {
            color: var(--accent);
        }

     
body.rtl .nav-links {
            flex-direction: row-reverse;
            direction: ltr;
        }

        body.rtl .nav-links a:after {
            left: auto;
            right: 0;
        }

body.rtl .carousel-inner 
{
  direction: rtl;
}

body.rtl .carousel-indicators 
{
  direction: rtl;
}
*/
        .highlight-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
        }

        .highlight-card h4 {
            font-size: 1.3rem;
            margin-bottom: 10px;
            color: var(--primary);
        }

        /* Research */
        .research-container {
            background: linear-gradient(135deg, var(--primary) 0%, #1a2530 100%);
            padding: 80px 0;
            border-radius: 20px;
            color: white;
            position: relative;
            overflow: hidden;
        }

        .research-content {
            position: relative;
            z-index: 2;
        }

        .research-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .research-card {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 30px;
            transition: var(--transition);
        }

        .research-card:hover {
            transform: translateY(-10px);
            background: rgba(255, 255, 255, 0.15);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .research-card i {
            font-size: 2.5rem;
            color: var(--accent);
            margin-bottom: 20px;
        }

        .research-card h3 {
            font-size: 1.5rem;
            margin-bottom: 15px;
        }

        /* Social & Contact */
        .social-contact {
            text-align: center;
        }

        .social-icons {
            display: flex;
            justify-content: center;
            gap: 25px;
            margin: 20px 0;
        }

        .social-icons a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 70px;
            height: 70px;
            background: white;
            border-radius: 50%;
            font-size: 1.8rem;
            color: var(--secondary);
            text-decoration: none;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
            transition: var(--transition);
        }

        .social-icons a:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
            color: white;
            background: var(--secondary);
        }

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

        .contact-item {
            background: white;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            transition: var(--transition);
        }

        .contact-item:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
        }

        .contact-item i {
            font-size: 2.5rem;
            color: var(--secondary);
            margin-bottom: 20px;
        }

        /* Footer */
        footer {
            background: var(--primary);
            color: white;
            padding: 30px 0;
            text-align: center;
        }

        /* Animations 
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }

        .floating {
            animation: float 6s ease-in-out infinite;
        }

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

        .rotating {
            animation: rotate 20s linear infinite;
        }

         Responsive
        @media (max-width: 992px) {
            .hero h1 {
                font-size: 2.8rem;
            }
            
            
            .bio-content {
                flex-direction: column;
            }
        }

        @media (max-width: 768px) {
            .hero {
                text-align: center;
                flex-direction: column;
                height: auto;
                min-height: calc(100vh - var(--header-height));
                padding: 40px;
            }
            
            
            .bio-highlights {
                grid-template-columns: 1fr;
            }
            
            .hero h1 
            {
                font-size: 2rem;
                
            }
        }*/
        /* Animations */

/* Float up and down gently (e.g., for icons or background elements) */
/* Zoom effect */
@keyframes zoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Continuous slow rotation (e.g., for decorative elements) */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotate 20s linear infinite;
}

/* Smooth fade in (e.g., on scroll or page load) */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Pop-up bounce effect (e.g., hover on cards or buttons) */
@keyframes popUp {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

.pop-up {
    animation: popUp 0.4s ease forwards;
}

/* Shimmer animation (e.g., for skeleton loaders or highlight effect) */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 0%, #e4e4e4 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

/* Slide-in from left (useful for hero or section content) */
@keyframes slideInLeft {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

/* Slide-in from right (complementary to left) */
@keyframes slideInRight {
    0% {
        transform: translateX(50px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* Slide-up effect */
@keyframes slideUp {
    0% {
        transform: translateY(40px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.7s ease forwards;
}

/* Pulse effect for attention grabbing (e.g., CTA buttons) */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.pulse {
    animation: pulse 2s infinite ease-in-out;
}