/*
Theme Name: BlueChip Labs
Theme URI: https://bluechiplabs.ai
Author: BlueChip Labs
Author URI: https://bluechiplabs.ai
Description: Minimal, modern theme for BlueChip Labs - a software engineer, polymath, and AI specialist.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: Private
Text Domain: bluechiplabs
*/

/* ========================================
   CSS VARIABLES / DESIGN TOKENS
   ======================================== */

:root {
    /* Colors - Dark Professional Theme */
    --color-bg-primary: #111111;
    --color-bg-secondary: #1a1a1a;
    --color-bg-tertiary: #222222;
    --color-bg-card: #2a2a2a;

    --color-text-primary: #e0e0e0;
    --color-text-secondary: #a0a0a0;
    --color-text-muted: #707070;

    --color-accent: #3a92f5;
    --color-accent-hover: #5aa3f7;
    --color-gold: #d4af37;
    --color-success: #4CAF50;
    --color-error: #ff3a3a;

    --color-border: #333333;
    --color-border-light: #444444;

    /* Typography */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.2;
    --line-height-base: 1.6;
    --line-height-relaxed: 1.8;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --header-height: 80px;

    /* Effects */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ========================================
   RESET & BASE
   ======================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

strong, b {
    font-weight: var(--font-weight-semibold);
}

code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

code {
    background: var(--color-bg-tertiary);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
}

pre {
    background: var(--color-bg-tertiary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
    color: var(--color-text-secondary);
    font-style: italic;
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-4xl) 0;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

/* ========================================
   HEADER
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-primary);
    text-decoration: none;
}

.site-logo:hover {
    color: var(--color-text-primary);
}

.site-logo .logo-icon {
    height: 36px;
    width: auto;
}

.site-logo .logo-text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.02em;
}

.main-nav ul {
    display: flex;
    gap: var(--space-xl);
    list-style: none;
}

.main-nav a {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-sm) 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

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

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

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.site-main {
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--color-bg-primary);
}

/* Animated gradient background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(58, 146, 245, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(58, 146, 245, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(100, 100, 120, 0.06) 0%, transparent 50%);
    animation: heroGradient 20s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Subtle flowing lines overlay */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.01) 50%, transparent 60%),
        linear-gradient(225deg, transparent 40%, rgba(255,255,255,0.01) 50%, transparent 60%);
    background-size: 60px 60px;
    animation: heroLines 30s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes heroGradient {
    0% {
        transform: scale(1) translateX(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) translateX(-5%);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) translateX(0);
        opacity: 1;
    }
}

@keyframes heroLines {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 60px 60px, -60px 60px;
    }
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: var(--font-weight-normal);
    line-height: 1.05;
    margin-bottom: var(--space-xl);
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-2xl);
    max-width: 450px;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--color-accent-hover);
    color: white;
}

.btn-outline {
    background: transparent;
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

.btn-outline:hover {
    border-color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ========================================
   CARDS
   ======================================== */

.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--color-border-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.card-description {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.card-meta {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

/* ========================================
   SECTION HEADERS
   ======================================== */

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

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

.section-header p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .site-logo {
    display: inline-block;
    margin-bottom: var(--space-md);
}

.footer-brand p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.footer-nav h4 {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
    color: var(--color-text-primary);
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: var(--space-sm);
}

.footer-nav a {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.footer-nav a:hover {
    color: var(--color-accent);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--color-accent);
    color: var(--color-bg-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ========================================
   BLOG / POSTS
   ======================================== */

.post-header {
    margin-bottom: var(--space-2xl);
}

.post-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.post-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-md);
}

.post-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.post-content p,
.post-content ul,
.post-content ol {
    margin-bottom: var(--space-lg);
}

.post-content ul,
.post-content ol {
    padding-left: var(--space-xl);
}

.post-content li {
    margin-bottom: var(--space-sm);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
}

/* ========================================
   PAGES
   ======================================== */

.page-header {
    padding: var(--space-4xl) 0 var(--space-2xl);
    text-align: center;
}

.page-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-md);
}

.page-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.page-content {
    padding-bottom: var(--space-4xl);
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-xl { margin-bottom: var(--space-xl); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-bg-primary);
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        gap: var(--space-md);
    }

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

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}
