/* ==========================================================================
   DEVCARD HIGH-END VIP LUXURY STYLE SYSTEM
   ========================================================================== */

:root {
    /* Obsidian Gold Theme (Default Elite) */
    --neon-color: #dfba56;
    --neon-rgb: 223, 186, 86;
    --neon-glow: 0 15px 45px rgba(223, 186, 86, 0.08), 0 0 0 1px rgba(223, 186, 86, 0.05);
    --neon-glow-btn: 0 6px 20px rgba(223, 186, 86, 0.15);
    --accent-gradient: linear-gradient(135deg, #dfba56 0%, #a8842c 100%);
    --card-bg: rgba(10, 10, 10, 0.75);
    --bg-dark: #050505;
    --text-main: #fffdf9;
    --text-muted: #cca978;
    
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --glass-border: 1px solid rgba(223, 186, 86, 0.22);
    --transition-speed: 0.3s;

    /* Satin Silk Reflective Sheen Background Overlay */
    --card-pattern: radial-gradient(circle at 20% 20%, rgba(223, 186, 86, 0.08) 0%, transparent 80%), radial-gradient(circle at 80% 80%, rgba(223, 186, 86, 0.05) 0%, transparent 80%);
    --card-pattern-size: 100% 100%;
}

/* Rose Silk Theme (The Rose Gold Elegance) */
[data-theme="rose"] {
    --neon-color: #b76e79;
    --neon-rgb: 183, 110, 121;
    --neon-glow: 0 15px 45px rgba(183, 110, 121, 0.08), 0 0 0 1px rgba(183, 110, 121, 0.05);
    --neon-glow-btn: 0 6px 20px rgba(183, 110, 121, 0.15);
    --accent-gradient: linear-gradient(135deg, #b76e79 0%, #8c4b54 100%);
    --card-bg: rgba(12, 10, 10, 0.75);
    --bg-dark: #070506;
    --text-main: #fffbfc;
    --text-muted: #ccabae;
    --glass-border: 1px solid rgba(183, 110, 121, 0.22);

    /* Rose Silk Reflective Sheen */
    --card-pattern: radial-gradient(circle at 20% 20%, rgba(183, 110, 121, 0.08) 0%, transparent 80%), radial-gradient(circle at 80% 80%, rgba(183, 110, 121, 0.05) 0%, transparent 80%);
    --card-pattern-size: 100% 100%;
}

/* Platinum Elite Theme */
[data-theme="platinum"] {
    --neon-color: #e5e7eb;
    --neon-rgb: 229, 231, 235;
    --neon-glow: 0 15px 45px rgba(229, 231, 235, 0.08), 0 0 0 1px rgba(229, 231, 235, 0.05);
    --neon-glow-btn: 0 6px 20px rgba(229, 231, 235, 0.15);
    --accent-gradient: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
    --card-bg: rgba(10, 11, 12, 0.75);
    --bg-dark: #050607;
    --text-main: #fcfdfe;
    --text-muted: #abb1bd;
    --glass-border: 1px solid rgba(229, 231, 235, 0.22);

    /* Platinum Diamond Reflective Sheen */
    --card-pattern: radial-gradient(circle at 20% 20%, rgba(229, 231, 235, 0.08) 0%, transparent 80%), radial-gradient(circle at 80% 80%, rgba(229, 231, 235, 0.05) 0%, transparent 80%);
    --card-pattern-size: 100% 100%;
}

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

body {
    min-height: 100vh;
    background-color: var(--bg-dark);
    background-image: url('card_bg_waves.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    padding: 30px 20px;
    transition: background-color var(--transition-speed);
}

/* BACKGROUND RADIAL CANVAS BLOB */
canvas#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.85;
}

/* APP WRAPPER & HEADER PANEL */
.app-wrapper {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 10px;
    z-index: 10;
}

.main-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.main-title span {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--neon-color);
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    transition: color var(--transition-speed);
}

/* DEVCARD CONTROL PANEL */
.control-board {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    transition: background-color var(--transition-speed);
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 24px;
}

.control-board::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 40%, var(--neon-color) 50%, transparent 60%, transparent 100%);
    z-index: -2;
    animation: rotate-border 4s linear infinite;
}

.control-board::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background-color: var(--card-bg);
    background-image: var(--card-pattern);
    background-size: var(--card-pattern-size);
    border-radius: 22px;
    z-index: -1;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.search-group {
    display: flex;
    gap: 10px;
}

.search-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 18px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-speed);
}

.search-group input:focus {
    border-color: rgba(var(--neon-rgb), 0.5);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 15px rgba(var(--neon-rgb), 0.08);
}

.search-group button {
    background: var(--accent-gradient);
    color: #050505;
    font-weight: 700;
    font-family: var(--font-display);
    border: none;
    border-radius: 14px;
    padding: 0 24px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
    box-shadow: var(--neon-glow-btn);
    letter-spacing: 0.5px;
}

.search-group button:hover {
    transform: translateY(-1px);
    filter: brightness(1.12);
    box-shadow: var(--neon-glow);
}

.theme-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.theme-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.theme-options {
    display: flex;
    gap: 6px;
}

.theme-btn {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    transition: all var(--transition-speed);
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.theme-btn.active {
    background: rgba(var(--neon-rgb), 0.12);
    border-color: rgba(var(--neon-rgb), 0.3);
    color: var(--neon-color);
}

/* PORTFOLIO CARD */
.card-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    perspective: 1000px;
}

.card {
    width: 100%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), var(--neon-glow);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color var(--transition-speed);
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 28px;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 40%, var(--neon-color) 50%, transparent 60%, transparent 100%);
    z-index: -2;
    animation: rotate-border 4s linear infinite;
}

.card::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background-color: var(--card-bg);
    background-image: var(--card-pattern);
    background-size: var(--card-pattern-size);
    border-radius: 26px;
    z-index: -1;
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
}

.card:hover {
    transform: translateY(-5px);
}

/* Force wave background directly inside the card ONLY during html2canvas PNG export */
.card.capture-mode {
    background-image: var(--card-pattern), url('card_bg_waves.png') !important;
    background-size: var(--card-pattern-size), cover !important;
}

/* CARD HEADER / AVATAR AREA */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    width: 100%;
}

.avatar-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 16px;
}

.avatar-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: var(--accent-gradient);
    z-index: -1;
    opacity: 0.6;
    filter: blur(8px);
    animation: drift 6s infinite ease-in-out;
}

@keyframes drift {
    0%, 100% { transform: scale(1); filter: blur(8px); opacity: 0.5; }
    50% { transform: scale(1.08); filter: blur(12px); opacity: 0.7; }
}

@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
    background: #000;
}

.name {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.role-badge {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--neon-color);
    background: rgba(var(--neon-rgb), 0.08);
    border: 1px solid rgba(var(--neon-rgb), 0.25);
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    margin-bottom: 12px;
    transition: all var(--transition-speed);
}

.bio-box {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: center;
    height: 38px;
    max-width: 320px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
}

/* TECH STACK BADGING GRID */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;
}

.tech-badge {
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 4px 10px;
    border-radius: 8px;
    color: var(--text-main);
    transition: all var(--transition-speed);
}

.tech-badge:hover {
    background: rgba(var(--neon-rgb), 0.12);
    border-color: rgba(var(--neon-rgb), 0.3);
    color: var(--neon-color);
}

/* FORMAL STATS WIDGETS */
.metrics-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    margin-bottom: 24px;
}

.metric-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    transition: all var(--transition-speed);
}

.metric-card:hover {
    border-color: rgba(var(--neon-rgb), 0.2);
    background: rgba(0, 0, 0, 0.35);
}

.metric-value {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.metric-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* DEVELOPER SKILL MATRIX */
.skills-section {
    width: 100%;
    margin-bottom: 24px;
}

.skills-matrix {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.skill-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.skill-name {
    color: #fff;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
}

.skill-pct {
    color: var(--neon-color);
    transition: color var(--transition-speed);
}

.skill-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.skill-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(var(--neon-rgb), 0.3);
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1), background var(--transition-speed);
}

/* RECENT PROJECTS DIRECTORY */
.repo-section {
    width: 100%;
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

.repo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

/* SLIM SCROLLBAR */
.repo-list::-webkit-scrollbar {
    width: 4px;
}

.repo-list::-webkit-scrollbar-track {
    background: transparent;
}

.repo-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.repo-list::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--neon-rgb), 0.4);
}

.repo-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all var(--transition-speed);
}

.repo-item:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(var(--neon-rgb), 0.15);
    transform: translateX(2px);
}

.repo-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.repo-name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.repo-language-badge {
    font-size: 0.65rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--text-main);
}

.repo-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.repo-stats {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.repo-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* SECURE QR CODE GATEWAY */
.qr-section {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 24px;
    transition: all var(--transition-speed);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.qr-section:hover {
    border-color: rgba(var(--neon-rgb), 0.2);
    background: rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.qr-container {
    width: 82px;
    height: 82px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color var(--transition-speed);
}

.qr-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 2px rgba(var(--neon-rgb), 0.3));
}

.qr-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qr-title {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.qr-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.btn-download {
    flex: 1;
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(var(--neon-rgb), 0.25);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 12px;
    border-radius: 14px;
    transition: all var(--transition-speed);
}

.btn-download:hover {
    transform: translateY(-1px);
    background: rgba(var(--neon-rgb), 0.08);
    border-color: rgba(var(--neon-rgb), 0.5);
    box-shadow: 0 0 15px rgba(var(--neon-rgb), 0.05);
}

/* ACTIONS GRID */
.card-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 5px;
}

.btn-visit {
    flex: 1;
    text-align: center;
    text-decoration: none;
    background: var(--accent-gradient);
    color: #050505;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 12px;
    border-radius: 14px;
    transition: all var(--transition-speed);
    box-shadow: var(--neon-glow-btn);
    letter-spacing: 0.5px;
}

.btn-visit:hover {
    transform: translateY(-1px);
    filter: brightness(1.12);
    box-shadow: var(--neon-glow);
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    height: 42px;
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-speed);
}

.social-btn:hover {
    border-color: rgba(var(--neon-rgb), 0.25);
    color: var(--neon-color);
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

/* SHIMMER SKELETONS */
.skeleton .skeleton-glow {
    animation: shimmer 1.6s infinite linear;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.02) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50% !important;
}

.skeleton-text {
    height: 14px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.skeleton-text.short { width: 120px; }
.skeleton-text.med { width: 180px; }
.skeleton-text.long { width: 260px; }

.skeleton-circle {
    width: 140px;
    height: 140px;
    border-radius: 50% !important;
    margin: 15px auto;
}

/* ERROR STATE WIDGET */
.error-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
}

.error-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--neon-color);
}

.error-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.error-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 280px;
    margin-bottom: 18px;
}

.error-card button {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.error-card button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* UTILITIES */
.hidden {
    display: none !important;
}

/* FOOTER HUB LABEL */
.hub-footer {
    margin-top: 25px;
    margin-bottom: 15px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--neon-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    opacity: 0.95;
    text-shadow: 0 0 10px rgba(var(--neon-rgb), 0.35);
    transition: color var(--transition-speed), text-shadow var(--transition-speed);
}
