:root {
    --primary: #0f2c59;
    --primary-dark: #0a1e3f;
    --primary-light: #1e4b8a;
    --accent: #c59b27;
    --accent-light: #fdf8e9;
    --accent-border: #f2dc9b;
    --bg-page: #f4f6fa;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(15, 44, 89, 0.05);
    --shadow-md: 0 6px 18px rgba(15, 44, 89, 0.07);
    --shadow-lg: 0 12px 30px rgba(15, 44, 89, 0.12);
    --radius-md: 14px;
    --radius-lg: 20px;
}

@font-face {
    font-family: 'Estedad';
    src: url('../../font/Estedad-Medium.woff2?v=2.0') format('woff2'),
         url('../../font/Estedad-Medium.woff?v=2.0') format('woff'),
         url('../../font/Estedad-Medium.ttf?v=2.0') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}


*,
*::before,
*::after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    direction: rtl;
    font-size: 16px;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Estedad', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    min-height: 100vh;
    min-height: 100dvh;

    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;

    overflow-x: hidden;
    width: 100%;
}

input,
button,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

.top-navbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #ffffff;
    padding: 4px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.university-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uni-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
        margin-top: -5px;
    justify-content: center;
    flex-shrink: 0;
}

.uni-titles h1 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
        padding-top: 15px;
}

.uni-titles p {
    font-size: 0.78rem;
    color: #cbd5e1;
    padding-top: 5px;
}

.badge-academic {
    background: rgba(197, 155, 39, 0.2);
    color: #fbd366;
    border: 1px solid rgba(197, 155, 39, 0.4);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.main-container {
    max-width: 1200px;
    width: 100%;
    margin: 28px auto;
    padding: 0 20px;
    flex: 1;
}

.profile-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
}

    .thesis-student-email-box {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto;          
      gap: 6px;
      font-size: 0.75rem;
      color: #64748b;
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      padding: 5px 12px;
      border-radius: 8px;
      width: fit-content;
      max-width: 100%;
    }

.avatar-box {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--accent);
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-text h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.profile-text .rank-tag {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary-light);
    font-size: 0.82rem;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-text p {
    color: var(--text-muted);
    font-size:13px;
    max-width: 600px;
    margin-bottom: 12px;
}

.profile-quick-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.quick-link-chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.quick-link-chip svg {
    color: var(--accent);
    flex-shrink: 0;
}

.quick-link-chip:hover svg {
    color: #fbd366;
}

.bento-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 220px;
}

.bento-pill {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bento-pill-icon {
    color: var(--accent);
    display: flex;
    flex-shrink: 0;
}

.bento-pill-content h4 {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.bento-pill-content span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-all;
}

.tabs-header {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 4px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.tabs-header::-webkit-scrollbar {
    height: 3px;
}

.tabs-header::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    position: relative;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.course-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 22px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.course-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.course-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.4;
}

.course-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.badge-unit {
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.course-meta-list {
    list-style: none;
    margin-bottom: 18px;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-meta-item {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    gap: 8px;
}

.course-meta-item svg {
    color: var(--primary-light);
    flex-shrink: 0;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    width: 100%;
}

.btn-pamphlet, .btn-group {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 42px;
}

.btn-pamphlet {
    background: var(--accent-light);
    color: #8c6b12;
    border: 1px solid var(--accent-border);
}

.btn-pamphlet:hover {
    background: #faeed0;
}

.btn-group {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
}

.btn-group:hover {
    background: var(--primary-light);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.video-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.video-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: #0b1a30;
    overflow: hidden;
}

.video-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover .video-thumbnail-wrapper img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 44, 89, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.video-card:hover .play-overlay {
    background: rgba(15, 44, 89, 0.25);
    opacity: 1;
}

.play-circle {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.video-card:hover .play-circle {
    transform: scale(1.1);
}

.video-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(10, 30, 63, 0.85);
    color: #fbd366;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.video-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.video-session-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.video-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 14px;
    flex: 1;
}

.btn-aparat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ed145b;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn-aparat:hover {
    background: #c70d4a;
}

.cv-hero-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 24px;
}

.cv-photo-frame {
    width: 170px;
    height: 210px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 3px solid #fff;
    outline: 2px solid var(--accent);
    background: #e2e8f0;
}

.cv-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-details h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.cv-subtitle {
    font-size: 0.92rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 12px;
}

.cv-bio {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 18px;
    text-align: justify;
}

.cv-social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cv-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f1f5f9;
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cv-link-badge:hover {
    background: var(--primary);
    color: #fff;
}

.cv-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border-right: 4px solid var(--primary);
}

.metric-card.gold-border {
    border-right-color: var(--accent);
}

.metric-icon-wrap {
    width: 48px;
    height: 48px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.metric-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.metric-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cv-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.cv-box {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.cv-box-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    di1splay: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

.cv-box-title svg {
    color: var(--accent);
}

.research-fields-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-date.text-dark {
    color: #212529 !important;
}


.field-chip {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.course-teaching-list {
    list-style: none;
    margin: 0;
    padding: 0 !important;
    padding-inline-start: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.course-teaching-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.84rem;
}

.course-teaching-item span {
    font-weight: 600;
    color: var(--primary);
}

.course-teaching-item .course-level {
    font-size: 0.72rem;
    background: #eff6ff;
    color: var(--primary-light);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.timeline-list {
    list-style: none;
    position: relative;
    padding-right: 16px;
}

.timeline-list::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    right: 0;
    width: 2px;
    background: #cbd5e1;
}

.timeline-item {
    position: relative;
    margin-bottom: 18px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 4px;
    right: -21px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
}

.timeline-date {
    font-size: 0.72rem;
      color: var(--text-main);
   
    font-weight: 700;
}

.timeline-title {
    font-size: 0.85rem;
    font-weight: 700;
   color: var(--accent);
}

.timeline-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.portal-footer {
    background-color: #0b1a30;
    color: #94a3b8;
    margin-top: auto;
    border-top: 3px solid var(--accent);
    font-size: 0.85rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 24px 20px;
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.5fr;
    gap: 36px;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 14px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 2px;
    background: var(--accent);
}

.footer-col p {
    font-size: 0.82rem;
    line-height: 2.5;
    color: #cbd5e1;
    text-align: justify;
}

.footer-links {
    list-style: none;
    display: contents;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    background-color: #071120;
    padding: 16px 20px;
    text-align: center;
    line-height: 2.3;
    font-size: 0.78rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}


@media (max-width: 992px) {
    .profile-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    .avatar-box {
        margin: 0 auto;
    }
    .profile-text p {
        margin: 0 auto 14px auto;
    }
    .profile-quick-links {
        justify-content: center;
    }
    .bento-stats {
        width: 100%;
        flex-direction: row;
    }
    .bento-pill {
        flex: 1;
        justify-content: center;
        text-align: right;
    }
    .cv-sections-grid {
        grid-template-columns: 1fr;
    }
    .cv-box[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .main-container {
        padding: 0 14px;
        margin: 18px auto;
    }
    .profile-card {
        padding: 20px 16px;
    }
    .bento-stats {
        flex-direction: column;
    }
    .courses-grid {
        grid-template-columns: 1fr;
    }
    .videos-grid {
        grid-template-columns: 1fr;
    }
    .card-actions {
        flex-direction: column;
    }
    .btn-pamphlet, .btn-group {
        width: 100%;
    }
    .cv-hero-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 20px 16px;
    }
    .cv-photo-frame {
        margin: 0 auto;
    }
    .cv-social-links {
        justify-content: center;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 30px 16px 20px 16px;
    }
    .top-navbar {
        padding: 1px 12px;
    }
   

}

@media (max-width: 480px) {
    *,
    *::before,
    *::after,
    html,
    body,
    h1, h2, h3, h4, p, span, a, button, input, select, textarea {
        font-family: 'Estedad', sans-serif !important;
    }
     .avatar-box {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--accent);
    overflow: hidden;
    flex-shrink: 0;
}
    .badge-academic {
        display: none !important;
    }
    .uni-titles h1 {
        font-size: 12px;
        font-weight: 300;
        margin-bottom: 2px;
        font-family: 'Estedad' !important;
    }
    .top-navbar-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .badge-academic {
        align-self: flex-start;
        font-size: 0.72rem;
    }
    .profile-text h2 {
        font-size: 1.25rem;
    }
    .profile-quick-links {
        flex-direction: column;
        width: 100%;
    }
    .quick-link-chip {
        width: 100%;
        justify-content: center;
    }
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

.course-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap; 
}

.course-header .course-title {
  margin: 0;
  font-size: 12px;
  font-weight: 300;
  color: #0f2553;
  flex: 1;
  min-width: 0; 
}

.course-header .course-units {
  white-space: nowrap;
  flex-shrink: 0;    
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}

    

.profile-card-header {
  background: #ffffff;
  border-radius: 24px;
  padding: 30px 
    
    
}


.thesis-footer-top .badge {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
  color: #1e40af !important;
  border: 1px solid #bfdbfe !important;
  padding: 6px 14px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.thesis-footer-top .badge.defended, 
.thesis-footer-top .badge:not(.in-progress) {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7) !important;
  color: #166534 !important;
  border-color: #bbf7d0 !important;
}