/* ==========================================================================
   FUHSI Staff Portal CSS Design System
   Colors: Deep Forest Green (#0F5132) & Institutional Gold (#D4AF37)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0F5132;
    --primary-light: #167046;
    --primary-dark: #0a3822;
    --secondary: #D4AF37;
    --secondary-light: #e0be53;
    --secondary-dark: #b89325;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── HEADER ──────────────────────────────────────────────── */
header {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 15px 0;
    border-bottom: 4px solid var(--secondary);
    box-shadow: var(--shadow);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--white);
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid var(--secondary);
}

.logo-text h1 {
    font-size: 24px;
    color: var(--white);
    line-height: 1;
}

.logo-text p {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ─── HERO SECTION ────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, rgba(15, 81, 50, 0.95) 0%, rgba(10, 56, 34, 0.9) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="%230F5132" width="100" height="100"/><circle cx="50" cy="50" r="40" fill="none" stroke="%23D4AF37" stroke-width="1" stroke-opacity="0.1"/></svg>');
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 36px;
    color: var(--white);
    margin-bottom: 10px;
}

.hero p {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto;
}

/* ─── FILTERS ─────────────────────────────────────────────── */
.search-filter-section {
    background-color: var(--white);
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-box-wrapper {
    max-width: 600px;
    margin: 0 auto 20px auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border-radius: 30px;
    border: 2px solid var(--border);
    font-size: 16px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 81, 50, 0.1);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 18px;
}

.letter-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.letter-btn {
    background-color: var(--light);
    border: 1px solid var(--border);
    color: var(--primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.letter-btn:hover, .letter-btn.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.letter-btn.all {
    width: 50px;
    border-radius: 16px;
}

/* ─── DIRECTORY GRID ──────────────────────────────────────── */
.directory-section {
    padding: 50px 0;
}

.dept-group {
    margin-bottom: 50px;
}

.dept-title {
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dept-count {
    font-size: 14px;
    background-color: rgba(15, 81, 50, 0.1);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.staff-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 20px;
    text-align: center;
    border-top: 4px solid var(--primary);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.staff-card:nth-child(even) {
    border-top-color: var(--secondary);
}

.staff-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--light);
    box-shadow: var(--shadow-sm);
}

.staff-card h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--dark);
}

.staff-position {
    font-size: 14px;
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 5px;
}

.staff-dept {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 15px;
}

.staff-email {
    font-size: 13px;
    color: var(--gray);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.staff-email:hover {
    color: var(--primary);
}

.view-profile-btn {
    margin-top: auto;
    background-color: var(--primary);
    color: var(--white);
    padding: 10px 22px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    display: inline-block;
}

.view-profile-btn:hover {
    background-color: var(--primary-light);
}

/* ─── PROFILE PAGE ────────────────────────────────────────── */
.profile-section {
    padding: 60px 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
}

.profile-left-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 25px;
    text-align: center;
    border-top: 4px solid var(--secondary);
    position: sticky;
    top: 130px;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid var(--light);
    box-shadow: var(--shadow);
}

.profile-meta-title {
    font-size: 22px;
    margin-bottom: 5px;
}

.profile-meta-position {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
}

.profile-meta-dept {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 25px;
}

.profile-contact-list {
    text-align: left;
    list-style: none;
    margin-bottom: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.profile-contact-list li {
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
}

.profile-contact-list li i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.profile-contact-list li a {
    color: var(--dark);
    text-decoration: none;
}

.profile-contact-list li a:hover {
    color: var(--primary);
}

.scholar-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.scholar-icon {
    width: 38px;
    height: 38px;
    background-color: var(--light);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 16px;
}

.scholar-icon:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: scale(1.1);
}

.download-cv-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--primary);
    color: var(--white);
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.download-cv-btn:hover {
    background-color: var(--primary-light);
}

.profile-right-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-block {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 35px;
}

.profile-block h3 {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-block h3 i {
    color: var(--secondary);
}

.profile-block p {
    color: var(--dark);
    font-size: 15px;
    line-height: 1.8;
}

.profile-block ul, .profile-block ol {
    padding-left: 20px;
    line-height: 1.8;
    font-size: 15px;
}

.profile-block li {
    margin-bottom: 8px;
}

.pub-list {
    list-style: none;
    padding: 0 !important;
}

.pub-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-details {
    flex: 1;
}

.pub-title {
    font-weight: 600;
    color: var(--dark);
    font-size: 15px;
    margin-bottom: 4px;
}

.pub-journal {
    font-size: 13px;
    color: var(--gray);
    font-style: italic;
}

.pub-download {
    background-color: var(--light);
    border: 1px solid var(--border);
    color: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.pub-download:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ─── FOOTER ──────────────────────────────────────────────── */
footer {
    background-color: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    text-align: center;
    border-top: 4px solid var(--secondary);
    font-size: 14px;
}

footer p {
    margin-bottom: 5px;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-left-card {
        position: static;
        margin-bottom: 30px;
    }
}

@media (max-width: 600px) {
    .hero h2 { font-size: 28px; }
    .logo-text p { display: none; }
    .staff-grid { grid-template-columns: 1fr; }
    .profile-block { padding: 25px; }
}
