
        :root {
            --primary: #12345b;
            --primary-light: #2563eb;
            --accent: #f28c28;
            --background: #f4f7fb;
            --text: #172033;
            --muted: #718096;
            --border: #e4eaf2;
            --white: #fff;
            --shadow: 0 12px 30px rgba(18, 52, 91, .08);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            direction: rtl;
            min-height: 100vh;
            background:
                radial-gradient(circle at 10% 10%, rgba(37, 99, 235, .08), transparent 300px),
                var(--background);
            color: var(--text);
            font-family: Vazirmatn, Tahoma, Arial, sans-serif;
            line-height: 1.8;
        }

        @font-face {
            font-family: 'Vazirmatn';
            src: url("{% static 'fonts/fonts/Vazirmatn-Regular.woff2' %}") format('woff2');
            font-weight: 400;
            font-style: normal;
            font-display: swap;
        }

        a {
            color: inherit;
            text-decoration: none;
        }

        /* ۱. نوار بالا: راست‌چین کامل عنوان و چپ‌چین کامل دکمه ورود */
        .topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            min-height: 66px;
            padding: 12px 24px;
            background: linear-gradient(110deg, #102746, #1f4b7a);
            color: #fff;
            box-shadow: 0 5px 20px rgba(18, 52, 91, .18);
        }

        .brand {
            font-size: 1rem;
            font-weight: 800;
        }

        .login-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 17px;
            border: 1px solid rgba(255,255,255,.25);
            border-radius: 12px;
            background: rgba(255,255,255,.12);
            color: #fff;
            transition: .25s ease;
        }

        .login-btn:hover {
            background: #fff;
            color: var(--primary);
            transform: translateY(-2px);
        }

        .tabs-bar {
            position: sticky;
            top: 0;
            z-index: 10;
            overflow-x: auto;
            background: rgba(255,255,255,.94);
            border-bottom: 1px solid var(--border);
            backdrop-filter: blur(12px);
            scrollbar-width: none;
        }

        .tabs-bar::-webkit-scrollbar {
            display: none;
        }

        .tabs-list {
            display: flex;
            justify-content: right;
            gap: 4px;
            width: max-content;
            min-width: 100%;
            padding: 0 16px;
            list-style: none;
        }

        .tabs-list a {
            display: block;
            padding: 14px 13px 12px;
            border-bottom: 3px solid transparent;
            color: var(--muted);
            font-size: .86rem;
            transition: .2s ease;
        }

        .tabs-list a:hover,
        .tabs-list a.active {
            border-bottom-color: var(--accent);
            color: var(--primary-light);
            font-weight: 800;
        }

        .container {
            position: relative;
            width: min(1180px, 100%);
            margin: auto;
            padding: 0 24px 100px;
        }

        .profile-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 28px;
            margin: 38px 0 30px;
            padding: 28px;
            border: 1px solid rgba(255,255,255,.8);
            border-radius: 24px;
            background: rgba(255,255,255,.78);
            box-shadow: var(--shadow);
        }

        .professor-info-block {
            display: flex;
            align-items: center;
            gap: 20px;
            min-width: 0;
        }

        .profile-img-container {
            flex-shrink: 0;
            padding: 7px;
            border-radius: 22px;
            background: linear-gradient(145deg, var(--primary-light), #0f766e);
            box-shadow: 0 12px 25px rgba(37,99,235,.2);
        }

        .profile-img {
            display: block;
            width: 138px;
            height: 138px;
            border: 4px solid #fff;
            border-radius: 18px;
            object-fit: cover;
        }

        .role {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 9px;
            padding: 6px 14px;
            border-radius: 999px;
            background: #e9f1ff;
            color: var(--primary-light);
            font-size: .8rem;
            font-weight: 800;
        }

        .role::before {
            content: "\f4e1";
            font-family: bootstrap-icons;
        }

        .professor-details h1 {
            margin-bottom: 5px;
            color: var(--primary);
            font-size: clamp(1.4rem, 3vw, 1.9rem);
            font-weight: 900;
        }

        .dept {
            color: var(--muted);
            font-size: .9rem;
        }

        .update-date {
            flex-shrink: 0;
            color: var(--muted);
            font-size: .84rem;
        }

        .update-date span {
            display: block;
            margin-top: 3px;
            color: var(--primary);
            font-weight: 800;
        }

        .content-grid {
            display: grid;
            grid-template-columns: 330px minmax(0, 1fr);
            gap: 24px;
            align-items: start;
        }

        .card,
        .nav-card {
            border: 1px solid var(--border);
            border-radius: 20px;
            background: var(--white);
            box-shadow: var(--shadow);
        }

        .card {
            padding: 24px;
        }

        .card + .card {
            margin-top: 20px !important;
        }

        .card-title {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
            padding-bottom: 14px;
            border-bottom: 1px solid var(--border);
            color: var(--primary);
            font-size: 1.05rem;
            font-weight: 900;
        }

        .card-title::before {
            width: 5px;
            height: 25px;
            border-radius: 5px;
            background: linear-gradient(var(--primary-light), #0f766e);
            content: "";
        }

        .timeline {
            position: relative;
            padding-right: 24px;
            list-style: none;
        }

        .timeline::before {
            position: absolute;
            right: 5px;
            top: 7px;
            bottom: 7px;
            width: 2px;
            background: #dce5f1;
            content: "";
        }

        .timeline li {
            position: relative;
            padding-bottom: 24px;
        }

        .timeline li:last-child {
            padding-bottom: 0;
        }

        .timeline li::before {
            position: absolute;
            right: -24px;
            top: 6px;
            width: 12px;
            height: 12px;
            border: 3px solid #dce9ff;
            border-radius: 50%;
            background: var(--primary-light);
            content: "";
        }

        .degree {
            color: var(--primary);
            font-weight: 900;
        }

        .school {
            color: var(--muted);
            font-size: .84rem;
        }

        .years {
            margin-top: 4px;
            color: var(--accent);
            font-size: .78rem;
            font-weight: 800;
        }

        .contact-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 7px 0;
            color: var(--muted);
            font-size: .84rem;
            word-break: break-word;
        }

        .contact-item .icon {
            display: grid;
            width: 34px;
            height: 34px;
            flex-shrink: 0;
            place-items: center;
            border-radius: 10px;
            background: #edf4ff;
            color: var(--primary-light);
        }

        .nav-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px;
        }

        .nav-card {
            display: flex;
            align-items: center;
            gap: 15px;
            min-height: 105px;
            padding: 20px;
            transition: .25s ease;
        }

        .nav-card:hover {
            border-color: #a9c4ff;
            box-shadow: 0 16px 30px rgba(37,99,235,.13);
            transform: translateY(-5px);
        }

        .circle-icon {
            display: grid;
            width: 56px;
            height: 56px;
            flex-shrink: 0;
            place-items: center;
            border-radius: 17px;
            background: linear-gradient(145deg, #e8f0ff, #e5f7f4);
            color: var(--primary-light);
            font-size: 1.45rem;
        }

        .label {
            color: var(--primary);
            font-size: .94rem;
            font-weight: 800;
        }

        /* ۲. دکمه‌های شناور دسکتاپ: مقید به لبه چپ کادر کانتنت */
        .floating-actions {
            position: fixed;
            left: calc((100vw - 1180px) / 2 - 96px);
            top: 50%;
            z-index: 20;
            display: flex;
            flex-direction: column;
            gap: 12px;
            transform: translateY(-50%);
        }

        @media (max-width: 1400px) {
            .floating-actions {
                left: 12px;
            }
        }

        .floating-actions a {
            display: flex;
            width: 80px;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            padding: 13px 6px;
            border-radius: 15px;
            background: var(--primary);
            color: #fff;
            font-size: .7rem;
            text-align: center;
            box-shadow: 0 10px 22px rgba(18,52,91,.25);
            transition: .25s ease;
        }

        .floating-actions a:hover {
            background: var(--accent);
            transform: translateX(4px);
        }

        .floating-actions .icon {
            font-size: 1.25rem;
            line-height: 1;
        }

        /* اصلاح کامل حالت موبایل (عیناً بدون هیچ تغییری) */
        @media (max-width: 768px) {

            html,
            body {
                width: 100%;
                overflow-x: hidden;
            }

            .topbar {
                display: flex;
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
                padding: 14px 16px;
                text-align: center;
            }

            .topbar .brand {
                font-size: .88rem;
                line-height: 1.8;
            }

            .topbar .login-btn {
                justify-content: center;
                width: 100%;
            }

            .tabs-bar {
                position: static;
                overflow: visible;
                padding: 12px;
                background: transparent;
                border: 0;
            }

            .tabs-list {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                width: 100% !important;
                min-width: 100% !important;
                gap: 9px;
                padding: 0;
            }

            .tabs-list li {
                width: 100%;
            }

            .tabs-list li a {
                display: flex;
                align-items: center;
                justify-content: center;
                min-height: 48px;
                width: 100%;
                padding: 9px 6px;
                border: 1px solid var(--border);
                border-radius: 12px;
                background: #fff;
                color: var(--primary);
                font-size: .78rem;
                font-weight: 600;
                line-height: 1.6;
                text-align: center;
                white-space: normal;
                box-shadow: 0 4px 12px rgba(18, 52, 91, .05);
                transition: .25s ease;
            }

            .tabs-list li a:hover,
            .tabs-list li a.active {
                border-color: var(--accent);
                background: linear-gradient(135deg, #fff8ef, #fff);
                color: var(--primary-light);
                box-shadow: 0 7px 16px rgba(242, 140, 40, .14);
                transform: translateY(-2px);
            }

            .container {
                width: 100%;
                max-width: 100%;
                padding: 0 14px 115px;
            }

            .profile-header {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 20px;
                margin: 22px 0;
                padding: 24px 16px;
                text-align: center;
            }

            .professor-info-block {
                display: flex;
                width: 100%;
                flex-direction: column;
                gap: 14px;
            }

            .profile-img-container {
                padding: 6px;
            }

            .profile-img {
                width: 125px;
                height: 125px;
            }

            .professor-details {
                width: 100%;
                text-align: center;
            }

            .professor-details h1 {
                font-size: 1.35rem;
                line-height: 1.8;
            }

            .dept {
                font-size: .78rem;
                line-height: 2;
            }

            .update-date {
                width: 100%;
                padding-top: 14px;
                border-top: 1px solid var(--border);
                text-align: center;
                font-size: .78rem;
            }

            .update-date span {
                display: inline;
                margin-right: 5px;
            }

            .content-grid {
                display: flex;
                width: 100%;
                flex-direction: column;
                gap: 18px;
            }

            .left-col,
            .right-col {
                width: 100%;
                min-width: 0;
            }

            .card {
                width: 100%;
                padding: 19px 16px;
                border-radius: 17px;
            }

            .card-title {
                font-size: 1rem;
            }

            .school {
                font-size: .78rem;
                line-height: 2;
            }

            .nav-grid {
                display: grid;
                grid-template-columns: 1fr;
                width: 100%;
                gap: 12px;
            }

            .nav-card {
                width: 100%;
                min-height: 82px;
                padding: 15px;
                border-radius: 16px;
            }

            .nav-card .circle-icon {
                width: 47px;
                height: 47px;
                border-radius: 14px;
                font-size: 1.2rem;
            }

            .nav-card .label {
                font-size: .86rem;
            }

            .floating-actions {
                position: fixed;
                right: 12px;
                bottom: 12px;
                left: 12px;
                top: auto;
                display: flex;
                flex-direction: row;
                gap: 8px;
                transform: none;
            }

            .floating-actions a {
                display: flex;
                width: auto;
                min-height: 48px;
                flex: 1;
                flex-direction: row;
                justify-content: center;
                gap: 7px;
                padding: 10px 8px;
                border-radius: 13px;
                font-size: .72rem;
            }
        }

        @media (max-width: 380px) {
            .topbar .brand {
                font-size: .78rem;
            }

            .profile-img {
                width: 108px;
                height: 108px;
            }

            .professor-details h1 {
                font-size: 1.18rem;
            }

            .nav-card .label {
                font-size: .8rem;
            }

            .floating-actions a {
                font-size: .65rem;
            }
        }

        @media (min-width: 540px) and (max-width: 768px) {
            .tabs-list {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }
