/* ===========================
   FANCY MODE STYLES
   =========================== */

/* Reset & base for fancy */
body.fancy-mode {
    background: #0a0a0f;
    color: #e2e8f0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* Background animated gradient */
body.fancy-mode::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body.fancy-mode .master {
    background: transparent;
    width: 100%;
    max-width: 860px;
    position: relative;
    z-index: 1;
    padding-top: 0;
    color: #e2e8f0;
}

body.fancy-mode .home {
    padding-top: 0;
}

/* ---- Hero Section ---- */
body.fancy-mode .fancy-hero {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 64px 0 48px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease both;
}

body.fancy-mode .fancy-hero-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(99, 102, 241, 0.7);
    box-shadow: 0 0 32px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}

body.fancy-mode .fancy-hero-text h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 6px;
    background: linear-gradient(135deg, #818cf8, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.fancy-mode .fancy-hero-text .fancy-tagline {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0 0 12px;
}

body.fancy-mode .fancy-hero-text .fancy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

body.fancy-mode .fancy-hero-text .fancy-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #c7d2fe;
    transition: all 0.2s;
    -webkit-text-fill-color: #c7d2fe;
}

body.fancy-mode .fancy-hero-text .fancy-links a:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    color: #fff;
    -webkit-text-fill-color: #fff;
    transform: translateY(-1px);
}

/* ---- Section Cards ---- */
body.fancy-mode .fancy-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 20px;
    transition: border-color 0.25s, box-shadow 0.25s;
    animation: fadeInUp 0.5s ease both;
}

body.fancy-mode .fancy-section:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 4px 32px rgba(99, 102, 241, 0.1);
}

body.fancy-mode .fancy-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #a5b4fc;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

body.fancy-mode .fancy-section h2::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, #818cf8, #34d399);
    border-radius: 2px;
}

body.fancy-mode .fancy-section a.subtitle {
    color: #a5b4fc;
    -webkit-text-fill-color: #a5b4fc;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---- Experience Items ---- */
body.fancy-mode .fancy-exp-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.fancy-mode .fancy-exp-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

body.fancy-mode .fancy-exp-item .exp-title {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

body.fancy-mode .fancy-exp-item .exp-period {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 8px;
}

body.fancy-mode .fancy-exp-item ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ---- Skills Tags ---- */
body.fancy-mode .fancy-skill-group {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

body.fancy-mode .fancy-skill-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 130px;
    padding-top: 5px;
    flex-shrink: 0;
}

body.fancy-mode .fancy-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.fancy-mode .fancy-tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
}

body.fancy-mode .fancy-tag.green {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

body.fancy-mode .fancy-tag.purple {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
}

/* ---- Portfolio Cards ---- */
body.fancy-mode .fancy-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 6px;
}

body.fancy-mode .fancy-pf-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

body.fancy-mode .fancy-pf-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

body.fancy-mode .fancy-pf-card .pf-name {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 6px;
    font-size: 0.95rem;
    -webkit-text-fill-color: #e2e8f0;
    text-decoration: none;
}

body.fancy-mode .fancy-pf-card .pf-type {
    font-size: 0.75rem;
    color: #818cf8;
    margin-bottom: 8px;
}

body.fancy-mode .fancy-pf-card p {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

body.fancy-mode .fancy-pf-card a {
    -webkit-text-fill-color: #e2e8f0;
    color: #e2e8f0;
    text-decoration: none;
}

/* ---- Cert links ---- */
body.fancy-mode .fancy-cert-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.fancy-mode .fancy-cert-list li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #a5b4fc;
    -webkit-text-fill-color: #a5b4fc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

body.fancy-mode .fancy-cert-list li a:hover {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

body.fancy-mode .fancy-cert-list li a::before {
    content: '↗';
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ---- Blog list ---- */
body.fancy-mode .fancy-blog-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.fancy-mode .fancy-blog-list li {
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border-left: 3px solid #818cf8;
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.6;
}

body.fancy-mode .fancy-blog-list li a {
    color: #c7d2fe;
    -webkit-text-fill-color: #c7d2fe;
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
    font-size: 0.92rem;
}

body.fancy-mode .fancy-blog-list li a:hover {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

/* ---- Prose text in fancy ---- */
body.fancy-mode p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 12px;
}

body.fancy-mode p a {
    color: #a5b4fc;
    -webkit-text-fill-color: #a5b4fc;
    text-decoration: none;
    border-bottom: 1px solid rgba(165, 180, 252, 0.3);
    transition: border-color 0.2s;
}

body.fancy-mode p a:hover {
    border-bottom-color: #a5b4fc;
}

body.fancy-mode ul {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.75;
}

body.fancy-mode ul a {
    color: #a5b4fc;
    -webkit-text-fill-color: #a5b4fc;
    text-decoration: none;
}

body.fancy-mode ul a:hover {
    -webkit-text-fill-color: #fff;
}

/* ---- Footer ---- */
body.fancy-mode .fancy-footer {
    text-align: center;
    padding: 32px 0 48px;
    font-size: 0.8rem;
    color: #374151;
}

/* ---- Animations ---- */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

body.fancy-mode .fancy-section:nth-child(1) { animation-delay: 0.05s; }
body.fancy-mode .fancy-section:nth-child(2) { animation-delay: 0.1s; }
body.fancy-mode .fancy-section:nth-child(3) { animation-delay: 0.15s; }
body.fancy-mode .fancy-section:nth-child(4) { animation-delay: 0.2s; }
body.fancy-mode .fancy-section:nth-child(5) { animation-delay: 0.25s; }
body.fancy-mode .fancy-section:nth-child(6) { animation-delay: 0.3s; }
body.fancy-mode .fancy-section:nth-child(7) { animation-delay: 0.35s; }

/* ---- Mode Toggle Button ---- */
#mode-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.25s;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
}

body:not(.fancy-mode) #mode-toggle {
    background: #f0f0f0;
    color: #333;
    border-color: #ccc;
}

body:not(.fancy-mode) #mode-toggle:hover {
    background: #1e1e2e;
    color: #c7d2fe;
    border-color: #4f46e5;
}

body.fancy-mode #mode-toggle {
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.4);
}

body.fancy-mode #mode-toggle:hover {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}

/* ---- Mode Picker Splash ---- */
#mode-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #07070f;
    animation: splashFadeIn 0.4s ease;
}

@keyframes splashFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#mode-splash.hidden {
    animation: splashFadeOut 0.4s ease forwards;
}

@keyframes splashFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; pointer-events: none; }
}

.splash-inner {
    text-align: center;
    padding: 20px;
}

.splash-inner h2 {
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 40px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.splash-inner .splash-name {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #818cf8, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.splash-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.splash-btn {
    padding: 18px 36px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.25s;
    min-width: 160px;
    text-align: left;
    background: rgba(255,255,255,0.03);
}

.splash-btn:hover {
    transform: translateY(-3px);
}

.splash-btn.plain-btn:hover {
    border-color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.07);
}

.splash-btn.fancy-btn:hover {
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
}

.splash-btn .btn-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.splash-btn.plain-btn .btn-label {
    color: #94a3b8;
}

.splash-btn .btn-desc {
    font-size: 0.78rem;
    color: #475569;
}

.splash-btn.fancy-btn .btn-label {
    background: linear-gradient(135deg, #818cf8, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.splash-note {
    margin-top: 28px;
    font-size: 0.75rem;
    color: #334155;
}

/* ---- Education items ---- */
body.fancy-mode .fancy-edu-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.fancy-mode .fancy-edu-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

body.fancy-mode .fancy-edu-item .edu-title {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.93rem;
    margin-bottom: 2px;
}

body.fancy-mode .fancy-edu-item .edu-period {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 6px;
}

body.fancy-mode .fancy-edu-item ul {
    margin: 4px 0 0;
    padding-left: 18px;
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.65;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    body.fancy-mode .fancy-hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 0 32px;
    }

    body.fancy-mode .fancy-hero-text .fancy-links {
        justify-content: center;
    }

    body.fancy-mode .fancy-section {
        padding: 20px 18px;
    }

    body.fancy-mode .fancy-portfolio-grid {
        grid-template-columns: 1fr;
    }

    body.fancy-mode .master {
        padding: 0 16px;
    }

    body.fancy-mode .fancy-skill-group {
        flex-direction: column;
        gap: 8px;
    }

    body.fancy-mode .fancy-skill-label {
        min-width: unset;
        padding-top: 0;
    }
}
