:root {
  /* Base - Soft & Warm */
  --background: oklch(0.98 0.01 90); /* Warm Off-White */
  --foreground: oklch(0.2 0.02 260); /* Soft Black */
  
  /* Surface - White with soft tint */
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.2 0.02 260);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.2 0.02 260);
  
  /* Primary - Playful Blue */
  --primary: oklch(0.6 0.18 250); 
  --primary-foreground: oklch(1 0 0);
  
  /* Secondary - Soft Grey */
  --secondary: oklch(0.96 0.01 260);
  --secondary-foreground: oklch(0.2 0.02 260);
  
  /* Muted */
  --muted: oklch(0.96 0.01 260);
  --muted-foreground: oklch(0.55 0.02 260);
  
  /* Accent */
  --accent: oklch(0.95 0.02 250);
  --accent-foreground: oklch(0.6 0.18 250);
  
  /* Bento Colors (Pastels) */
  --bento-1: oklch(0.96 0.03 200); /* Soft Teal */
  --bento-2: oklch(0.96 0.03 340); /* Soft Pink */
  --bento-3: oklch(0.96 0.04 90);  /* Soft Yellow/Orange */
  --bento-4: oklch(0.96 0.03 270); /* Soft Purple */
  --bento-5: oklch(0.96 0.03 150); /* Soft Green */
  
  /* Borders */
  --border: oklch(0.92 0.01 260);
  --input: oklch(0.92 0.01 260);
  --ring: oklch(0.6 0.18 250);
  
  /* Sidebar */
  --sidebar: oklch(0.99 0 0);
  --sidebar-foreground: oklch(0.4 0.02 260);
  --sidebar-primary: oklch(0.2 0.02 260);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.95 0.01 260);
  --sidebar-border: transparent; /* No border for bento style */
  
  /* Typography - Rounded & Friendly */
  --font-sans: "Nunito", "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Spacing & Radius */
  --radius: 1.5rem; /* 24px - Very rounded */
  --radius-sm: 1rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.5rem;
  
  /* Shadows - Soft & Diffused */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow: 0 8px 20px rgba(0,0,0,0.04);
  --shadow-md: 0 12px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);

  /* Layout Constants */
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 80px;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

/* --- Layout Components --- */

.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    background-color: var(--sidebar);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-collapsed-width);
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border-right: 1px solid rgba(0,0,0,0.02);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
}

.sidebar:hover {
    width: var(--sidebar-width);
    padding: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    color: var(--sidebar-foreground);
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    justify-content: center;
}

.sidebar:hover .nav-item {
    justify-content: flex-start;
}

.nav-item:hover {
    background-color: var(--sidebar-accent);
    transform: translateX(4px);
}
.sidebar:hover .nav-item:hover { transform: none; background-color: var(--sidebar-accent); }

.nav-item.active {
    background-color: var(--sidebar-primary);
    color: var(--sidebar-primary-foreground);
    box-shadow: var(--shadow-sm);
}

.nav-text, .app-logo-text, .plan-full-text {
    opacity: 0;
    display: none;
    transition: opacity 0.2s 0.1s;
}

.sidebar:hover .nav-text, 
.sidebar:hover .app-logo-text,
.sidebar:hover .plan-full-text {
    opacity: 1;
    display: block;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Bento Card Styles */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px; /* More breathing room */
    padding-bottom: 60px;
}

/* Tablet: 2 Columns */
@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 Columns Fixed */
@media (min-width: 1280px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.skill-card {
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    height: 240px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
    background-color: white;
    box-shadow: var(--shadow);
}

.skill-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

/* Card Colors */
.card-teal { background-color: var(--bento-1); }
.card-pink { background-color: var(--bento-2); }
.card-orange { background-color: var(--bento-3); }
.card-purple { background-color: var(--bento-4); }
.card-green { background-color: var(--bento-5); }
.card-white { background-color: white; }

/* Security Badge (New) */
.verified-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #059669; /* Green 600 */
    background: rgba(255,255,255,0.6);
    padding: 4px 8px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    width: fit-content;
    margin-bottom: 8px;
}

/* Stars Badge */
.stars-badge {
    position: absolute;
    top: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    font-size: 0.9rem;
    color: #b45309;
    background: rgba(255,255,255,0.5);
    padding: 4px 8px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--foreground);
    margin-bottom: 8px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    padding-right: 60px;
}

.card-desc {
    font-size: 0.85rem;
    color: rgba(0,0,0,0.6);
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    margin-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.author-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
}

.author-name {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--foreground);
}

/* --- Mobile Navigation --- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 12px 0;
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.03);
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
}

.mobile-nav-item.active {
    color: var(--foreground);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar { display: none !important; }
    .mobile-nav { display: flex; }
    .main-content { 
        padding: 16px;
        padding-bottom: 90px !important; 
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Animations --- */

/* 1. Marquee */
.marquee-container {
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    overflow: hidden;
    width: 100%;
    position: relative;
}

.marquee-content {
    display: flex;
    gap: 5rem;
    width: max-content;
    animation: scroll 40s linear infinite;
    padding: 20px 0;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-50% - 2.5rem)); }
}

/* 2. Background Blob */
.bg-blob {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 25%, transparent 50%);
    animation: rotate 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

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

/* 3. Card Shine Effect */
.skill-card {
    overflow: hidden; 
}

.skill-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    transition: left 0.5s;
    pointer-events: none;
}

.skill-card:hover::after {
    left: 150%;
    transition: left 0.7s ease-in-out;
}

/* --- Markdown Table Fixes --- */
.markdown-body table {
    display: table !important;
    width: 100%;
    max-width: 100%;
    border-collapse: collapse !important;
    border-spacing: 0;
    margin-bottom: 16px;
}

.markdown-body th,
.markdown-body td {
    padding: 8px 12px !important;
    border: 1px solid #d0d7de !important;
}

.markdown-body th {
    font-weight: 600 !important;
    background-color: #f6f8fa !important;
}

.markdown-body tr {
    background-color: #ffffff;
    border-top: 1px solid #d8dee4;
}

.markdown-body tr:nth-child(2n) {
    background-color: #f6f8fa;
}

/* --- Markdown List Fixes --- */
.markdown-body ul {
    list-style-type: disc !important;
    padding-left: 1.5em !important;
    margin-bottom: 1em !important;
}

.markdown-body ol {
    list-style-type: decimal !important;
    padding-left: 1.5em !important;
    margin-bottom: 1em !important;
}

.markdown-body li {
    margin-bottom: 0.25em !important;
}

.markdown-body li > ul,
.markdown-body li > ol {
    margin-top: 0.25em !important;
    margin-bottom: 0 !important;
}

/* --- FAQ Animations --- */
.faq-answer-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.faq-answer-wrapper.open {
    grid-template-rows: 1fr;
}

.faq-answer {
    overflow: hidden;
}

.rotate-45 {
    transform: rotate(45deg);
}

/* --- Load More Button --- */
.load-more-loading {
    cursor: wait;
}

.load-more-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #111827;
    border-radius: 9999px;
    animation: load-more-spin 0.8s linear infinite;
}

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

/* --- Market Filters --- */
.filter-btn {
    transition: all 0.2s;
}

.filter-btn:not(.active) {
    background: white;
    color: #4b5563;
    box-shadow: var(--shadow-sm);
}

.filter-btn:not(.active):hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: black;
}
