/* ========================================
   Faculty Profile — Design System
   ======================================== */

:root {
    /* رنگ‌ها */
    --navy:        #0f2b46;
    --navy-light:  #173d5e;
    --teal:        #0d7377;
    --teal-light:  #14919b;
    --accent:      #e8a838;
    --accent-soft: #fdf0d5;
    --white:       #ffffff;
    --gray-50:     #f8fafc;
    --gray-100:    #f1f5f9;
    --gray-200:    #e2e8f0;
    --gray-300:    #cbd5e1;
    --gray-400:    #94a3b8;
    --gray-500:    #64748b;
    --gray-600:    #475569;
    --gray-700:    #334155;
    --gray-800:    #1e293b;
    --text:        #1e293b;
    --text-muted:  #64748b;
    --shadow-sm:   0 1px 2px rgba(0,0,0,.05);
    --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:   0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
    --shadow-lg:   0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
    --radius:      10px;
    --radius-sm:   6px;
    --radius-lg:   14px;
    --transition:  .2s ease;
    --font:        'Vazirmatn', Tahoma, Arial, sans-serif;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
    font-family: var(--font);
    direction: rtl;
    color: var(--text);
    background: var(--gray-50);
    line-height: 1.8;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-light); }

img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   University Header — matches fah-header from faculty listing
   ======================================== */
.fah-header {
    font-family: var(--font);
    direction: rtl;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #063a52 0%, #0a5a7a 50%, #084562 100%);
    backdrop-filter: blur(12px);
    transition: box-shadow .3s;
}
.fah-header * { box-sizing: border-box; margin: 0; padding: 0; }
.fah-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.35); }

.fah-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
}

.fah-right { display: flex; align-items: center; gap: 14px; }

.fah-back {
    color: rgba(255,255,255,.45);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color .2s;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,.15);
    padding: 5px 14px;
    border-radius: 8px;
}
.fah-back:hover { color: #f0d080; border-color: rgba(212,168,67,.4); }

.fah-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}
.fah-brand-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #d4a843, #e6c86a);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 12px rgba(212,168,67,.35);
}
.fah-brand-icon svg { width: 20px; height: 20px; color: #1a5276; }
.fah-brand-text strong { color: #fff; font-size: 15px; font-weight: 800; white-space: nowrap; display: block; line-height: 1.3; }
.fah-brand-text small { color: rgba(255,255,255,.5); font-size: 10px; font-weight: 400; display: block; margin-top: -1px; letter-spacing: .3px; }

.fah-nav { display: flex; align-items: center; gap: 4px; }
.fah-nav > a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    transition: .2s;
    cursor: pointer;
    white-space: nowrap;
}
.fah-nav > a:hover { background: rgba(255,255,255,.12); color: #fff; }
.fah-nav > a.active { background: rgba(212,168,67,.2); color: #f0d080; font-weight: 700; }

.fah-burger {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    border-radius: 8px;
    width: 38px; height: 36px;
    font-size: 16px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: .2s;
}
.fah-burger:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }

@media (max-width: 768px) {
    .fah-back { display: none; }
    .fah-burger { display: flex; }
    .fah-nav {
        display: none;
        position: absolute;
        top: 54px; right: 0; left: 0;
        background: #063a52;
        flex-direction: column;
        padding: 10px;
        gap: 2px;
        z-index: 999;
    }
    .fah-nav.open { display: flex; }
    .fah-nav > a { padding: 10px 16px; width: 100%; }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #063a52 0%, #0a5a7a 60%, #084562 100%);
    padding: 48px 0 56px;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(13,115,119,.25) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(232,168,56,.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero__photo-wrap {
    flex-shrink: 0;
    position: relative;
}

.hero__photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.15);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.hero__rank-badge {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--navy);
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.hero__info { color: var(--white); flex: 1; }

.hero__name {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.4;
}

.hero__title {
    font-size: 1rem;
    opacity: .8;
    margin-bottom: 14px;
    font-weight: 400;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
    font-size: .85rem;
    opacity: .7;
}

.hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero__meta i { font-size: .8rem; }

.hero__email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.1);
    padding: 8px 18px;
    border-radius: 8px;
    color: var(--white);
    font-size: .85rem;
    transition: background var(--transition);
    margin-bottom: 14px;
}

.hero__email:hover {
    background: rgba(255,255,255,.18);
    color: var(--white);
}

.hero__social {
    display: flex;
    gap: 10px;
}

.hero__social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: .9rem;
    transition: background var(--transition);
}

.hero__social a:hover {
    background: var(--teal);
    color: var(--white);
}

/* ========================================
   Sticky Section Nav
   ======================================== */
.sticky-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 54px;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

.sticky-nav__inner {
    display: flex;
    align-items: center;
}

.sticky-nav__scroll-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    position: relative;
}

.sticky-nav__arrow {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: .75rem;
    padding: 6px 8px;
    cursor: pointer;
    transition: color var(--transition);
    display: flex;
    align-items: center;
}

.sticky-nav__arrow:hover { color: var(--navy); }
.sticky-nav__arrow.hidden { visibility: hidden; }

.sticky-nav__toggle {
    display: none;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: .85rem;
    font-weight: 600;
    color: var(--navy);
    padding: 14px 0;
    cursor: pointer;
}

.sticky-nav__list {
    list-style: none;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 6px 0;
}

.sticky-nav__list::-webkit-scrollbar { display: none; }

.sticky-nav__list li a {
    display: block;
    padding: 8px 16px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--gray-500);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
}

.sticky-nav__list li a:hover {
    color: var(--navy);
    background: var(--gray-100);
}

    .sticky-nav__list li a.active {
        color: var(--teal);
        background: rgba(13,115,119,.06);
        border-bottom-color: var(--teal);
        font-weight: 600;
    }

/* ========================================
   Main Layout
   ======================================== */
.main-content {
    padding: 32px 0 60px;
}

.main-content__layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    align-items: start;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.sidebar-card__title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card__title i {
    color: var(--teal);
    font-size: .85rem;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-item {
    text-align: center;
    padding: 14px 8px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    transition: border-color var(--transition);
}

.stat-item:hover { border-color: var(--teal); }

.stat-item__number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
}

.stat-item__label {
    display: block;
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

/* --- Index Circles --- */
.indexes-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.index-circle {
    text-align: center;
    width: 80px;
}

.index-circle__ring {
    position: relative;
    width: 68px;
    height: 68px;
    margin: 0 auto 6px;
}

.index-circle__ring svg {
    transform: rotate(-90deg);
    width: 68px;
    height: 68px;
}

.index-circle__ring circle {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
}

.index-circle__ring .track { stroke: var(--gray-200); }

.index-circle__ring .fill {
    stroke: var(--teal);
    transition: stroke-dashoffset 1s ease;
}

.index-circle__value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
}

.index-circle__label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* --- Contact List --- */
.contact-list { display: flex; flex-direction: column; gap: 10px; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .82rem;
    color: var(--gray-600);
    padding: 8px 10px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-100);
}

.contact-item i {
    color: var(--teal);
    width: 18px;
    text-align: center;
    font-size: .8rem;
    flex-shrink: 0;
}

.contact-item a { color: var(--gray-600); }
.contact-item a:hover { color: var(--teal); }

/* ========================================
   Content Sections — Collapsible Cards
   ======================================== */
.content-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.section-card:hover { box-shadow: var(--shadow-md); }

.section-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    background: var(--white);
    transition: background var(--transition);
}

.section-card__header:hover { background: var(--gray-50); }

.section-card__header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(13,115,119,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: .9rem;
    flex-shrink: 0;
}

.section-card__title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--navy);
}

.section-card__toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: .7rem;
    transition: all var(--transition);
    flex-shrink: 0;
}

.section-card.is-open .section-card__toggle {
    background: var(--teal);
    color: var(--white);
    transform: rotate(180deg);
}

.section-card__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}

.section-card.is-open .section-card__body {
    max-height: 3000px;
}

.section-card__content {
    padding: 0 20px 20px;
    border-top: 1px solid var(--gray-100);
}

.section-card__content > *:first-child { margin-top: 16px; }

/* ========================================
   Publication Cards
   ======================================== */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pub-card {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    transition: border-color var(--transition);
}

.pub-card:hover { border-color: var(--teal); }

.pub-card__year {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
}

.pub-card__body { flex: 1; min-width: 0; }

.pub-card__title {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.5;
}

.pub-card__journal {
    font-size: .8rem;
    color: var(--teal);
    font-weight: 500;
    margin-bottom: 4px;
}

.pub-card__authors {
    font-size: .75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.5;
}

.pub-card__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--teal);
}

.pub-card__link i { font-size: .65rem; }

/* --- General List --- */
.gen-list { list-style: none; }

.gen-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: .88rem;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.gen-list li:last-child { border-bottom: none; }

.gen-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    flex-shrink: 0;
    margin-top: 9px;
}

/* --- Prose Text --- */
.prose { font-size: .9rem; line-height: 1.9; color: var(--gray-700); }

/* --- Table --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.data-table th {
    background: var(--gray-100);
    color: var(--navy);
    font-weight: 600;
    padding: 10px 14px;
    text-align: right;
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}

.data-table tr:hover td { background: var(--gray-50); }

/* ========================================
   Footer
   ======================================== */
.uni-footer {
    background: var(--navy);
    color: var(--white);
    padding: 32px 0;
}

.uni-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.uni-footer__info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uni-footer__info i { font-size: 1.6rem; opacity: .7; }

.uni-footer__name {
    display: block;
    font-weight: 700;
    font-size: .9rem;
}

.uni-footer__addr {
    display: block;
    font-size: .78rem;
    opacity: .55;
}

.uni-footer__links {
    display: flex;
    gap: 24px;
}

.uni-footer__links a {
    color: rgba(255,255,255,.7);
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.uni-footer__links a:hover { color: var(--white); }

.uni-footer__copy {
    width: 100%;
    text-align: center;
    font-size: .75rem;
    opacity: .4;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 8px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
    .main-content__layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    #contact-card { grid-column: 1 / -1; }

    .hero__inner {
        flex-direction: column;
        text-align: center;
    }

    .hero__meta { justify-content: center; }
    .hero__email { margin-left: auto; margin-right: auto; }
    .hero__social { justify-content: center; }

    .uni-header__nav { display: none; }

    .sticky-nav__toggle { display: flex; align-items: center; gap: 6px; }

    .sticky-nav__list {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        flex-direction: column;
        padding: 8px;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius) var(--radius);
        z-index: 80;
    }

    .sticky-nav.is-open .sticky-nav__list { display: flex; }

    .sticky-nav__list li a {
        padding: 10px 14px;
    }
}

@media (max-width: 600px) {
    .hero { padding: 32px 0 40px; }
    .hero__photo { width: 120px; height: 120px; }
    .hero__name { font-size: 1.35rem; }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .stats-grid { grid-template-columns: 1fr 1fr; }

    .pub-card { flex-direction: column; }
    .pub-card__year { width: 100%; height: auto; padding: 6px; border-radius: var(--radius-sm); }

    .uni-footer__inner { flex-direction: column; text-align: center; }
    .uni-footer__info { flex-direction: column; text-align: center; }
    .uni-footer__links { flex-direction: column; align-items: center; gap: 10px; }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.section-card {
    animation: fadeInUp .4s ease both;
}

.section-card:nth-child(2) { animation-delay: .05s; }
.section-card:nth-child(3) { animation-delay: .1s; }
.section-card:nth-child(4) { animation-delay: .15s; }
.section-card:nth-child(5) { animation-delay: .2s; }
.section-card:nth-child(6) { animation-delay: .25s; }
.section-card:nth-child(7) { animation-delay: .3s; }
.section-card:nth-child(8) { animation-delay: .35s; }
