/* ===== CSS VARIABLES ===== */
:root {
    --ieee-blue: #0066cc;
    --ieee-dark-blue: #003d7a;
    --ieee-light-blue: #4d9fff;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
    --text-dark: #212529;
    --text-light: #6c757d;
    --border-light: #dee2e6;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 10px 30px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, var(--ieee-blue), var(--ieee-dark-blue));
    --gradient-light: linear-gradient(135deg, var(--ieee-light-blue), var(--ieee-blue));
    --gradient-overlay: linear-gradient(135deg, rgba(0, 102, 204, 0.9), rgba(0, 61, 122, 0.9));
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===== UTILITY CLASSES ===== */
.section-padding {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
}

/* ===== NAVIGATION ===== */
.navbar {
    background: var(--gradient-primary);
    padding: 15px 0;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--gradient-primary);
    background: rgba(0, 102, 204, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--white) !important;
}

.brand-text {
    display: inline-block;
}

@media (max-width: 576px) {
    .brand-text {
        font-size: 0.9rem;
    }
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--ieee-light-blue) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--ieee-light-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 60vh;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff08" points="0,0 1000,300 1000,1000 0,1000"/><polygon fill="%23ffffff05" points="0,400 1000,0 1000,600 0,800"/></svg>') no-repeat center center;
    background-size: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: var(--white);
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
}

/* ===== TEAM SECTION ===== */
.team-container {
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.team-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    text-align: center;
    color: var(--text-dark);
}

.team-title::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--ieee-blue), var(--ieee-dark-blue));
    border-radius: 2px;
}

/* Team Grid*/
.team-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    justify-items: center;
    margin-bottom: 3rem;
}

/* Team Member Cards */
.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 300px;
    background: var(--white);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(255, 152, 0, 0.1);
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
    border-color: var(--ieee-light-blue);
}
.ieee-main-logo {
    max-width: 180px;
    height: auto;
}
/* Member Photo */
.member-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 4px solid var(--ieee-light-blue);
    position: relative;
    transition: var(--transition);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.member-photo:hover {
    transform: scale(1.05);
}

.member-photo:hover img {
    transform: scale(1.1);
}

/* Member Role Badge */
.member-role {
    background: linear-gradient(135deg, var(--ieee-blue), var(--ieee-light-blue));
    color: var(--white);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
    white-space: nowrap;
    z-index: 2;
}

/*  Member Name */
.member-name {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

/*  Social Links */
.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: auto;
}

.social-links a {
    color: var(--text-light);
    text-decoration: none;
    background-color: var(--light-gray);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.social-links a:hover {
    background-color: var(--ieee-blue);
    color: var(--white);
    transform: translateY(-2px);
    border-color: var(--ieee-dark-blue);
    box-shadow: var(--shadow-light);
}

/* Leadership Section Specific Styles */
.leadership-section {
    margin-bottom: 4rem;
}

.leadership-member {
    max-width: 350px;
}

.leadership-member .member-photo {
    width: 200px;
    height: 200px;
}

.leadership-member .member-name {
    font-size: 1.4rem;
}


/* ===== FOOTER ===== */
.footer {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--white);
    color: var(--ieee-blue);
    transform: translateY(-3px);
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.2);
}

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

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

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.8s ease forwards;
}

.fade-up {
    opacity: 0;
    transform: translateY(50px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* Intersection Observer Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large devices (desktops, 1200px and up) */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .tier-title {
        font-size: 1.8rem;
    }
    
    .member-image {
        height: 250px;
    }
    
    .chairperson-card .member-image {
        height: 280px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 992px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .member-image {
        height: 220px;
    }
    
    .chairperson-card .member-image {
        height: 250px;
    }
    
    .team-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        padding: 100px 0 50px;
    }
    
    .tier-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }
    
    .member-image {
        height: 200px;
    }
    
    .chairperson-card .member-image {
        height: 220px;
    }
    
    .member-info {
        padding: 1rem;
    }
    
    .chairperson-card .member-info {
        padding: 1.5rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .chairperson-card .social-link {
        width: 40px;
        height: 40px;
    }
    
    .leadership-tier,
    .technical-tier,
    .senior-tier,
    .junior-tier {
        padding: 1.5rem 0;
        margin-bottom: 2rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 576px) {
    .section-padding {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .tier-title {
        font-size: 1.4rem;
    }
    
    .member-image {
        height: 180px;
    }
    
    .chairperson-card .member-image {
        height: 200px;
    }
    
    .member-name {
        font-size: 1.1rem;
    }
    
    .chairperson-card .member-name {
        font-size: 1.2rem;
    }
    
    .role-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .chairperson-badge {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .member-description {
        font-size: 0.85rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* ===== SPECIAL EFFECTS ===== */

/* Floating animation for chairperson card */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.chairperson-card {
    animation: float 6s ease-in-out infinite;
}

/* Pulse effect for role badges */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 102, 204, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 102, 204, 0); }
}

.role-badge {
    animation: pulse 3s infinite;
}

/* Gradient text effect for tier titles */
.tier-title {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .chairperson-card {
        animation: none;
    }
    
    .role-badge {
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
.team-card:focus,
.social-link:focus {
    outline: 2px solid var(--ieee-light-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-section::before {
        opacity: 0.3;
    }
    
    .role-badge {
        border: 1px solid var(--white);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .hero-section,
    .footer,
    .cta-section {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .section-padding {
        padding: 20px 0;
    }
    
    .team-card {
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .member-image {
        height: auto;
    }
    
    .role-badge {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
        color: #000;
        background: #f0f0f0 !important;
    }
}