/* UNXAI - Ethereal Intelligence Theme */

:root {
    /* Colors */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;

    --accent-primary: #3b82f6;
    /* Neon Blue */
    --accent-secondary: #8b5cf6;
    /* Neon Purple */
    --accent-glow: rgba(59, 130, 246, 0.5);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-highlight: rgba(255, 255, 255, 0.1);

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Outfit', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;

    /* Transitions */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-highlight);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Holographic Effect */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    left: 150%;
    transition: left 1s ease;
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.2s ease;
}

/* 3D Background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
}

.nav-logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

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

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 99px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--glass-highlight);
    border-color: var(--accent-primary);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 15vw;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: fadeIn 2s ease 1s forwards;
}

.hero-content {
    text-align: center;
    padding: 0 2rem;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}

.hero-logo-img {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.reveal-text {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s var(--ease-out) 0.8s forwards;
}

.reveal-text:nth-child(2) {
    animation-delay: 1s;
}

.text-highlight {
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 1.2s forwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) 1.4s forwards;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 99px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: var(--glass-highlight);
    border-color: var(--text-primary);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

.scroll-indicator span {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

/* Sections */
.section {
    padding: 8rem 0;
    position: relative;
    min-height: calc(100vh - var(--header-height));
    scroll-margin-top: var(--header-height);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    padding: 2.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    border-color: rgba(255, 255, 255, 0.02);
}

.about-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.card-icon-minimal {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.about-card:hover .card-icon-minimal {
    color: var(--text-primary);
    opacity: 1;
    transform: scale(1.1);
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-flow: dense;
    /* Pack items efficiently */
    gap: 2.5rem;
}

/* Cybernetic Project Card */
.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    border: 1px solid #1f1f1f;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Corner Markers */
.project-card::before,
.project-card::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--accent-primary);
    transition: all 0.3s ease;
    opacity: 0;
}

.project-card::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.project-card::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.project-card:hover::before,
.project-card:hover::after {
    opacity: 1;
    width: 20px;
    height: 20px;
}

/* Scanline Effect */
.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(59, 130, 246, 0.1) 50%,
            transparent 100%);
    transform: translateY(-100%);
    transition: none;
    pointer-events: none;
    z-index: 2;
}

.project-card:hover .scanline {
    animation: scan 1.5s linear infinite;
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.project-image {
    height: 180px;
    background: #111;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #1f1f1f;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, #0a0a0a 120%);
}

.project-tech {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    font-size: 0.75rem;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-card:hover .project-tech span {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

.project-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-display);
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex: 1;
    line-height: 1.6;
    opacity: 0.8;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-primary);
}

.text-link .arrow {
    transition: transform 0.3s ease;
}

.text-link:hover .arrow {
    transform: translateX(5px);
}

/* Team Carousel */
.team-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.team-carousel-wrapper.single-mode .carousel-btn {
    display: none;
}

.team-carousel-wrapper.single-mode .team-grid {
    justify-content: center;
    overflow: hidden;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.team-grid {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 3rem 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    width: 100%;
}

.team-grid::-webkit-scrollbar {
    display: none;
}

.team-member {
    flex: 0 0 280px;
    scroll-snap-align: center;
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: all 0.5s var(--ease-out);
    opacity: 0.5;
    transform: scale(0.9);
    filter: blur(2px);
}

.team-member.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.3);
}

.member-role {
    font-size: 0.85rem;
    color: var(--accent-secondary);
    font-family: var(--font-mono);
}

.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    margin-bottom: 1.5rem;
    border: 2px solid var(--glass-border);
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Projects Carousel */
.projects-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.projects-carousel-wrapper.single-mode .carousel-btn {
    display: none;
}

.projects-carousel-wrapper.single-mode .projects-carousel {
    justify-content: center;
    overflow: hidden;
}

.projects-carousel {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 2rem 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    width: 100%;
}

.projects-carousel::-webkit-scrollbar {
    display: none;
}

.projects-carousel .project-card {
    flex: 0 0 340px;
    scroll-snap-align: center;
    transition: all 0.5s var(--ease-out);
    opacity: 0.7;
    transform: scale(0.95);
    filter: blur(1px);
}

.projects-carousel .project-card.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.3);
}

/* System Terminal */
.system-terminal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    z-index: 900;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 5px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 5px #10b981;
    animation: pulse 2s infinite;
}

.terminal-content {
    color: #10b981;
    height: 60px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Loading Placeholder */
.loading-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.pulse-loader {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.link-group h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.link-group a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.link-group a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes scroll {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
    }

    .nav-toggle span {
        width: 24px;
        height: 2px;
        background: var(--text-primary);
    }

    .footer-content {
        flex-direction: column;
        gap: 3rem;
    }

    .footer-links {
        gap: 2rem;
        width: 100%;
        justify-content: space-between;
    }

    .system-terminal {
        display: none;
    }
}