:root {
    --primary-color: #0f766e;
    --secondary-color: #22d3ee;
    --accent-color: #a3ff12;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5f5;
    --text-muted: #8b97b5;
    --bg-primary: #050b1a;
    --bg-secondary: #0f172a;
    --bg-card: #16233d;
    --border-color: #223352;
    --shadow-light: rgba(34, 211, 238, 0.12);
    --shadow-heavy: rgba(4, 12, 28, 0.7);
    --gradient-primary: linear-gradient(140deg, #0f172a 0%, #0f766e 45%, #22d3ee 100%);
    --gradient-accent: linear-gradient(140deg, #d4ff5e 0%, #7fff45 45%, #4ade80 100%);
    --border-radius: 16px;
    --border-radius-small: 10px;
    --transition-fast: 0.18s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --text-primary: #0f172a;
    --text-secondary: #1f2937;
    --text-muted: #4b5563;
    --bg-primary: #f1f5f9;
    --bg-secondary: #e2e8f0;
    --bg-card: #f8fafc;
    --border-color: #cbd5e1;
    --shadow-light: rgba(15, 118, 110, 0.08);
    --shadow-heavy: rgba(15, 23, 42, 0.12);
    --accent-color: #16a34a;
    --gradient-primary: linear-gradient(135deg, #67e8f9 0%, #22d3ee 45%, #0ea5e9 100%);
    --gradient-accent: linear-gradient(135deg, #bbf7d0 0%, #4ade80 50%, #16a34a 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow-medium);
    transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--primary-color);
    color: white;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    backdrop-filter: blur(5px);
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
    z-index: 100;
    transition: all var(--transition-smooth);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.nav-btn:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.nav-btn .icon {
    font-size: 1.125rem;
}

.main-content {
    margin-left: 200px;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.team-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.clock-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.clock-label {
    color: var(--text-muted);
    font-weight: 500;
}

.current-time {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--bg-card);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    min-width: 120px;
    text-align: center;
    cursor: pointer;
    white-space: pre-wrap;
    line-height: 1.4;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
}

.current-time::after {
    content: attr(data-base-label);
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.current-time:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.2);
}

.current-time:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

.team-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.member-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.member-card:hover::before {
    transform: scaleX(1);
}

.member-avatar {
    text-align: center;
    margin-bottom: 1.5rem;
}

.member-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
    transition: all var(--transition-smooth);
}

.member-card:hover .member-avatar img {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.member-info {
    text-align: center;
}

.member-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.member-role {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.intro-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 1rem;
}

.intro-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.intro-toggle.active .button-icon {
    transform: rotate(180deg);
}

.member-intro {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    margin-top: 1rem;
}

.member-intro.show {
    max-height: fit-content;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.member-intro p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: slideInUp 0.4s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-small);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    min-height: 400px;
}

.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 800px;
}

.gallery-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: var(--border-radius-small);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-smooth), opacity 0.1s ease;
}

.gallery-image:hover {
    transform: scale(1.02);
}

.image-counter {
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.nav-arrow:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 24px var(--shadow-light);
}

.nav-prev {
    left: 1rem;
}

.nav-next {
    right: 1rem;
}

.nav-arrow svg {
    transition: transform var(--transition-fast);
}

.nav-arrow:hover svg {
    transform: scale(1.2);
}

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: 3rem;
    margin-left: 200px;
}

.footer-content {
    display: flex;
    justify-content: center;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.footer-item {
    text-align: center;
}

.footer-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.footer-value {
    color: var(--text-primary);
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-overlay.active {
        display: block;
    }
    
    .sidebar {
        width: 250px;
        transform: translateX(-100%);
        transition: transform var(--transition-smooth);
        box-shadow: 4px 0 12px var(--shadow-heavy);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }
    
    .site-footer {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }
    
    .page-header {
        margin-bottom: 2rem;
    }
    
    .team-title {
        font-size: 2rem;
    }
    
    .clock-widget {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .current-time {
        font-size: 1.25rem;
        padding: 0.5rem 1rem;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .member-card {
        padding: 1.5rem;
    }
    
    .member-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .member-name {
        font-size: 1.25rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
        gap: 1rem;
        min-height: 300px;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
    }
    
    .nav-prev {
        left: 0.5rem;
    }
    
    .nav-next {
        right: 0.5rem;
    }
    
    .gallery-image {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }
    
    .team-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .member-card {
        padding: 1.25rem;
    }
    
    .member-avatar img {
        width: 80px;
        height: 80px;
    }
    
    .nav-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .modal-body {
        min-height: 250px;
    }
}