/**
 * CodeFit Design Improvements
 * More Professional, Less AI-like
 */

/* ========== Global Refinements ========== */
:root {
    --cf-bg-primary: #0a0a0f;
    --cf-bg-secondary: #12121a;
    --cf-bg-card: #16161f;
    --cf-bg-tertiary: #1c1c28;
    --cf-border: #2a2a3a;
    --cf-border-light: #3a3a4a;
    --cf-text-primary: #f0f0f5;
    --cf-text-secondary: #a0a0b0;
    --cf-text-muted: #606070;
    --cf-accent-primary: #6366f1;
    --cf-accent-secondary: #8b5cf6;
    --cf-accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --cf-dev-color: #22d3ee;
    --cf-design-color: #f472b6;
    --cf-pm-color: #fbbf24;
    --cf-radius: 8px;
    --cf-radius-lg: 16px;
    --cf-radius-sm: 4px;
    --cf-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --cf-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --cf-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --cf-transition: 0.2s ease;
}

/* Better Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

/* ========== Navigation Improvements ========== */
.cf-header {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--cf-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.cf-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 64px;
    max-width: 1400px;
    margin: 0 auto;
}

.cf-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.cf-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--cf-accent-gradient);
    border-radius: var(--cf-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cf-logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--cf-text-primary);
    letter-spacing: -0.03em;
}

.cf-nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cf-nav-link {
    padding: 0.5rem 1rem;
    color: var(--cf-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--cf-radius);
    transition: all var(--cf-transition);
    text-decoration: none;
}

.cf-nav-link:hover {
    color: var(--cf-text-primary);
    background: var(--cf-bg-secondary);
}

.cf-nav-link.active {
    color: var(--cf-accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

/* ========== Button Refinements ========== */
.cf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--cf-radius);
    border: none;
    cursor: pointer;
    transition: all var(--cf-transition);
    text-decoration: none;
    white-space: nowrap;
}

.cf-btn-primary {
    background: var(--cf-accent-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.cf-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    color: white;
}

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

.cf-btn-outline:hover {
    border-color: var(--cf-accent-primary);
    color: var(--cf-text-primary);
    background: rgba(99, 102, 241, 0.05);
}

.cf-btn-ghost {
    background: transparent;
    color: var(--cf-text-secondary);
    padding: 0.5rem;
}

.cf-btn-ghost:hover {
    color: var(--cf-text-primary);
    background: var(--cf-bg-secondary);
}

/* ========== Card Improvements ========== */
.cf-card {
    background: var(--cf-bg-card);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius-lg);
    padding: 1.5rem;
    transition: all var(--cf-transition);
}

.cf-card:hover {
    border-color: var(--cf-border-light);
    box-shadow: var(--cf-shadow-sm);
}

.cf-card-elevated {
    box-shadow: var(--cf-shadow-md);
}

/* ========== Hero Section Improvements ========== */
.cf-hero {
    position: relative;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: hidden;
}

.cf-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
    animation: heroGlow 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

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

.cf-hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--cf-bg-secondary);
    border: 1px solid var(--cf-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--cf-text-secondary);
    margin-bottom: 1.5rem;
}

.cf-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--cf-text-primary);
}

.gradient-text {
    background: var(--cf-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cf-hero-description {
    font-size: 1.1rem;
    color: var(--cf-text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 520px;
}

.cf-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========== Terminal Improvements ========== */
.cf-terminal {
    background: #0d1117;
    border-radius: var(--cf-radius-lg);
    overflow: hidden;
    box-shadow: var(--cf-shadow-lg);
    border: 1px solid #30363d;
}

.cf-terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #161b22;
    border-bottom: 1px solid #30363d;
}

.cf-terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.cf-terminal-dot.red { background: #ff5f57; }
.cf-terminal-dot.yellow { background: #febc2e; }
.cf-terminal-dot.green { background: #28c840; }

.cf-terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    color: #8b949e;
    font-family: 'JetBrains Mono', monospace;
}

.cf-terminal-body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #c9d1d9;
    min-height: 200px;
}

.cf-terminal-prompt {
    color: #7ee787;
}

.cf-terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: #c9d1d9;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ========== Role Cards Improvements ========== */
.cf-role-card {
    position: relative;
    padding: 2rem;
    text-align: center;
    overflow: hidden;
}

.cf-role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 0;
    transition: opacity var(--cf-transition);
}

.cf-role-card:hover::before {
    opacity: 1;
}

.cf-role-card.developer::before { background: var(--cf-dev-color); }
.cf-role-card.designer::before { background: var(--cf-design-color); }
.cf-role-card.pm::before { background: var(--cf-pm-color); }

.cf-role-card .cf-role-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cf-role-card:hover .cf-role-icon {
    transform: scale(1.1);
}

.cf-role-card.developer .cf-role-icon {
    background: rgba(34, 211, 238, 0.15);
    color: var(--cf-dev-color);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.2);
}

.cf-role-card.designer .cf-role-icon {
    background: rgba(244, 114, 182, 0.15);
    color: var(--cf-design-color);
    box-shadow: 0 0 30px rgba(244, 114, 182, 0.2);
}

.cf-role-card.pm .cf-role-icon {
    background: rgba(251, 191, 36, 0.15);
    color: var(--cf-pm-color);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.2);
}

/* ========== Section Improvements ========== */
.cf-section {
    padding: 6rem 0;
    position: relative;
}

.cf-section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 4rem;
}

.cf-section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.cf-section-header p {
    font-size: 1.1rem;
    color: var(--cf-text-secondary);
}

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

.cf-footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.cf-footer-brand p {
    margin-top: 1rem;
    color: var(--cf-text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.cf-footer-links h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cf-text-muted);
    margin-bottom: 1.5rem;
}

.cf-footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cf-footer-links li {
    margin-bottom: 0.75rem;
}

.cf-footer-links a {
    color: var(--cf-text-secondary);
    font-size: 0.9rem;
    transition: color var(--cf-transition);
}

.cf-footer-links a:hover {
    color: var(--cf-accent-primary);
}

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

/* ========== Keyboard Shortcuts Bar ========== */
.cf-shortcuts-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cf-bg-secondary);
    border-top: 1px solid var(--cf-border);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.75rem;
    color: var(--cf-text-muted);
    z-index: 100;
}

.cf-shortcut {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cf-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--cf-bg-tertiary);
    border: 1px solid var(--cf-border);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
}

/* ========== Form Improvements ========== */
.cf-input,
.cf-select,
.cf-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--cf-bg-secondary);
    border: 1px solid var(--cf-border);
    border-radius: var(--cf-radius);
    color: var(--cf-text-primary);
    font-size: 0.95rem;
    transition: all var(--cf-transition);
}

.cf-input:focus,
.cf-select:focus,
.cf-textarea:focus {
    outline: none;
    border-color: var(--cf-accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.cf-input::placeholder,
.cf-textarea::placeholder {
    color: var(--cf-text-muted);
}

/* ========== Utility Classes ========== */
.cf-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cf-text-center { text-align: center; }
.cf-text-muted { color: var(--cf-text-muted); }
.cf-text-primary { color: var(--cf-text-primary); }
.cf-text-accent { color: var(--cf-accent-primary); }

.cf-mt-1 { margin-top: 0.5rem; }
.cf-mt-2 { margin-top: 1rem; }
.cf-mt-3 { margin-top: 1.5rem; }
.cf-mt-4 { margin-top: 2rem; }

.cf-mb-1 { margin-bottom: 0.5rem; }
.cf-mb-2 { margin-bottom: 1rem; }
.cf-mb-3 { margin-bottom: 1.5rem; }
.cf-mb-4 { margin-bottom: 2rem; }

/* ========== Responsive Refinements ========== */
@media (max-width: 1024px) {
    .cf-footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .cf-footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .cf-nav {
        padding: 0 1rem;
    }

    .cf-hero {
        min-height: auto;
        padding: 3rem 0;
    }

    .cf-hero-title {
        font-size: 2rem;
    }

    .cf-section {
        padding: 4rem 0;
    }

    .cf-footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cf-footer-brand {
        max-width: none;
    }

    .cf-shortcuts-bar {
        display: none;
    }
}
