/* about page */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

:root {
    --primary-color: #1a73e8;
    --secondary-color: #34a853;
    --accent-color: #fbbc04;
    --text-color: #ffffff;
    --text-light: #aaaaaa;
    --light-bg: #000000;
    --card-bg: #0a0a0a;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    --header-bg: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    --footer-bg: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    --particle-bg: linear-gradient(135deg, #333333, #555555);
    --drop-bg: rgba(100, 100, 100, 0.4);
    --nav-bg: rgba(255, 255, 255, 0.1);
    --nav-hover: #fbbc04;
    --text-white: #ffffff;
    --text-dark: #000000;
    --border-light: #2a2a2a;
}

/* light theme */
body.light-theme {
    --primary-color: #1a73e8;
    --secondary-color: #34a853;
    --accent-color: #fbbc04;
    --text-color: #202124;
    --text-light: #555555;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    --header-bg: linear-gradient(135deg, #1a73e8, #34a853);
    --footer-bg: linear-gradient(135deg, #1a73e8, #1557b3);
    --particle-bg: linear-gradient(135deg, #1a73e8, #34a853);
    --drop-bg: rgba(26, 115, 232, 0.4);
    --nav-bg: rgba(0, 0, 0, 0.05);
    --nav-hover: #fbbc04;
    --text-white: #ffffff;
    --text-dark: #202124;
    --border-light: #dddddd;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
    transition: all 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes waterFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShift {
    0%, 100% { background-size: 200% 200%; background-position: left center; }
    50% { background-size: 200% 200%; background-position: right center; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-10px); }
    75% { transform: translateY(-30px) translateX(5px); }
}

@keyframes drop {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    95% { opacity: 0.8; }
    100% { top: 100%; opacity: 0; }
}

/* header */
header {
    background: var(--header-bg);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    color: var(--text-white);
    padding: 1rem 1.5rem;
    position: relative;
    /* visible: dropdowns escape the header */
    overflow: visible;
    z-index: 900;
    box-shadow: var(--shadow);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M0,128L48,117.3C96,107,192,85,288,112C384,139,480,213,576,218.7C672,224,768,160,864,138.7C960,117,1056,139,1152,149.3C1248,160,1344,160,1392,160L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    animation: waterFlow 15s ease infinite;
}

/* header content */
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    gap: 1rem;
}

/* logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: fadeIn 1s ease-out;
}

.logo i,
.logo svg.icon {
    font-size: 2rem;
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

/* nav */
nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    background: var(--nav-bg);
}

nav a:hover {
    background: var(--nav-hover);
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* theme switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

/* theme toggle */
#theme-toggle-button {
    font-size: 14px;
    position: relative;
    display: inline-block;
    width: 6.5em;
    cursor: pointer;
    transform: scale(0.9);
}

#theme-toggle-button #toggle {
    opacity: 0;
    width: 0;
    height: 0;
}

/* scoped: ids also exist in icon sprite */
#theme-toggle-button #container,
#theme-toggle-button #patches,
#theme-toggle-button #stars,
#theme-toggle-button #button,
#theme-toggle-button #sun,
#theme-toggle-button #moon,
#theme-toggle-button #cloud {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.25s;
}

#theme-toggle-button #toggle:checked + svg #container {
    fill: #2b4360;
}

#theme-toggle-button #toggle:checked + svg #button {
    transform: translate(28px, 2.333px);
}

#theme-toggle-button #sun {
    opacity: 1;
}

#theme-toggle-button #toggle:checked + svg #sun {
    opacity: 0;
}

#theme-toggle-button #moon {
    opacity: 0;
}

#theme-toggle-button #toggle:checked + svg #moon {
    opacity: 1;
}

#theme-toggle-button #cloud {
    opacity: 1;
}

#theme-toggle-button #toggle:checked + svg #cloud {
    opacity: 0;
}

#theme-toggle-button #stars {
    opacity: 0;
}

#theme-toggle-button #toggle:checked + svg #stars {
    opacity: 1;
}

/* about section */
.about-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    animation: fadeInUp 1s ease-out;
}

/* about content */
.about-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.about-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: rotate(45deg);
    animation: shimmer 5s infinite;
}

.about-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 50px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.about-content > p {
    font-size: clamp(0.86rem, 2.6vw, 1rem);
    line-height: 2.1;
    margin-bottom: 1.5rem;
    text-align: start;
    color: var(--text-color);
}

/* features */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* feature card */
.feature-card {
    flex: 1 1 280px;
    background: var(--light-bg);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

/* feature icon */
.feature-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.feature-icon i,
.feature-icon svg.icon {
    color: white;
    font-size: 1.4rem;
}

/* feature text */
.feature-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.feature-text p {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: var(--text-light);
}

/* team section */
.team-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* team container */
.team-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

/* team member */
.team-member {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1 1 350px;
    max-width: 400px;
    border: 1px solid var(--border-light);
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* member image */
.member-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.2rem;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

/* team member */
.team-member:hover .member-image {
    transform: scale(1.02);
}

/* member image */
.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* full photo is stored uncropped, the circle only frames the face */
    object-position: center 25%;
    transition: transform 0.5s ease;
}

/* face framing per photo, files stay uncropped */
.member-image img.face-arvin { object-position: 49% 17%; }
.member-image img.face-yar { object-position: 34% 30%; }

/* team member */
.team-member:hover .member-image img {
    transform: scale(1.08);
}

/* member info */
.member-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
}

/* member role */
.member-role {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.8rem;
}

/* member desc */
.member-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

/* social links */
.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* social btn */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0 1.05rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.social-btn .icon {
    width: 1.1em;
    height: 1.1em;
}

.social-btn.telegram {
    background: linear-gradient(135deg, #2aabee, #229ed9);
    box-shadow: 0 6px 16px rgba(34, 158, 217, 0.32);
}

.social-btn.email {
    background: linear-gradient(135deg, #ea4335, #c5221f);
    box-shadow: 0 6px 16px rgba(197, 34, 31, 0.3);
}

.social-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
}

.social-btn:active { transform: translateY(0); }

/* team member */
/* team head */
.team-head {
    max-width: 760px;
    margin: 0 auto 2.2rem;
    padding: 0 1.5rem;
    text-align: center;
}

.team-head h2 {
    font-size: clamp(1.4rem, 5vw, 2rem);
    color: var(--primary-color);
    margin-bottom: .8rem;
}

.team-head p {
    color: var(--text-light);
    line-height: 2.1;
    font-size: clamp(.86rem, 3.4vw, .96rem);
}

/* both founders share the same frame, no favourite */
.team-member .member-image {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(251, 188, 4, 0.3);
}

/* footer */
footer {
    background: var(--footer-bg);
    color: var(--text-white);
    padding: 2.5rem 1.5rem;
    margin-top: 3rem;
}

/* footer content */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

/* footer section */
.footer-section {
    flex: 1 1 250px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-section p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* footer links */
.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a,
/* footer mail */
.footer-mail {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.footer-mail {
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
}

.footer-links a:hover,
.footer-mail:hover {
    color: white;
    transform: translateX(-3px);
}

/* copyright */
.copyright {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* scroll top */
.scroll-top {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border: none;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* particles container */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* particle */
.particle {
    position: absolute;
    background: var(--particle-bg);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 12s infinite linear;
}

/* water drop */
.water-drop {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--drop-bg);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

/* has reveal */
.has-reveal .scroll-animation {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.has-reveal .scroll-animation.animated {
    opacity: 1;
    transform: translateY(0);
}

.has-reveal .scroll-animation.no-anim { transition: none; }

/* narrow 992px */
@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
}

/* mobile 768px */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .logo i,
    
    .logo svg.icon {
        font-size: 1.6rem;
    }
    
    nav ul {
        justify-content: center;
    }
    
    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .about-section {
        margin: 2rem auto;
        padding: 0 1rem;
    }
    
    .about-content {
        padding: 1.5rem;
    }
    
    .about-content h2 {
        font-size: 1.5rem;
    }
    
    .about-content p {
        font-size: 0.9rem;
    }
    
    .feature-card {
        flex: 1 1 100%;
        padding: 1rem;
    }
    
    .feature-icon {
        width: 45px;
        height: 45px;
    }
    
    .feature-icon i,
    
    .feature-icon svg.icon {
        font-size: 1.1rem;
    }
    
    .team-container {
        flex-direction: column;
        align-items: center;
    }
    
    .team-member {
        max-width: 100%;
        width: 100%;
        padding: 1.5rem;
    }
    
    .member-image {
        width: 120px;
        height: 120px;
    }
    
    .member-info h3 {
        font-size: 1.1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-section h3::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-links a {
        justify-content: center;
    }
    
    .theme-switch-wrapper {
        margin-top: 0.5rem;
    }
    
    #theme-toggle-button {
        transform: scale(0.8);
    }
}

/* mobile 480px */
@media (max-width: 480px) {
    .about-content h2 {
        font-size: 1.3rem;
    }
    
    .about-content p {
        font-size: 0.85rem;
    }
    
    .member-image {
        width: 100px;
        height: 100px;
    }
    
    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        left: 15px;
    }
}

/* mobile 768px */
@media (max-width: 768px) and (orientation: landscape) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .theme-switch-wrapper {
        margin-top: 0;
    }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
/* responsive */
.about-content h2 { font-size: clamp(1.25rem, 5vw, 2rem); }
.feature-text h3 { font-size: clamp(0.92rem, 3.4vw, 1.1rem); }
.feature-text p { font-size: clamp(0.76rem, 3vw, 0.85rem); line-height: 1.95; }
.member-info h3 { font-size: clamp(1rem, 4vw, 1.3rem); }
.member-role { font-size: clamp(0.74rem, 3vw, 0.85rem); }
.member-desc { font-size: clamp(0.76rem, 3vw, 0.85rem); line-height: 1.95; }
.footer-section h3 { font-size: clamp(1rem, 4vw, 1.2rem); }
.footer-section p,
.footer-links a,
.footer-mail { font-size: clamp(0.76rem, 3vw, 0.85rem); }

.team-member,
.about-content,
.feature-card { min-width: 0; }

.feature-text { min-width: 0; }

/* narrow 992px */
@media (max-width: 992px) {
  .header-content {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    row-gap: 0.7rem;
  }

  .header-content .logo { margin-inline-end: auto; }
  .header-content .site-actions { margin-inline-start: auto; }
  .header-content nav { order: 3; flex-basis: 100%; }
}

/* mobile 768px */
@media (max-width: 768px) {
  header { padding: 0.75rem 0.9rem; }
  .header-content { gap: 0.55rem; }
  nav ul { gap: 0.4rem; justify-content: center; }

  nav a {
    padding: 0.34rem 0.7rem;
    font-size: 0.74rem;
    border-radius: 999px;
  }

  .about-section,
  .team-section { padding: 0 0.9rem; margin: 1.7rem auto; }
  .about-content { padding: 1.2rem; border-radius: 16px; }

  /* icon above text */
  .feature-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
    gap: 0.7rem;
    padding: 1.05rem;
  }

  .feature-icon { width: 44px; height: 44px; }
  /* basis is height in column flow */
  .team-container { flex-direction: column; align-items: stretch; }
  .team-member {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    padding: 1.3rem 1rem;
    border-radius: 16px;
  }
  .social-btn { flex: 1 1 auto; min-width: 120px; }
  .footer-content { gap: 1.3rem; }
}

/* mobile 420px */
@media (max-width: 420px) {
  .logo h1 { font-size: 1.05rem; }
  .logo-mark { width: 28px; height: 28px; }
  nav a { font-size: 0.7rem; padding: 0.3rem 0.6rem; }
  .member-image { width: 96px; height: 96px; }
  .social-links { flex-direction: column; }
  .social-btn { width: 100%; }
}
