/* ============================================================
   WP Contribution Profile — Stylesheet
   Aesthetic: Dark editorial, refined, with warm amber accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ---- variables ------------------------------------------------ */
:root {
    --wpcp-bg:          #0d0d0f;
    --wpcp-surface:     #141416;
    --wpcp-surface2:    #1c1c20;
    --wpcp-border:      #2a2a30;
    --wpcp-border2:     #3a3a42;
    --wpcp-accent:      #f0a500;
    --wpcp-accent2:     #ff6b35;
    --wpcp-text:        #e8e8ec;
    --wpcp-muted:       #7a7a8c;
    --wpcp-muted2:      #55555e;
    --wpcp-success:     #22c55e;
    --wpcp-radius:      16px;
    --wpcp-radius-sm:   10px;
    --wpcp-shadow:      0 4px 24px rgba(0,0,0,.6), 0 1px 4px rgba(0,0,0,.4);
    --wpcp-glow:        0 0 40px rgba(240,165,0,.12);
    --wpcp-font-head:   'Syne', sans-serif;
    --wpcp-font-body:   'DM Sans', sans-serif;
    --wpcp-transition:  .25s cubic-bezier(.4,0,.2,1);
}

/* ---- wrapper -------------------------------------------------- */
.wpcp-wrapper {
    font-family: var(--wpcp-font-body);
    color: var(--wpcp-text);
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
}

/* ---- search card ---------------------------------------------- */
.wpcp-search-card {
    background: var(--wpcp-surface);
    border: 1px solid var(--wpcp-border);
    border-radius: var(--wpcp-radius);
    padding: 40px 40px 36px;
    box-shadow: var(--wpcp-shadow), var(--wpcp-glow);
    position: relative;
    overflow: hidden;
}

.wpcp-search-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--wpcp-accent), var(--wpcp-accent2), transparent);
}

.wpcp-search-card::after {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(240,165,0,.06) 0%, transparent 70%);
    pointer-events: none;
}

/* brand */
.wpcp-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.wpcp-wp-logo {
    width: 44px; height: 44px;
    color: var(--wpcp-accent);
    flex-shrink: 0;
}

.wpcp-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wpcp-brand-title {
    font-family: var(--wpcp-font-head);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--wpcp-text);
    line-height: 1;
}

.wpcp-brand-sub {
    font-size: 12px;
    font-weight: 300;
    color: var(--wpcp-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* form */
.wpcp-form {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.wpcp-input-wrap {
    flex: 1;
    position: relative;
}

.wpcp-input-icon {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--wpcp-muted);
    pointer-events: none;
    transition: color var(--wpcp-transition);
}

.wpcp-input {
    width: 100%;
    background: var(--wpcp-surface2);
    border: 1px solid var(--wpcp-border);
    border-radius: var(--wpcp-radius-sm);
    padding: 14px 16px 14px 46px;
    font-family: var(--wpcp-font-body);
    font-size: 15px;
    color: var(--wpcp-text);
    outline: none;
    transition: border-color var(--wpcp-transition), box-shadow var(--wpcp-transition);
    box-sizing: border-box;
}

.wpcp-input::placeholder { color: var(--wpcp-muted2); }

.wpcp-input:focus {
    border-color: var(--wpcp-accent);
    box-shadow: 0 0 0 3px rgba(240,165,0,.12);
}

.wpcp-input:focus + .wpcp-input-icon,
.wpcp-input-wrap:focus-within .wpcp-input-icon {
    color: var(--wpcp-accent);
}

/* button */
.wpcp-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--wpcp-accent);
    color: #0d0d0f;
    border: none;
    border-radius: var(--wpcp-radius-sm);
    padding: 14px 24px;
    font-family: var(--wpcp-font-head);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
    cursor: pointer;
    transition: background var(--wpcp-transition), transform var(--wpcp-transition), box-shadow var(--wpcp-transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.wpcp-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background var(--wpcp-transition);
}

.wpcp-btn:hover {
    background: #ffb924;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(240,165,0,.4);
}

.wpcp-btn:active { transform: translateY(0); }

.wpcp-btn-arrow {
    width: 16px; height: 16px;
    transition: transform var(--wpcp-transition);
}

.wpcp-btn:hover .wpcp-btn-arrow { transform: translateX(3px); }

/* loading state */
.wpcp-btn.wpcp-loading .wpcp-btn-text::after {
    content: '';
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(0,0,0,.3);
    border-top-color: #0d0d0f;
    border-radius: 50%;
    animation: wpcp-spin .7s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

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

/* ---- error ---------------------------------------------------- */
.wpcp-error {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.25);
    border-radius: var(--wpcp-radius-sm);
    padding: 16px 20px;
    margin-top: 20px;
    color: #f87171;
    font-size: 14px;
    animation: wpcp-fade-in .3s ease;
}

.wpcp-error svg {
    width: 20px; height: 20px;
    flex-shrink: 0;
}

/* ---- result card ---------------------------------------------- */
.wpcp-result {
    margin-top: 24px;
    animation: wpcp-slide-up .4s cubic-bezier(.4,0,.2,1);
}

@keyframes wpcp-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes wpcp-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* profile card */
.wpcp-profile-card {
    background: var(--wpcp-surface);
    border: 1px solid var(--wpcp-border);
    border-radius: var(--wpcp-radius);
    overflow: hidden;
    box-shadow: var(--wpcp-shadow);
    position: relative;
}

/* hero banner */
.wpcp-hero {
    background: linear-gradient(135deg, #1a1a20 0%, #111114 100%);
    padding: 36px 36px 72px;
    position: relative;
    overflow: hidden;
}

.wpcp-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(240,165,0,.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(255,107,53,.06) 0%, transparent 60%);
}

.wpcp-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: .04;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,.5) 10px,
        rgba(255,255,255,.5) 11px
    );
}

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

.wpcp-profile-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 500;
    color: var(--wpcp-muted);
    text-decoration: none;
    letter-spacing: .5px;
    text-transform: uppercase;
    transition: all var(--wpcp-transition);
    float: right;
}

.wpcp-profile-link-btn:hover {
    background: rgba(240,165,0,.12);
    border-color: rgba(240,165,0,.3);
    color: var(--wpcp-accent);
}

.wpcp-profile-link-btn svg { width: 12px; height: 12px; }

/* avatar row */
.wpcp-avatar-row {
    position: absolute;
    bottom: -52px;
    left: 36px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.wpcp-avatar-ring {
    width: 100px; height: 100px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--wpcp-accent), var(--wpcp-accent2));
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    flex-shrink: 0;
}

.wpcp-avatar {
    width: 94px; height: 94px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--wpcp-surface2);
}

.wpcp-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* profile body */
.wpcp-profile-body {
    padding: 64px 36px 32px;
}

.wpcp-name-row {
    margin-bottom: 8px;
}

.wpcp-display-name {
    font-family: var(--wpcp-font-head);
    font-size: 26px;
    font-weight: 800;
    color: var(--wpcp-text);
    line-height: 1.1;
    letter-spacing: -.4px;
    margin: 0 0 4px;
}

.wpcp-username-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(240,165,0,.08);
    border: 1px solid rgba(240,165,0,.2);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--wpcp-accent);
    letter-spacing: .2px;
}

.wpcp-username-tag svg { width: 12px; height: 12px; opacity: .7; }

.wpcp-bio {
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--wpcp-muted);
    line-height: 1.65;
    font-weight: 300;
    font-style: italic;
    max-width: 560px;
}

/* meta strip */
.wpcp-meta-strip {
    display: flex;
    gap: 0;
    margin: 24px 0;
    background: var(--wpcp-surface2);
    border: 1px solid var(--wpcp-border);
    border-radius: var(--wpcp-radius-sm);
    overflow: hidden;
}

.wpcp-meta-item {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.wpcp-meta-item + .wpcp-meta-item::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 1px;
    background: var(--wpcp-border);
}

.wpcp-meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--wpcp-muted2);
    font-weight: 500;
}

.wpcp-meta-value {
    font-family: var(--wpcp-font-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--wpcp-text);
}

.wpcp-meta-value a {
    color: var(--wpcp-accent);
    text-decoration: none;
}

.wpcp-meta-value a:hover { text-decoration: underline; }

/* section heading */
.wpcp-section-title {
    font-family: var(--wpcp-font-head);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--wpcp-muted);
    margin: 28px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpcp-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--wpcp-border);
}

/* badges grid */
.wpcp-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.wpcp-badge {
    background: var(--wpcp-surface2);
    border: 1px solid var(--wpcp-border);
    border-radius: var(--wpcp-radius-sm);
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color var(--wpcp-transition), transform var(--wpcp-transition), box-shadow var(--wpcp-transition);
    position: relative;
    overflow: hidden;
    animation: wpcp-fade-in .4s ease both;
}

.wpcp-badge::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--wpcp-accent);
    opacity: 0;
    transition: opacity var(--wpcp-transition);
}

.wpcp-badge:hover {
    border-color: var(--wpcp-border2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

.wpcp-badge:hover::before { opacity: 1; }

.wpcp-badge-icon-wrap {
    width: 76px; height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.wpcp-badge-icon-wrap img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    display: block;
}

.wpcp-badge-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
}

.wpcp-badge-info {
    flex: 1;
    min-width: 0;
}

.wpcp-badge-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--wpcp-text);
    line-height: 1.3;
}

.wpcp-badge-team-tag {
    display: inline-block;
    margin-top: 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--wpcp-accent);
    background: rgba(240,165,0,.08);
    border: 1px solid rgba(240,165,0,.3);
    border-radius: 4px;
    padding: 1px 5px;
}

/* ext links */
.wpcp-ext-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
}

.wpcp-ext-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--wpcp-border2);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    color: var(--wpcp-muted);
    text-decoration: none;
    transition: all var(--wpcp-transition);
}

.wpcp-ext-link:hover {
    border-color: var(--wpcp-accent);
    color: var(--wpcp-accent);
}

/* stats row */
.wpcp-stats-row {
    display: flex;
    gap: 20px;
    margin: 16px 0 0;
}

.wpcp-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wpcp-stat-num {
    font-family: var(--wpcp-font-head);
    font-size: 22px;
    font-weight: 800;
    color: var(--wpcp-accent);
    letter-spacing: -.5px;
    line-height: 1;
}

.wpcp-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--wpcp-muted2);
}

.wpcp-dim { color: var(--wpcp-muted2); }

/* no badges */
.wpcp-no-badges {
    padding: 28px;
    text-align: center;
    background: var(--wpcp-surface2);
    border: 1px dashed var(--wpcp-border);
    border-radius: var(--wpcp-radius-sm);
    color: var(--wpcp-muted);
    font-size: 14px;
}

/* footer */
.wpcp-card-footer {
    border-top: 1px solid var(--wpcp-border);
    padding: 16px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wpcp-footer-credit {
    font-size: 11px;
    color: var(--wpcp-muted2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.wpcp-footer-credit svg { width: 12px; height: 12px; color: var(--wpcp-accent); }

.wpcp-view-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--wpcp-border2);
    border-radius: 8px;
    padding: 8px 16px;
    font-family: var(--wpcp-font-head);
    font-size: 12px;
    font-weight: 600;
    color: var(--wpcp-text);
    text-decoration: none;
    letter-spacing: .2px;
    transition: all var(--wpcp-transition);
}

.wpcp-view-profile-btn:hover {
    border-color: var(--wpcp-accent);
    color: var(--wpcp-accent);
    background: rgba(240,165,0,.04);
}

.wpcp-view-profile-btn svg { width: 13px; height: 13px; }

/* ---- responsive ---------------------------------------------- */
@media (max-width: 580px) {
    .wpcp-search-card { padding: 28px 20px 24px; }
    .wpcp-form { flex-direction: column; }
    .wpcp-btn { justify-content: center; }
    .wpcp-hero { padding: 24px 20px 60px; }
    .wpcp-profile-body { padding: 56px 20px 24px; }
    .wpcp-avatar-row { left: 20px; }
    .wpcp-meta-strip { flex-direction: column; }
    .wpcp-meta-item + .wpcp-meta-item::before { top: 0; left: 20%; right: 20%; width: auto; height: 1px; bottom: auto; }
    .wpcp-card-footer { flex-direction: column; gap: 12px; padding: 16px 20px; }
    .wpcp-display-name { font-size: 22px; }
    .wpcp-badges-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 400px) {
    .wpcp-badges-grid { grid-template-columns: 1fr 1fr; }
}
