:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent-1: #6366f1;
    --accent-2: #06b6d4;
    --accent-3: #10b981;
    --accent-4: #f43f5e;
    --accent-5: #f59e0b;
    --gradient-1: linear-gradient(135deg, #6366f1, #06b6d4);
    --gradient-2: linear-gradient(135deg, #10b981, #06b6d4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0b1120;
    --bg-secondary: #131b2e;
    --bg-card: rgba(19, 27, 46, 0.9);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
    position: relative;
}

/* Background orbs */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-1);
    top: -150px;
    left: -150px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-2);
    bottom: -100px;
    right: -100px;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orb-4 {
    width: 300px;
    height: 300px;
    background: var(--accent-5);
    top: 20%;
    right: 10%;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(248, 250, 252, 0.7);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition), border var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(11, 17, 32, 0.8);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.3rem;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-badge {
    font-size: 0.65rem;
    background: var(--accent-1);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 100px;
    margin-left: 0.3rem;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.8rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-link.active,
.nav-link:hover {
    color: var(--accent-1);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 2rem;
}

.hero-content {
    flex: 1 1 400px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-1);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-1);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.btn-calculate {
    width: 100%;
    justify-content: center;
    background: var(--gradient-1);
    color: white;
    font-size: 1.1rem;
    padding: 1rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-md);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-suggest {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    width: 100%;
    justify-content: center;
    transition: all var(--transition);
}

.btn-suggest:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: var(--bg-card);
}

.suggest-group {
    display: flex;
    align-items: flex-end;
}

.suggest-group label {
    display: none;
}

.hero-visual {
    flex: 1 1 300px;
    position: relative;
    min-height: 300px;
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 5%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.hero-graph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.graph-svg {
    width: 80%;
    opacity: 0.7;
}

/* Calculator Section */
.calculator-section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
}

.calculator-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.method-toggle {
    display: flex;
    background: var(--bg-primary);
    border-radius: 100px;
    padding: 0.3rem;
    gap: 0.3rem;
}

.method-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.method-btn.active {
    background: white;
    color: var(--accent-1);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .method-btn.active {
    background: #1e293b;
    color: #fff;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 150px;
}

.full-width {
    flex: 1 1 100%;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.label-hint,
.label-var {
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.3rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-wrapper input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.input-suffix {
    padding: 0 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-with-action input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: border var(--transition);
}

.input-with-action input:focus {
    border-color: var(--accent-1);
}

input[type="number"],
select {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: border var(--transition);
}

input[type="number"]:focus,
select:focus {
    border-color: var(--accent-1);
}

.form-help {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.example-chip {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 0.25rem 0.8rem;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    transition: all var(--transition);
    color: #e2e8f0;
}

.example-chip:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

/* Results */
.results-container {
    margin-top: 2rem;
    animation: slideUp 0.4s ease;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #10b981;
    font-weight: 600;
}

.btn-icon {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.summary-value {
    font-weight: 700;
    font-size: 1.3rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-1);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.iteration-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.iteration-table th {
    background: var(--bg-primary);
    padding: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.iteration-table td {
    padding: 0.6rem 0.8rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', monospace;
}

.error-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

[data-theme="dark"] .error-card {
    background: #2d1b1b;
    border-color: #7f1d1d;
    color: #fca5a5;
}

/* Team Section */
.team-section {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 2rem;
    z-index: 1;
    position: relative;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.team-card {
    perspective: 800px;
}

.team-card-inner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.8rem 1rem;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    backdrop-filter: blur(10px);
}

.team-card-inner:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.team-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: var(--avatar-bg);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--avatar-bg);
    opacity: 0.5;
    animation: ringPulse 2s infinite;
}

.team-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.team-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.team-role {
    font-size: 0.75rem;
    color: var(--accent-1);
    font-weight: 500;
}

.team-social {
    margin-top: 0.7rem;
    display: flex;
    justify-content: center;
    gap: 0.6rem;
}

.social-link {
    color: var(--text-muted);
    transition: color var(--transition);
}

.social-link:hover {
    color: var(--accent-1);
}

/* Contact Section */
.contact-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    z-index: 1;
    position: relative;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    box-shadow: var(--shadow-lg);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.contact-item div {
    display: flex;
    flex-direction: column;
}

.contact-item strong {
    font-weight: 600;
    color: var(--text-primary);
}

.contact-item span {
    color: var(--text-secondary);
}

.contact-email {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 500;
}

.contact-email:hover {
    text-decoration: underline;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form .form-group {
    flex: 1 1 100%;
}

.contact-form textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: border var(--transition);
    resize: vertical;
    font-family: inherit;
}

.contact-form textarea:focus {
    border-color: var(--accent-1);
}

.contact-submit {
    width: 100%;
    justify-content: center;
}

.contact-fallback {
    text-align: center;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
}

.contact-fallback p {
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
}

.contact-email-large {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-1);
    text-decoration: none;
}

.contact-email-large:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner-circle {
    animation: spin 1.5s linear infinite;
    transform-origin: center;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

@keyframes ringPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .calculator-card {
        padding: 1.2rem;
    }

    .method-btn span {
        font-size: 0.8rem;
    }

    .contact-card {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-num {
        font-size: 1.2rem;
    }

    .form-row-3 {
        flex-direction: column;
    }

    .suggest-group {
        align-items: stretch;
    }

    .suggest-group label {
        display: block;
    }
}


/* ========================================================
   TEAM – Glass Grid (Modern, aesthetic, professional)
   ======================================================== */
.team-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.team-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: var(--shadow-md);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
    z-index: 0;
}

.team-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: transparent;
}

.team-card:hover::before {
    opacity: 0.08;
}

.team-card>* {
    position: relative;
    z-index: 1;
}

.team-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    transition: border-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.team-card:hover .team-photo {
    border-color: var(--accent-1);
    transform: scale(1.05);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.team-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.team-role {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-1);
    margin-bottom: 0.5rem;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.team-social a {
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
}

.team-social a:hover {
    color: var(--accent-1);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1.2rem;
    }

    .team-photo {
        width: 90px;
        height: 90px;
    }

    .team-card {
        padding: 1rem 0.8rem;
    }

    .team-name {
        font-size: 0.95rem;
    }
}

/* ========================================================
   TEAM – 3D Rotating Carousel (tighter radius, bottom overlay)
   ======================================================== */
.team-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.carousel-container {
    perspective: 1200px;
    width: 100%;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.carousel-track {
    width: 200px;
    height: 280px;
    transform-style: preserve-3d;
    position: relative;
    animation: rotateCarousel 24s linear infinite;
    transition: animation-play-state 0.3s;
}

/* Pause rotation on hover */
.carousel-container:hover .carousel-track {
    animation-play-state: paused;
}

.team-card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    backface-visibility: hidden;
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    background: var(--bg-secondary);
}

.team-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Zoom effect on hover */
.team-card:hover img {
    transform: scale(1.20);
}

/* Overlay – bottom half only */
.team-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    /* bottom half */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem 1rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.35s ease;
    text-align: left;
    pointer-events: none;
    /* allows clicks to pass through if needed */
}

.team-card:hover .team-overlay {
    opacity: 1;
}

.team-overlay .name {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.3px;
    margin-bottom: 0.1rem;
}

.team-overlay .id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.2rem;
}

.team-overlay .role {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.4rem;
}

/* Contact link (website or email) inside overlay */
.team-overlay .contact-link {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    margin-top: 0.2rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.team-card:hover .team-overlay .contact-link {
    opacity: 1;
    transform: translateY(0);
}

.team-overlay .contact-link:hover {
    opacity: 1 !important;
    transform: translateX(4px);
}

.team-overlay .contact-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Rotation animation */
@keyframes rotateCarousel {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-container {
        height: 280px;
    }

    .carousel-track {
        width: 150px;
        height: 210px;
    }

    .team-overlay {
        padding: 0.8rem 0.8rem;
        height: 58%;
    }

    .team-overlay .name {
        font-size: 1rem;
    }

    .team-overlay .role {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 220px;
    }

    .carousel-track {
        width: 120px;
        height: 170px;
    }

    .team-overlay {
        padding: 0.6rem 0.6rem;
        height: 60%;
    }

    .team-overlay .name {
        font-size: 0.85rem;
    }

    .team-overlay .id {
        font-size: 0.6rem;
    }

    .team-overlay .role {
        font-size: 0.65rem;
    }

    .team-overlay .email-link {
        font-size: 0.7rem;
    }
}

/* ========================================================
   CONTACT – Paper plane icon (already in HTML)
   ======================================================== */
.contact-icon-link svg {
    transition: transform 0.3s ease, color 0.3s ease;
}

.contact-icon-link:hover svg {
    transform: scale(1.1) rotate(-6deg);
    color: var(--accent-1);
}

/* ========================================================
   CONTACT – Minimal (icons only)
   ======================================================== */
.contact-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.contact-minimal {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.contact-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s, transform 0.3s;
}

.contact-icon-link:hover {
    color: var(--accent-1);
    transform: translateY(-4px);
}

.contact-icon-link svg {
    transition: transform 0.3s;
}

.contact-icon-link:hover svg {
    transform: scale(1.1);
}

.contact-icon-link span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Dark mode adjustment for LinkedIn icon */
[data-theme="dark"] .contact-icon-link svg {
    fill: var(--text-secondary);
}

[data-theme="dark"] .contact-icon-link:hover svg {
    fill: var(--accent-1);
}

.footer-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}

.footer-link:hover {
    color: var(--accent-1);
    transform: scale(1.05);
}
