/* Enhanced Team Section */
.about-team {
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
    padding: 4rem 0;
    perspective: 1000px;
}

.team-section {
    margin-bottom: 0; /* Remove since we are combining sections */
    transform-style: preserve-3d;
}

.team-section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.team-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FF0054, rgba(255, 0, 84, 0.2));
    border-radius: 2px;
}

/* Enhanced Grid Layout */
.team-grid {
    display: grid;
    gap: 2.5rem;
}

.hr-section {
    grid-template-columns: minmax(auto, 800px);
    justify-content: center;
}

.dev-section {
    grid-template-columns: repeat(3, 1fr);
}

/* Enhanced Card Design */
.team-member {
    opacity: 0;
    transform: translateY(30px) rotateX(10deg);
    animation: fadeInUp3D 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transform-style: preserve-3d;
}

/* Enhanced Member Content */
.member-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.member-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));
    transform: translateZ(-1px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.member-content:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        20px 20px 60px rgba(0, 0, 0, 0.05),
        -20px -20px 60px rgba(255, 255, 255, 0.8);
}

.member-content:hover::before {
    opacity: 1;
}

/* Enhanced Typography */
.member-name {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    transform: translateZ(10px);
}

.member-position {
    color: #FF0054;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: block;
    transform: translateZ(5px);
    letter-spacing: 0.02em;
}

/* Enhanced Animation */
@keyframes fadeInUp3D {
    from {
        opacity: 0;
        transform: translateY(30px) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Staggered Animations */
.hr-section .team-member {
    animation-delay: 0.2s;
}

.dev-section .team-member:nth-child(1) { animation-delay: 0.3s; }
.dev-section .team-member:nth-child(2) { animation-delay: 0.4s; }
.dev-section .team-member:nth-child(3) { animation-delay: 0.5s; }
.dev-section .team-member:nth-child(4) { animation-delay: 0.6s; }
.dev-section .team-member:nth-child(5) { animation-delay: 0.7s; }

/* Enhanced Expertise Tags */
.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 1.25rem;
    transform: translateZ(5px);
}

.expertise-tag {
    font-size: 0.75rem;
    color: #FF0054;
    background: rgba(255, 0, 84, 0.08);
    padding: 0.375rem 1rem;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.expertise-tag:hover {
    background: rgba(255, 0, 84, 0.15);
    transform: translateY(-2px);
}

/* Enhanced Expertise Section */
.expertise-section {
    margin-top: 1.5rem;
    transform: translateZ(5px);
}

.expertise-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.expertise-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.expertise-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(
        to right,
        rgba(226, 232, 240, 0.8),
        rgba(226, 232, 240, 0.2)
    );
}

.expertise-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.expertise-item {
    padding: 1rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.4);
    transition: all 0.3s ease;
}

.expertise-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 0, 84, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.expertise-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #FF0054;
    margin-bottom: 0.5rem;
}

.expertise-description {
    display: block;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
}

/* Header Section with Social Links */
.member-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.member-info-primary {
    flex-grow: 1;
}

.member-social {
    display: flex;
    gap: 0.75rem;
    transform: translateZ(10px);
}

.social-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    color: #64748b;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.social-link:hover {
    transform: translateY(-2px);
    color: #FF0054;
    border-color: rgba(255, 0, 84, 0.2);
    box-shadow: 0 4px 12px rgba(255, 0, 84, 0.1);
}

.social-link.linkedin:hover {
    color: #0077b5;
}

.social-link.portfolio:hover {
    color: #FF0054;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .dev-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dev-section {
        grid-template-columns: 1fr;
    }

    .member-content {
        padding: 2rem;
    }

    .team-section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .member-header {
        flex-direction: column;
        gap: 1rem;
    }

    .member-social {
        align-self: flex-start;
    }
}

/* Add smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Optimize performance */
.member-content {
    will-change: transform;
    -webkit-font-smoothing: antialiased;
} 

/* Team Grid Layout */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    align-items: start; /* Ensures cards align at the top */
}

/* Member Card Styles */
.team-member {
    perspective: 1000px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered animation */
.team-member:nth-child(1) { animation-delay: 0.1s; }
.team-member:nth-child(2) { animation-delay: 0.2s; }
.team-member:nth-child(3) { animation-delay: 0.3s; }
.team-member:nth-child(4) { animation-delay: 0.4s; }
.team-member:nth-child(5) { animation-delay: 0.5s; }
.team-member:nth-child(6) { animation-delay: 0.6s; }


.member-content {
    min-height: 110px; /* A consistent, compact height for the closed state */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: default;
    overflow: hidden;
}

/* Front Card Content */
.member-card-front {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.member-primary {
    flex-grow: 1;
    padding-right: 1rem;
}

.member-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    word-break: break-word;
}

.member-position {
    font-size: 0.875rem;
    color: #FF0054;
    font-weight: 500;
}

.member-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Social Links */
.member-social {
    display: flex;
    gap: 0.5rem;
}

.social-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    color: #64748b;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    color: #FF0054;
    border-color: rgba(255, 0, 84, 0.2);
    box-shadow: 0 4px 12px rgba(255, 0, 84, 0.1);
}

/* Expand Button */
.expand-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: white;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2; /* Add this */
    position: relative; /* Add this */
}

.expand-btn:hover {
    background: #f8fafc;
    color: #FF0054;
    border-color: rgba(255, 0, 84, 0.2);
}

/* Add visual feedback for the button */
.expand-btn i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.member-content.expanded .expand-btn i {
    transform: rotate(180deg);
    color: #FF0054;
}

/* Expandable Details */
/* Initially hidden details section */
.member-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Styles for when the card is expanded */
.member-content.expanded .member-details {
    opacity: 1;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

/* Hover Effects */
.member-content:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 24px -8px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 0, 84, 0.08);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
    .member-content {
        min-height: unset;
    }
} 

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
} 

/* Updated Expertise Section */
.expertise-section {
    margin-top: 1.5rem;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.expertise-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b; /* A more subtle color */
    background: #f1f5f9; /* Light background */
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.expertise-tag:hover {
    background: #e2e8f0;
    color: #1a1a1a;
    border-color: #cbd5e1;
}

/* Remove old expertise styles that are no longer needed */
.expertise-header,
.expertise-grid,
.expertise-item,
.expertise-name,
.expertise-description {
    display: none;
} 

/* Professional refinements for team member cards */

/* Container semantics */
.about-team .team-grid {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Layout tweaks for primary area: media + text */
.member-primary {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0.875rem;
    align-items: center;
}

.member-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #fee2e2, #ffe4e6);
    color: #9f1239;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(225,29,72,0.15);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) inset, 0 1px 2px rgba(0,0,0,0.03);
}

/* Name and position text block */
.member-text {
    display: flex;
    flex-direction: column;
}

.member-name {
    margin: 0 0 2px 0;
}

.member-position {
    margin: 0;
}

/* Card polish */
.member-content {
    background: linear-gradient(180deg, #ffffff, #fcfdff);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

.member-content:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px -12px rgba(15,23,42,0.18), 0 0 0 1px rgba(225, 29, 72, 0.06);
}

/* Focus ring for accessibility */
.member-content:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.25);
}

/* Action area refinement */
.member-actions .social-link {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.08);
    color: #475569;
}

.member-actions .social-link:hover {
    color: #0f172a;
    border-color: rgba(15,23,42,0.16);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .member-primary {
        grid-template-columns: 40px 1fr;
        gap: 0.75rem;
    }
    .member-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
} 

/* About Team: dark theme wrapper adjustments - keep section background white */

/* Keep header text using default (dark on white) */

/* Force 2 columns x 3 rows layout on larger screens and apply dark container */
.about-team .team-grid {
    grid-template-columns: repeat(2, 1fr);
    background: #0f172a; /* Match footer */
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 20px;
    padding: 2rem;
}

/* Hide avatar/icon for a cleaner, seamless look */
.about-team .member-media {
    display: none !important;
}

/* Adjust primary layout when media is hidden */
.about-team .member-primary {
    display: flex;
    align-items: center;
}

/* Card styling for dark background */
.about-team .member-content {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.15); /* slate-400 @ 15% */
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.about-team .member-content:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 28px -12px rgba(0,0,0,0.45), 0 0 0 1px rgba(148,163,184,0.20);
}

/* Text colors */
.about-team .member-name {
    color: #ffffff;
}

.about-team .member-position {
    color: #e2e8f0; /* slate-200 */
}

/* Social link styling in dark theme */
.about-team .member-actions .social-link {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #ffffff;
}

.about-team .member-actions .social-link:hover {
    border-color: rgba(255, 255, 255, 0.65);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.06);
}

/* Responsive: stack to 1 column on small screens */
@media (max-width: 768px) {
    .about-team .team-grid {
        grid-template-columns: 1fr;
    }
} 

/* Team grid dark container content colors */
.about-team .team-grid .member-name,
.about-team .team-grid .member-position {
    color: #ffffff;
}

.about-team .team-grid .member-actions .social-link {
    color: #ffffff;
}

/* Card surface blending into dark container */
.about-team .team-grid .member-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.about-team .team-grid {
    gap: 1.5rem;
} 

/* About Team: floating dark cards without container */
.about-team .team-grid {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.about-team .team-grid .member-content {
    background: linear-gradient(180deg, #0b1220, #0f172a);
    border: 1px solid rgba(148,163,184,0.20);
    box-shadow: 0 10px 24px -12px rgba(2, 6, 23, 0.6), 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.about-team .team-grid .member-content:hover {
    box-shadow: 0 18px 36px -12px rgba(2, 6, 23, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.10);
} 

/* Inline name row with right-aligned icons */
.about-team .member-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.about-team .member-name-row .member-social-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Keep existing hover color/effects; do not change color, just elevate */
.about-team .member-content:hover {
    transform: translateY(-6px);
}

/* Coral logo watermark on the right side */
.about-team .member-content {
    position: relative;
}

.about-team .member-content::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 140px;
    height: 140px;
    background-image: url('/assets/img/coral-logo.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right center;
    opacity: 0.08;
    pointer-events: none;
}

/* Smaller watermark on small screens */
@media (max-width: 768px) {
    .about-team .member-content::after {
        width: 96px;
        height: 96px;
        right: 12px;
        opacity: 0.1;
    }
} 

/* Simple hover effect: no color change, minimal lift, keep base shadow */
.about-team .team-grid .member-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -12px rgba(2, 6, 23, 0.6), 0 0 0 1px rgba(148, 163, 184, 0.08);
}

/* Colored social link buttons inline beside the name */
.about-team .member-name-row .member-social-inline .social-link {
    color: #ffffff;
    border-color: transparent;
}
.about-team .member-name-row .member-social-inline .social-link.linkedin {
    background-color: #0A66C2; /* LinkedIn brand */
}
.about-team .member-name-row .member-social-inline .social-link.portfolio {
    background-color: #FF0054; /* Coral accent */
}
/* Keep same color on hover; only a slight lift */
.about-team .member-name-row .member-social-inline .social-link:hover {
    transform: translateY(-1px);
    color: #ffffff;
    background-color: inherit; /* keep same */
}

/* Remove transparency from the coral logo watermark */
.about-team .member-content::after {
    opacity: 1;
} 

/* Remove blur/white overlay on hover for about team cards */
.about-team .member-content {
    backdrop-filter: none !important;
}
.about-team .member-content::before {
    content: none !important;
    opacity: 0 !important;
    background: none !important;
} 

/* Subtle size adjustments for About Team cards */
.about-team .member-content {
    min-height: 130px; /* slightly taller */
    padding: 1.75rem;  /* modestly increased internal spacing */
}

.about-team .member-name {
    font-size: 1.35rem; /* slight increase, consistent */
    line-height: 1.3;
}

.about-team .member-position {
    font-size: 0.95rem; /* slight increase, consistent */
}

/* Maintain consistency on small screens */
@media (max-width: 640px) {
    .about-team .member-content {
        min-height: 130px;
        padding: 1.6rem;
    }
    .about-team .member-name {
        font-size: 1.3rem;
    }
    .about-team .member-position {
        font-size: 0.95rem;
    }
} 

/* About Team: switch to white cards with dark text and subtle logo */
.about-team .team-grid .member-content {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 6px 16px -10px rgba(15,23,42,0.18);
}

.about-team .team-grid .member-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(15,23,42,0.20);
}

.about-team .team-grid .member-name {
    color: #0f172a; /* slate-900 */
}

.about-team .team-grid .member-position {
    color: #334155; /* slate-700 */
}

/* Make the coral logo watermark subtle */
.about-team .member-content::after {
    opacity: 0.08; /* low transparency */
    filter: grayscale(100%); /* keep it subtle on white */
} 

/* Increase visibility of coral logo watermark */
.about-team .member-content::after {
    opacity: 0.18; /* previously ~0.08 */
}

@media (max-width: 768px) {
    .about-team .member-content::after {
        opacity: 0.16; /* slightly lower on small screens to avoid overpowering */
    }
} 

/* Hover state: blue background, white text, logo fully opaque */
.about-team .team-grid .member-content {
    transition: background 200ms ease, box-shadow 200ms ease, transform 150ms ease;
}

.about-team .team-grid .member-content:hover {
    background: linear-gradient(135deg, #0e4aa8, #0a66c2);
    border-color: rgba(255,255,255,0.2);
}

.about-team .team-grid .member-content:hover .member-name,
.about-team .team-grid .member-content:hover .member-position {
    color: #ffffff;
}

.about-team .member-content:hover::after {
    opacity: 1;
    filter: none;
} 

/* Hover: switch to dark blue instead of bright blue */
.about-team .team-grid .member-content:hover {
    background: linear-gradient(135deg, #0b1220, #0f172a);
    border-color: rgba(255, 255, 255, 0.15);
} 

/* Seamless spacing for about-team */
.about-team .max-w-7xl { padding-top: 0; } 