/* --- 1. Variables & Reset --- */
:root {
    /* Colors */
    --bg-dark: #0f0e17;
    /* Very dark indigo, almost black */
    --primary: #00F5FF;
    /* Cyan */
    --primary-dim: rgba(0, 245, 255, 0.15);
    --secondary: #7F5AF0;
    /* Purple accent */
    --text-main: #fffffe;
    --text-muted: #94a1b2;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

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

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- 2. Typography --- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.1;
}

h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.small-container {
    max-width: 600px;
}

.section-padding {
    padding: 8rem 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

/* --- 4. Ambient Background (The "Liquid" Effect) --- */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-dark);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 60vh;
    height: 60vh;
    background: var(--secondary);
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 50vh;
    height: 50vh;
    background: var(--primary);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 40vh;
    height: 40vh;
    background: #2cb67d;
    top: 40%;
    left: 30%;
    opacity: 0.2;
    animation-delay: -10s;
}

@keyframes float {

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

    33% {
        transform: translate(30px, -50px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

/* --- 5. Components --- */
/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(15, 14, 23, 0.8);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
}

.logo .dot {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

.btn-secondary {
    border: 1px solid var(--glass-border);
    color: #fff;
    margin-left: 1rem;
}

.btn-secondary:hover {
    border-color: var(--primary);
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 16px;
    transition: transform 0.3s, border-color 0.3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-dim);
}

.icon-box {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* --- 6. Sections --- */
/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
}

.eyebrow {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    font-weight: 700;
    display: block;
    margin-bottom: 1rem;
}

.hero-sub {
    max-width: 600px;
    margin: 1.5rem 0 2.5rem 0;
}

/* Work */
.project-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 8rem;
}

.project-row.reverse {
    flex-direction: row-reverse;
}

.project-info {
    flex: 1;
}

.project-visual {
    flex: 1.2;
}

.mockup-box {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.gradient-1 {
    background: linear-gradient(135deg, #2D2B55, #4A90E2);
}

.gradient-2 {
    background: linear-gradient(135deg, #2D2B55, #00b894);
}

.cat {
    color: var(--primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.tech-tags {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.tech-tags li {
    background: var(--glass-border);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Stats */
.stats-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
}

/* Form */
.glass-form {
    background: rgba(22, 22, 29, 0.6);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

input,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.full-width {
    width: 100%;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- 7. Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

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

.fade-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Human Nodes (Team) Section --- */

.center-text {
    text-align: center;
    margin-bottom: 4rem;
}

.nodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 2rem 0;
}

.node-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    animation: breathe 4s ease-in-out infinite;
}

/* Offset animations so they don't move in unison */
.node-wrapper.delay-1 {
    animation-delay: 0s;
}

.node-wrapper.delay-2 {
    animation-delay: 1s;
}

.node-wrapper.delay-3 {
    animation-delay: 2s;
}

.node-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    /* Pill shape when expanded, Circle when closed */
    padding: 10px;
    width: 80px;
    /* Start as circle */
    height: 80px;
    /* Start as circle */
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Smooth easing */
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* The Hover/Active State - Expands the node */
.node-card:hover {
    width: 300px;
    /* Expand width */
    height: 140px;
    /* Expand height slightly */
    border-radius: 20px;
    /* Become a card */
    background: rgba(22, 22, 29, 0.9);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-dim);
    z-index: 10;
}

.node-visual {
    min-width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--bg-dark), #2a2a35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    flex-shrink: 0;
    /* Prevent squishing */
}

.initials {
    font-weight: 700;
    color: #fff;
    font-family: var(--font-head);
}

.node-info {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    margin-left: 1rem;
    white-space: nowrap;
    /* Keep text on one line initially */
}

/* Reveal text on hover */
.node-card:hover .node-info {
    opacity: 1;
    transform: translateX(0);
    white-space: normal;
    /* Allow text wrapping */
}

.node-info h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--primary);
}

.node-info .role {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.node-info .node-bio {
    font-size: 0.85rem;
    color: #fff;
    line-height: 1.4;
    font-style: italic;
    margin: 0;
}

/* The "Breathing" Float Animation */
@keyframes breathe {

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

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

/* Mobile Adjustment: Show as expanded cards by default or smaller grids */
@media (max-width: 768px) {
    .nodes-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .node-wrapper {
        animation: none;
    }

    /* Disable floating on mobile to prevent mis-clicks */
    .node-card {
        width: 100%;
        /* Full width on mobile */
        height: auto;
        border-radius: 16px;
        padding: 1.5rem;
    }

    .node-info {
        opacity: 1;
        transform: none;
        white-space: normal;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Simplified for code brevity */
    .project-row,
    .project-row.reverse {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 4rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stats-grid {
        flex-direction: column;
        gap: 2rem;
    }
}