/* ===================================
   CSS Variables & Base Setup
   =================================== */
:root {
    --color-primary: dodgerblue;
    --color-dark: #303030;
    --color-white: #ffffff;
    --color-light: whitesmoke;
    --color-accent: #45eec2;
    
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-white);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===================================
   Header & Navigation
   =================================== */
#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(48, 48, 48, 0.08);
}

#logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(270deg, var(--color-accent), var(--color-primary));
    background-size: 400% 400%;
    animation: gradientShift 30s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#logo-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

#logo-container h1 {
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

#menu-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-toggle {
    display: none;
}

.menu-item {
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    background-color: var(--color-light);
    color: var(--color-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.menu-item:hover {
    background-color: var(--color-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   Team Section
   =================================== */
#teams {
    padding: 80px 48px;
    background: linear-gradient(135deg, #f8f9fa 0%, var(--color-light) 100%);
    min-height: 60vh;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.25rem;
    color: rgba(48, 48, 48, 0.6);
}

#team-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 32px;
}

/* ===================================
   Team Member Card
   =================================== */
.team-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.team-card.expanded {
    grid-column: 1 / -1;
    cursor: default;
}

.team-card.expanded:hover {
    transform: none;
}

.card-collapsed {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    gap: 24px;
}

.team-card.expanded .card-collapsed {
    display: none;
}

.team-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--color-white);
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: center;
    align-items: center;

}

.team-image img {
    width: auto;
    height: 90%;
    object-fit: cover;
}

.team-name {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-dark);
    text-align: center;
}

.team-role {
    font-size: 1rem;
    color: var(--color-primary);
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.credentials-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.credential-badge {
    padding: 6px 12px;
    background: var(--color-light);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-dark);
    transition: all var(--transition-base);
}

.credential-badge:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.expand-btn {
    margin-top: 16px;
    padding: 12px 32px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
}

.expand-btn:hover {
    background: var(--color-dark);
    transform: scale(1.05);
}

/* ===================================
   Expanded Card View
   =================================== */
.card-expanded {
    display: none;
    padding: 48px;
    animation: expandIn 0.4s ease forwards;
}

.team-card.expanded .card-expanded {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
}

@keyframes expandIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expanded-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.expanded-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.expanded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-light);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.contact-info-item i {
    color: var(--color-primary);
    width: 20px;
    text-align: center;
}

.expanded-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.expanded-header {
    border-bottom: 2px solid var(--color-light);
    padding-bottom: 24px;
}

.expanded-name {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.expanded-role {
    font-size: 1.25rem;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.credentials-full {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.credential-full {
    padding: 10px 18px;
    background: var(--color-light);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
    transition: all var(--transition-base);
}

.credential-full:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.bio-section {
    line-height: 1.8;
}

.bio-section h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-dark);
    margin-bottom: 16px;
}

.bio-section p {
    color: rgba(48, 48, 48, 0.8);
    font-size: 1rem;
    margin-bottom: 16px;
}

.close-btn {
    align-self: flex-start;
    padding: 12px 32px;
    background: var(--color-dark);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn:hover {
    background: var(--color-primary);
    transform: scale(1.05);
}

/* ===================================
   Info Sections
   =================================== */
.info-section {
    padding: 80px 48px;
    background: var(--color-white);
}

.info-section.alt {
    background: var(--color-light);
}

.info-section.contact {
    background: linear-gradient(135deg, var(--color-dark) 0%, #1a1a1a 100%);
    color: var(--color-white);
}

.info-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.info-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    font-size: 2rem;
    color: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.info-section.contact .info-icon {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
}

.info-container h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-dark);
}

.info-section.contact h2 {
    color: var(--color-white);
}

.info-container p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(48, 48, 48, 0.8);
}

.info-section.contact p {
    color: rgba(255, 255, 255, 0.9);
}

/* ===================================
   Contact Details
   =================================== */
.contact-details {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(8px);
}

.contact-item i {
    font-size: 1.25rem;
    color: var(--color-accent);
    width: 30px;
    text-align: center;
}

.contact-item span {
    font-size: 1rem;
    font-weight: 500;
}

/* ===================================
   Footer
   =================================== */
#footer {
    padding: 48px 32px;
    background: var(--color-dark);
    color: var(--color-white);
}

#socials {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.social-link {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: 1.25rem;
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--color-primary);
    transform: translateY(-4px) rotate(5deg);
    box-shadow: var(--shadow-md);
}

.footer-info {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 1200px) {
    #header {
        grid-template-columns: 1fr;
    }
    
    #menu-bar {
        justify-content: center;
    }
    
    #team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-card.expanded .card-expanded {
        grid-template-columns: 1fr;
    }
    
    .section-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .section-header h1 {
        font-size: 2rem;
    }
    
    .info-container h2 {
        font-size: 2rem;
    }
}

/* ===================================
   MOBILE STYLES
   =================================== */
body.mobile {
    font-size: 16px;
}

body.mobile #header {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 0;
    position: relative;
}

body.mobile #logo-container {
    padding: 8px 16px;
    gap: 12px;
}

body.mobile #logo-wrapper {
    width: 40px;
    height: 40px;
}

body.mobile #logo-container h1 {
    font-size: 1rem;
}

/* Hamburger Menu Button */
body.mobile .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: var(--color-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1001;
    transition: all var(--transition-base);
}

body.mobile .menu-toggle:hover {
    background: var(--color-primary);
}

body.mobile .menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: all var(--transition-base);
}

body.mobile .menu-toggle:hover span {
    background: var(--color-white);
}

body.mobile .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

body.mobile .menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

body.mobile .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

body.mobile #menu-bar {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    margin-top: 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

body.mobile #menu-bar.active {
    display: flex;
    max-height: 300px;
}

body.mobile .menu-item {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.9rem;
}

body.mobile #teams {
    padding: 40px 16px;
}

body.mobile .section-header h1 {
    font-size: 1.75rem;
}

body.mobile .section-header p {
    font-size: 1rem;
}

body.mobile #team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

body.mobile .team-card {
    border-radius: var(--radius-md);
}

body.mobile .card-collapsed {
    padding: 24px 16px;
    gap: 16px;
}

body.mobile .team-image {
    width: 120px;
    height: 120px;
}

body.mobile .team-name {
    font-size: 1.25rem;
}

body.mobile .team-role {
    font-size: 0.85rem;
}

body.mobile .credentials-preview {
    gap: 6px;
}

body.mobile .credential-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
}

body.mobile .expand-btn {
    padding: 10px 24px;
    font-size: 0.85rem;
}

body.mobile .card-expanded {
    padding: 24px 16px;
}

body.mobile .team-card.expanded .card-expanded {
    grid-template-columns: 1fr;
    gap: 24px;
}

body.mobile .expanded-image {
    width: 150px;
    height: 150px;
}

body.mobile .expanded-name {
    font-size: 1.75rem;
}

body.mobile .expanded-role {
    font-size: 1rem;
}

body.mobile .credential-full {
    font-size: 0.8rem;
    padding: 8px 14px;
}

body.mobile .bio-section h3 {
    font-size: 1.25rem;
}

body.mobile .bio-section p {
    font-size: 0.9rem;
}

body.mobile .close-btn {
    width: 100%;
    justify-content: center;
}

body.mobile .info-section {
    padding: 40px 16px;
}

body.mobile .info-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

body.mobile .info-container h2 {
    font-size: 1.75rem;
}

body.mobile .info-container p {
    font-size: 0.95rem;
}

body.mobile .contact-item {
    padding: 12px 16px;
    font-size: 0.9rem;
}

body.mobile #footer {
    padding: 32px 16px;
}

body.mobile .social-link {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

/* Mobile Portrait Mode */
body.mobile.portrait-mode #menu-bar {
    flex-direction: column;
}

body.mobile.portrait-mode .team-card.expanded .card-expanded {
    grid-template-columns: 1fr;
}

/* Mobile Landscape Mode */
body.mobile.landscape-mode #menu-bar {
    flex-direction: row;
    flex-wrap: wrap;
}

body.mobile.landscape-mode .menu-item {
    width: auto;
    flex: 1;
    min-width: 120px;
}

body.mobile.landscape-mode .team-card.expanded .card-expanded {
    grid-template-columns: 1fr;
}

/* ===================================
   TABLET STYLES
   =================================== */
body.tablet {
    font-size: 17px;
}

body.tablet #header {
    grid-template-columns: 1fr;
    padding: 20px 24px;
    gap: 20px;
}

body.tablet #logo-container {
    padding: 10px 20px;
    gap: 14px;
}

body.tablet #logo-wrapper {
    width: 48px;
    height: 48px;
}

body.tablet #logo-container h1 {
    font-size: 1.15rem;
}

body.tablet #menu-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

body.tablet .menu-item {
    padding: 12px 20px;
    font-size: 0.9rem;
}

body.tablet #teams {
    padding: 60px 32px;
}

body.tablet .section-header h1 {
    font-size: 2.5rem;
}

body.tablet .section-header p {
    font-size: 1.1rem;
}

body.tablet #team-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

body.tablet .card-collapsed {
    padding: 32px 24px;
}

body.tablet .team-image {
    width: 150px;
    height: 150px;
}

body.tablet .team-name {
    font-size: 1.5rem;
}

body.tablet .team-role {
    font-size: 0.95rem;
}

body.tablet .card-expanded {
    padding: 32px 24px;
}

body.tablet .team-card.expanded .card-expanded {
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

body.tablet .expanded-image {
    width: 200px;
    height: 200px;
}

body.tablet .expanded-name {
    font-size: 2rem;
}

body.tablet .expanded-role {
    font-size: 1.1rem;
}

body.tablet .bio-section h3 {
    font-size: 1.35rem;
}

body.tablet .info-section {
    padding: 60px 32px;
}

body.tablet .info-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
}

body.tablet .info-container h2 {
    font-size: 2.25rem;
}

body.tablet .info-container p {
    font-size: 1.05rem;
}

body.tablet #footer {
    padding: 40px 24px;
}

body.tablet .social-link {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
}

/* Tablet Portrait Mode */
body.tablet.portrait-mode #header {
    position: relative;
}

body.tablet.portrait-mode .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: var(--color-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 1001;
    transition: all var(--transition-base);
}

body.tablet.portrait-mode .menu-toggle:hover {
    background: var(--color-primary);
}

body.tablet.portrait-mode .menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: all var(--transition-base);
}

body.tablet.portrait-mode .menu-toggle:hover span {
    background: var(--color-white);
}

body.tablet.portrait-mode .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

body.tablet.portrait-mode .menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

body.tablet.portrait-mode .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

body.tablet.portrait-mode #menu-bar {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-top: 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

body.tablet.portrait-mode #menu-bar.active {
    display: flex;
    max-height: 350px;
}

body.tablet.portrait-mode #team-grid {
    grid-template-columns: 1fr;
}

body.tablet.portrait-mode .team-card.expanded .card-expanded {
    grid-template-columns: 1fr;
}

body.tablet.portrait-mode .expanded-sidebar {
    flex-direction: row;
    justify-content: center;
    gap: 32px;
}

body.tablet.portrait-mode .expanded-image {
    width: 180px;
    height: 180px;
}

/* Tablet Landscape Mode */
body.tablet.landscape-mode #team-grid {
    grid-template-columns: repeat(2, 1fr);
}

body.tablet.landscape-mode .team-card.expanded .card-expanded {
    grid-template-columns: 250px 1fr;
}