/* GLOBAL RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light mode colors (default) */
    --primary: #0a0a0a;
    --primary-light: #1a1a1a;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    --text-muted: #737373;
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    --topbar-bg: rgba(255, 255, 255, 0.8);
    --card-shadow: rgba(0, 0, 0, 0.06);
    --tag-bg: rgba(59, 130, 246, 0.1);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #ffffff;
        --primary-light: #e5e5e5;
        --accent: #60a5fa;
        --accent-hover: #3b82f6;
        --text-primary: #f5f5f5;
        --text-secondary: #a3a3a3;
        --text-muted: #737373;
        --bg-primary: #0a0a0a;
        --bg-secondary: #141414;
        --bg-tertiary: #1f1f1f;
        --border: #2a2a2a;
        --border-light: #1f1f1f;
        --topbar-bg: rgba(10, 10, 10, 0.8);
        --card-shadow: rgba(0, 0, 0, 0.3);
        --tag-bg: rgba(96, 165, 250, 0.15);
    }
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    /* This ensures that when we snap, we account for your 64px header */
    /*scroll-padding-top: 64px;*/
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--transition-base), color var(--transition-base);
}

.btn-group {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}


/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    color: var(--text-secondary);
    max-width: 65ch;
}

a {
    color: inherit;
    text-decoration: none;
}

/* TOP BAR / NAVIGATION */
.topbar {
    background: var(--topbar-bg); 
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background var(--transition-base), border-color var(--transition-base);
}

.topbar-inner {
    max-width: none; /* Remove the 1200px limit */
    width: 100%;
    margin: 0; /* Remove centering */
    padding: 0 4%; /* Use percentage so it scales with screen width */
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}



/* TOP LEFT (logo + title) */
.top-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-mark {
    background: var(--primary);
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    transition: transform var(--transition-fast), background var(--transition-base);
}


.brand-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    transition: background var(--transition-base);
}

.brand-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* NAVIGATION */
/* Ensure the nav links also stay grouped to the right */
.top-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.top-nav a {
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.top-nav a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.top-nav a.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.top-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* HERO / BANNER */
.banner {
    text-align: center;
    padding-top: calc(var(--space-4xl) + 64px);
    padding-bottom: var(--space-4xl);
}

/* 4. Responsive Handling: If content is taller than the screen (like a long list on mobile) */
@media (max-height: 850px) {
    .section {
        /* On short screens, allow the section to grow naturally */
        height: auto;
        padding-top: 100px; 
        padding-bottom: 60px;
    }
    
    .section-header {
        margin-bottom: var(--space-xl);
    }
}

/* Subtle gradient orb background */
.banner::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

@media (prefers-color-scheme: dark) {
    .banner::before {
        background: radial-gradient(circle, rgba(96, 165, 250, 0.12) 0%, transparent 70%);
    }
}

.banner h1 {
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    position: relative;
}

.banner .container {
    align-items: center; /* Move flex items to center */
}

.banner p {
    margin-left: auto;
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Accent text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (prefers-color-scheme: dark) {
    .gradient-text {
        background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.btn-group {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    justify-content: center;
}

/* --- NEW CONTAINER CLASS --- */
.container {
    width: 100%;
    /* Narrower max-width makes the content feel more 'premium' and readable */
    max-width: 1000px; 
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 64px;
}


/* SECTIONS */
.section {
    /* dvh = dynamic viewport height (best for mobile browsers) */
    min-height: 100dvh; 
    width: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* High-end 'Air': Large vertical padding ensures content is never cramped */
    padding: var(--space-4xl) var(--space-lg);
    
    background: transparent !important;
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    margin: 0 auto;
    color: var(--text-muted);
}

/* Label/Tag above section titles */
.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

/* ABOUT / FOCUS AREAS GRID */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    /* justify-content: center; /* Center the grid items */
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr); /* 2x2 layout */
        max-width: 900px; /* Keeps cards from getting too wide */
        margin: 0 auto;
    }
}


/* New rule for centering the last card on wider screens */
@media (min-width: 1024px) {
    .about-card.grid-col-span-2 {
        grid-column: span 2;
        justify-self: center;
        max-width: 500px; /* Optional: constrain width for better appearance */
    }
}

.about-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}


.about-card:hover {
    border-color: var(--border);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--card-shadow);
}

.about-card h3 {
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.about-card p {
    font-size: 15px;
    color: var(--text-muted);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 12px;
    margin-bottom: var(--space-md);
    font-size: 24px;
    border: 1px solid var(--border-light);
    transition: background var(--transition-base), border-color var(--transition-base);
}

/* TAGS */
.tag {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: var(--tag-bg);
    border-radius: 6px;
    margin-top: var(--space-md);
    align-self: flex-start;
    justify-content: space-between;
}

/* DIVIDER */
.divider {
    max-width: 1200px;
    margin: 0 auto;
    border: none;
    border-top: 1px solid var(--border-light);
}

/* TEAM SECTION */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-xl);
    width: 100%;
}

.member {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.member:hover {
    border-color: var(--border);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--card-shadow);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: var(--space-md);
    border: 3px solid var(--bg-tertiary);
    background: var(--bg-tertiary);
}

.member h4 {
    font-size: 16px;
    margin-bottom: var(--space-xs);
}

.member-role {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.member-cloud {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.member-cloud.aws {
    background: #fff7ed;
    color: #c2410c;
}

.member-cloud.azure {
    background: #eff6ff;
    color: #1d4ed8;
}

.member-cloud.gcp {
    background: #e8fdd8;
    color: #26dc4a;
}

@media (prefers-color-scheme: dark) {
    .member-cloud.aws {
        background: rgba(194, 65, 12, 0.2);
        color: #fb923c;
    }
    
    .member-cloud.azure {
        background: rgba(29, 78, 216, 0.2);
        color: #60a5fa;
    }
    
    .member-cloud.gcp {
        background: rgba(48, 101, 44, 0.513);
        color: #69e580;
    }
}

/* RESOURCES SECTION */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    width: 100%;
}

.resource-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    overflow: visible;
}

.resource-link:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

.resource-link:hover .resource-arrow {
    transform: translateX(4px);
}

.resource-icon {
    font-size: 24px;
}

.resource-content h4 {
    font-size: 15px;
    margin-bottom: 2px;
}

.resource-content p {
    font-size: 13px;
    color: var(--text-muted);
}

.resource-arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}


/* FOOTER */
.footer {
    scroll-snap-align: end; 
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
}

.footer p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 auto;
}

/* UTILITIES */
.text-center {
    text-align: center;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .topbar-inner {
        padding: 0 var(--space-md);
    }
    
    .top-nav {
        display: flex;
        flex-direction: column; /* Stack navigation links vertically */
        gap: var(--space-sm);
    }
    
    .banner {
        min-height: 70vh;
        padding: var(--space-3xl) var(--space-md);
        padding-top: calc(var(--space-3xl) + 64px);
    }
    
    .section {
        padding: var(--space-3xl) var(--space-md);
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        justify-content: center;
    }
}

/* --- WIP TOOLTIP FEATURE --- */

.resource-link.wip {
    position: relative; /* Anchor for the tooltip */
    overflow: visible !important; /* Allow bubble to pop outside the box */
    cursor: not-allowed;
}

/* Force the bubble out of the flex flow */
.wip-tooltip {
    /* Critical: Hide by default */
    opacity: 0;
    display: none; 
    
    /* Critical: Position above everything */
    position: absolute;
    z-index: 9999;
    
    /* Placement: adjust 'top' to move it higher or lower */
    top: -40px; 
    left: 50%;
    transform: translateX(-50%);
    
    /* Styling */
    background-color: var(--primary);
    color: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Small triangle arrow */
.wip-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary) transparent transparent transparent;
}

/* On click (via JS): add .show class to display and run the animation */
.wip-tooltip.show {
    display: block; /* This is needed to override 'display: none' */
    opacity: 1;
    visibility: visible;
    animation: popAndFade 3s forwards;
}

@keyframes popAndFade {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    10%, 80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    background: var(--bg-primary); 
    pointer-events: none; /* Allows clicks to pass through to buttons/links */
}

/* Optional: Make the background slightly darker in dark mode for more 'pop' */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #050505; /* Deeper black like Grok */
    }
}