/* =========================================
   MASTERPIECE: FLEXOKI 2.0 DARK THEME
   Engineered by Infinite Intelligence
   ========================================= */

/* 1. FLEXOKI 2.0 CORE PALETTE (The DNA) */
:root {
  /* Grayscale (Paper & Ink) */
  --flexoki-black: #100F0F;
  --flexoki-paper: #FFFCF0;
  --flexoki-50:    #F2F0E5;
  --flexoki-100:   #E6E4D9;
  --flexoki-150:   #DAD8CE;
  --flexoki-200:   #CECDC3; /* Lightest Text */
  --flexoki-300:   #B7B5AC;
  --flexoki-400:   #9F9D96;
  --flexoki-500:   #878580; /* Muted Text */
  --flexoki-600:   #6F6E69;
  --flexoki-700:   #575653;
  --flexoki-800:   #403E3C; /* Borders */
  --flexoki-850:   #343331;
  --flexoki-900:   #282726; /* UI Elements */
  --flexoki-950:   #1C1B1A; /* Cards/Header */

  /* Vibrant Accents (For UI Elements) */
  --flexoki-red-400:    #D14D41;
  --flexoki-red-600:    #AF3029;
  
  --flexoki-orange-400: #DA702C;
  --flexoki-orange-600: #BC5215;
  
  --flexoki-yellow-400: #D0A215;
  --flexoki-yellow-600: #AD8301;
  
  --flexoki-green-400:  #879A39;
  --flexoki-green-600:  #66800B;
  
  --flexoki-cyan-400:   #3AA99F;
  --flexoki-cyan-600:   #24837B;
  
  --flexoki-blue-400:   #4385BE;
  --flexoki-blue-600:   #205EA6;
  
  --flexoki-purple-400: #8B7EC8;
  --flexoki-purple-600: #5E409D;
  
  --flexoki-magenta-400:#CE5D97;
  --flexoki-magenta-600:#A02F6F;
}

/* 2. SEMANTIC LAYER (The Logic - Mapping Colors to Function) */
:root {
    /* Layout */
    --fx-bg-main:       var(--flexoki-black);      /* Deepest Black */
    --fx-bg-surface:    var(--flexoki-950);        /* Slightly lighter for cards/header */
    --fx-bg-element:    var(--flexoki-900);        /* Inputs/Buttons base */
    --fx-bg-hover:      var(--flexoki-850);        /* Hover states */
    
    /* Typography (High contrast but soft) */
    --fx-text-primary:  var(--flexoki-200);        /* Readable content */
    --fx-text-secondary:var(--flexoki-500);        /* Meta data / Subtitles */
    --fx-text-tertiary: var(--flexoki-600);        /* Disabled / Subtle */
    
    /* Borders */
    --fx-border-subtle: var(--flexoki-850);
    --fx-border-strong: var(--flexoki-800);

    /* Brand / Actions */
    --fx-brand-primary: var(--flexoki-green-600);  /* Main Buttons */
    --fx-brand-hover:   var(--flexoki-green-400);  /* Button Hover (Lighter in dark mode) */
    --fx-accent-blue:   var(--flexoki-blue-400);   /* Links (Lighter blue for dark bg) */
    --fx-accent-glow:   rgba(135, 154, 57, 0.25);  /* Green Glow */
}

/* 3. STYLES (The Art) */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--fx-bg-main);
    color: var(--fx-text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header with Glassmorphism --- */
.gh-header {
    background: rgba(28, 27, 26, 0.85); /* flexoki-950 with transparency */
    border-bottom: 1px solid var(--fx-border-strong);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.gh-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gh-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--fx-text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.gh-logo i { color: var(--fx-brand-primary); font-size: 32px; }

.gh-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gh-nav-link {
    color: var(--fx-text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.gh-nav-link.active {
    font-weight: 700;
    color: var(--fx-text-primary);
    background: var(--fx-bg-element);
}

.gh-nav-link.primary {
    background: var(--fx-brand-primary);
    color: var(--flexoki-paper); /* Contrast text */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.gh-nav-link.primary:hover {
    background: var(--fx-brand-hover);
    transform: translateY(-1px);
}

/* --- Hero Section --- */
.hero {
    /* Gradient using Flexoki Black to 950 */
    background: linear-gradient(180deg, var(--flexoki-950) 0%, var(--fx-bg-main) 100%);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--fx-border-subtle);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Atmospheric Glow */
    background: 
        radial-gradient(circle at 20% 30%, rgba(67, 133, 190, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, var(--fx-accent-glow) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    /* Rich Gradient Border */
    background: linear-gradient(135deg, var(--flexoki-green-600), var(--flexoki-green-400));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 48px;
    color: var(--flexoki-paper);
    border: 4px solid var(--fx-bg-main);
    box-shadow: 0 0 0 2px var(--fx-border-strong), 0 10px 40px var(--fx-accent-glow);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 2px var(--fx-border-strong), 0 10px 40px rgba(135, 154, 57, 0.2); }
    50% { box-shadow: 0 0 0 2px var(--fx-brand-primary), 0 10px 60px rgba(135, 154, 57, 0.4); }
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 12px;
    color: var(--fx-text-primary);
    font-weight: 800;
    letter-spacing: -1px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--fx-bg-element);
    color: var(--flexoki-green-400);
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 99px;
    vertical-align: middle;
    margin-left: 12px;
    border: 1px solid var(--fx-border-strong);
    font-weight: 600;
}

.subtitle {
    font-size: 1.4em;
    color: var(--fx-text-secondary);
    margin-bottom: 8px;
    font-weight: 300;
}

.bio {
    font-size: 1.1em;
    color: var(--fx-text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* Stats Cards */
.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--fx-bg-element);
    padding: 24px 32px;
    border-radius: 16px;
    border: 1px solid var(--fx-border-subtle);
    min-width: 150px;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-item:hover {
    border-color: var(--fx-text-secondary);
    transform: translateY(-4px);
    background: var(--fx-bg-hover);
}

.stat-number {
    font-size: 2.5em;
    font-weight: 800;
    line-height: 1;
    display: block;
    margin-bottom: 4px;
}

/* Specific colors for numbers using Flexoki 2.0 */
.stat-item:nth-child(1) .stat-number { color: var(--flexoki-blue-400); }
.stat-item:nth-child(2) .stat-number { color: var(--flexoki-green-400); }
.stat-item:nth-child(3) .stat-number { color: var(--flexoki-purple-400); }

.stat-label { 
    font-size: 0.85em; 
    color: var(--fx-text-secondary); 
    font-weight: 600;
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

/* Buttons */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--fx-brand-primary);
    color: var(--flexoki-paper);
    border-color: var(--fx-brand-primary);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background: var(--fx-brand-hover);
    border-color: var(--fx-brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 154, 57, 0.3);
}

.btn-secondary {
    background: var(--fx-bg-element);
    color: var(--fx-text-primary);
    border-color: var(--fx-border-strong);
}

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

/* --- Content Section --- */
main { padding: 60px 20px 80px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-size: 1.8em;
    font-weight: 800;
    color: var(--fx-text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title i { color: var(--flexoki-orange-400); }

/* Filter Pills */
.filter-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.filter-btn {
    background: var(--fx-bg-element);
    border: 1px solid var(--fx-border-subtle);
    color: var(--fx-text-secondary);
    padding: 8px 18px;
    border-radius: 99px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    background: var(--fx-bg-hover);
    color: var(--fx-text-primary);
    border-color: var(--fx-text-secondary);
}

.filter-btn.active {
    background: var(--fx-brand-primary);
    border-color: var(--fx-brand-primary);
    color: var(--flexoki-paper);
}

/* --- Grid & Cards --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.cert-card {
    background: var(--fx-bg-surface);
    border: 1px solid var(--fx-border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    display: flex;
    flex-direction: column;
}

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

.cert-card:hover {
    border-color: var(--fx-accent-blue);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.cert-header {
    padding: 24px;
    border-bottom: 1px solid var(--fx-border-subtle);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(to bottom, var(--fx-bg-element), var(--fx-bg-surface));
}

.cert-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    background: var(--fx-bg-main);
    border: 1px solid var(--fx-border-strong);
    color: var(--fx-text-primary);
}

/* Specific Platform Styling */
.cert-icon.google { color: var(--flexoki-blue-400); }
.cert-icon.coursera { color: var(--flexoki-cyan-400); }
.cert-icon.deeplearning { color: var(--flexoki-yellow-400); }

.cert-info { flex: 1; min-width: 0; }
.cert-title { 
    font-size: 1.15em; 
    font-weight: 700; 
    color: var(--fx-text-primary); 
    margin-bottom: 6px; 
    line-height: 1.4; 
}
.cert-platform { 
    font-size: 0.9em; 
    color: var(--fx-text-secondary); 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.cert-body { 
    padding: 24px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.cert-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.cert-meta-item { display: flex; align-items: center; gap: 8px; font-size: 0.85em; color: var(--fx-text-secondary); }
.cert-meta-item i { color: var(--fx-accent-blue); }

/* Status Badges - Using Opacity for 'Ink on Paper' feel */
.cert-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    width: fit-content;
}

.cert-status.verified { 
    background: rgba(135, 154, 57, 0.1); 
    color: var(--flexoki-green-400); 
    border: 1px solid rgba(135, 154, 57, 0.2); 
}
.cert-status.in-progress { 
    background: rgba(208, 162, 21, 0.1); 
    color: var(--flexoki-yellow-400); 
    border: 1px solid rgba(208, 162, 21, 0.2); 
}
.cert-status.pending { 
    background: rgba(206, 93, 151, 0.1); 
    color: var(--flexoki-magenta-400); 
    border: 1px solid rgba(206, 93, 151, 0.2); 
}

.cert-desc {
    font-size: 0.95em;
    color: var(--fx-text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}
.cert-desc strong { color: var(--fx-text-primary); font-weight: 600; }

/* Tags */
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; margin-bottom: 20px; }
.skill-tag { 
    background: var(--fx-bg-element); 
    border: 1px solid var(--fx-border-subtle); 
    color: var(--fx-text-secondary); 
    padding: 4px 10px; 
    border-radius: 6px; 
    font-size: 0.8em; 
    font-weight: 500;
}

/* Links inside Card */
.project-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--fx-border-subtle);
}

.project-link-btn {
    flex: 1;
    text-align: center;
    background: var(--fx-bg-main);
    color: var(--fx-text-primary);
    border: 1px solid var(--fx-border-strong);
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.project-link-btn:hover {
    background: var(--fx-brand-primary);
    color: var(--flexoki-paper);
    border-color: var(--fx-brand-primary);
}

.cert-actions { margin-top: 10px; }
.cert-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.cert-link.primary { 
    background: var(--fx-brand-primary); 
    color: var(--flexoki-paper); 
}
.cert-link.primary:hover { 
    background: var(--fx-brand-hover); 
}

/* --- Footer --- */
footer { 
    background: var(--fx-bg-surface); 
    border-top: 1px solid var(--fx-border-subtle); 
    padding: 60px 20px; 
    text-align: center; 
    margin-top: 60px; 
}

.footer-social { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; }
.social-link { 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    background: var(--fx-bg-element); 
    border: 1px solid var(--fx-border-strong); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--fx-text-secondary); 
    text-decoration: none; 
    transition: all 0.2s; 
    font-size: 1.2em;
}
.social-link:hover { 
    background: var(--fx-brand-primary); 
    border-color: var(--fx-brand-primary); 
    color: var(--flexoki-paper); 
    transform: translateY(-4px); 
}

.footer-text { color: var(--fx-text-tertiary); font-size: 0.9em; }
.footer-text a { color: var(--fx-accent-blue); text-decoration: none; }
.footer-text a:hover { text-decoration: underline; }

/* --- Admin Access (Floating) --- */
.admin-access {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--fx-bg-surface);
    border: 1px solid var(--fx-border-strong);
    color: var(--fx-text-secondary);
    padding: 12px 24px;
    border-radius: 99px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}
.admin-access:hover { 
    transform: translateY(-4px); 
    border-color: var(--fx-brand-primary);
    color: var(--fx-brand-primary);
}

/* Skeleton Loading State */
.loading-skeleton {
    background: var(--fx-bg-element);
    height: 200px;
    border-radius: 12px;
    grid-column: 1/-1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fx-text-tertiary);
    border: 1px dashed var(--fx-border-subtle);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
