/* ================= Reset & Base ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: #0d1117;
    color: #e6edf3;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ================= Background Aura ================= */
.circle1, .circle2 { display: none; }

/* ================= Animations ================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}
@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(88,166,255,0.3), 0 0 60px rgba(88,166,255,0.1); }
    50%       { text-shadow: 0 0 30px rgba(88,166,255,0.6), 0 0 80px rgba(88,166,255,0.25); }
}
@keyframes arrowDown {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50%       { transform: translateY(5px) rotate(45deg); }
}

/* ================= Hero Section ================= */
#particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.hero-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 56px 24px 80px;
    gap: 32px;
    position: relative;
    overflow: hidden;
}
.hero-section::after { content: none; }

.header-text {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}
.header-text h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(90deg,
        #c9d1d9 0%,
        #58a6ff 20%,
        #ffffff 35%,
        #79c0ff 50%,
        #ffffff 65%,
        #58a6ff 80%,
        #c9d1d9 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite, titleGlow 3s ease-in-out infinite;
}
.header-text p {
    color: #8b949e;
    font-size: 1rem;
}
.typing-text::after {
    content: '|';
    animation: blink 0.7s step-end infinite;
    color: #58a6ff;
    margin-left: 1px;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ================= Cards Container ================= */
.cards-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

/* ================= Project Card ================= */
.project-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 24px 20px;
    width: 280px;
    min-height: 300px;
    text-align: center;
    text-decoration: none;
    color: #e6edf3;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform-style: preserve-3d;
}
.project-card:hover {
    border-color: #58a6ff;
    background: #1c2128;
    box-shadow: 0 20px 50px rgba(88,166,255,0.12);
}
.project-card::before { content: none; }

.project-card .icon {
    font-size: 3rem;
    margin-bottom: 12px;
    line-height: 1;
}
.project-card h2 {
    margin-bottom: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #58a6ff;
}
.project-card p {
    color: #8b949e;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ================= Card Themes ================= */
.card-green h2  { color: #3fb950; }
.card-green:hover { border-color: #3fb950; }

.card-ai h2    { color: #f85149; }
.card-ai:hover { border-color: #f85149; }

.card-ems h2   { color: #58a6ff; }
.card-ems:hover { border-color: #58a6ff; }

/* ================= Badges ================= */
.badge-test {
    background: #da3633;
    color: #f0f6fc;
    padding: 2px 8px;
    border-radius: 2em;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid #6e2820;
}

/* ================= Scroll Hint ================= */
@keyframes scrollHintIn {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes scrollBounce {
    0%   { transform: translateY(0);   }
    50%  { transform: translateY(7px); }
    100% { transform: translateY(0);   }
}
@keyframes arrowFade {
    0%, 100% { opacity: 0.25; }
    50%       { opacity: 1;   }
}
.scroll-hint {
    position: absolute;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #58a6ff;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: scrollHintIn 0.6s ease-out 0.6s both;
    text-decoration: none;
    text-shadow: 0 0 14px rgba(88,166,255,0.55);
    transition: color 0.2s, opacity 0.2s;
    white-space: nowrap;
    z-index: 2;
}
.scroll-hint:hover { color: #79c0ff; opacity: 0.8; }
.scroll-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    animation: scrollBounce 1.3s ease-in-out infinite;
}
.scroll-arrow {
    width: 14px;
    height: 14px;
    border-right: 2.5px solid #58a6ff;
    border-bottom: 2.5px solid #58a6ff;
    transform: rotate(45deg);
    filter: drop-shadow(0 0 5px rgba(88,166,255,0.8));
    animation: arrowFade 1.3s ease-in-out infinite;
}
.scroll-arrow:nth-child(2) {
    animation-delay: 0.22s;
}

/* ================= Profile Section ================= */
.profile-section {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 64px;
    padding: 24px 32px;
    position: relative;
    isolation: isolate;
}

#galaxy-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}
#galaxy-canvas.visible { opacity: 1; }

/* ===== Layout ===== */
.gh-profile {
    display: grid;
    grid-template-columns: 296px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* ===== Sidebar ===== */
.gh-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
    min-width: 0;
}

.gh-avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background-image: url("petch.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border: 1px solid #30363d;
    box-shadow: 0 0 0 1px #0d1117;
}

.gh-identity { display: flex; flex-direction: column; gap: 2px; }
.gh-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f0f6fc;
    line-height: 1.25;
}
.gh-username {
    font-size: 1.25rem;
    font-weight: 300;
    color: #8b949e;
    line-height: 1.25;
}

.gh-bio {
    color: #e6edf3;
    font-size: 0.875rem;
    line-height: 1.5;
}

.gh-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #8b949e;
}
.gh-status-emoji { font-size: 1rem; }

.gh-follow-btn {
    display: flex;
    justify-content: center;
    padding: 5px 16px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.gh-follow-btn:hover {
    background: #30363d;
    border-color: #8b949e;
}

.gh-icon {
    color: #8b949e;
    vertical-align: middle;
    flex-shrink: 0;
}

.gh-meta {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gh-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #e6edf3;
}

.gh-achievements h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 10px;
}
.gh-badge-list { display: flex; gap: 8px; flex-wrap: wrap; }
.gh-achievement-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #21262d;
    border: 1px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: border-color 0.15s;
    overflow: hidden;
    padding: 6px;
}
.gh-achievement-badge:hover { border-color: #58a6ff; }
.gh-achievement-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== Main area ===== */
.gh-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.gh-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gh-section-meta {
    font-size: 0.75rem;
    font-weight: 400;
    color: #8b949e;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 2em;
    padding: 1px 8px;
}

/* ===== Intro / About ===== */
.gh-intro-card {
    padding: 20px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.gh-intro-greeting {
    font-size: 1rem;
    color: #f0f6fc;
}
.gh-intro-desc {
    font-size: 0.875rem;
    color: #8b949e;
    line-height: 1.7;
}
.gh-intro-desc strong { color: #c9d1d9; }
.gh-intro-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gh-intro-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.875rem;
    color: #8b949e;
    line-height: 1.5;
}
.gh-intro-item strong { color: #c9d1d9; }
.gh-intro-item a { color: #58a6ff; text-decoration: none; }
.gh-intro-item a:hover { text-decoration: underline; }
.gh-intro-bullet { flex-shrink: 0; font-size: 1rem; }
.gh-intro-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid #21262d;
}
.gh-skill-tag {
    padding: 2px 10px;
    border-radius: 2em;
    background: #1f6feb26;
    border: 1px solid #1f6feb55;
    color: #58a6ff;
    font-size: 0.75rem;
}

/* ===== Pinned grid ===== */
.gh-pinned-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.gh-repo-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    text-decoration: none;
    transition: border-color 0.15s;
}
.gh-repo-card:hover { border-color: #8b949e; }

.gh-repo-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}
.gh-repo-name {
    color: #58a6ff;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.gh-repo-desc {
    color: #8b949e;
    font-size: 0.75rem;
    line-height: 1.5;
    flex: 1;
}
.gh-repo-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}
.gh-lang-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--lang-color, #f1e05a);
    flex-shrink: 0;
}
.gh-lang-name {
    font-size: 0.75rem;
    color: #8b949e;
}

/* ===== Contributions ===== */
.gh-contributions {
    padding: 16px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    min-width: 0;
    overflow: hidden;
}
.gh-contributions-header { margin-bottom: 12px; }
/* contrib layout */
.contrib-wrapper {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.contrib-days-col {
    display: grid;
    grid-template-rows: repeat(7, 10px);
    gap: 3px;
    padding-top: 20px; /* align with month row */
    flex-shrink: 0;
}
.contrib-day-label {
    font-size: 9px;
    color: #8b949e;
    line-height: 10px;
    white-space: nowrap;
    text-align: right;
    padding-right: 4px;
}
.contrib-cells-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.contrib-months-row {
    display: grid;
    grid-template-columns: repeat(53, 10px);
    gap: 3px;
    height: 16px;
}
.contrib-month-label {
    font-size: 9px;
    color: #8b949e;
    white-space: nowrap;
    overflow: visible;
}
.contrib-graph {
    display: grid;
    grid-template-columns: repeat(53, 10px);
    grid-template-rows: repeat(7, 10px);
    gap: 3px;
}
.contrib-cell {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}
.level-0 { background: #161b22; outline: 1px solid #21262d; }
.level-1 { background: #0e4429; }
.level-2 { background: #006d32; }
.level-3 { background: #26a641; }
.level-4 { background: #39d353; }

.contrib-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    margin-top: 8px;
    font-size: 0.7rem;
    color: #8b949e;
}
.contrib-legend .contrib-cell {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* ===== Research Panel ===== */
.gh-research-panel {
    padding: 16px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.research-slider { width: 100%; overflow: hidden; }
.research-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}
.research-slide {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
}
.research-card-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #30363d;
    display: block;
    object-fit: cover;
}
.research-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.research-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid #30363d;
    background: #21262d;
    cursor: pointer;
    transition: background 0.2s;
}
.research-dot.active,
.research-dot:hover {
    background: #58a6ff;
    border-color: #58a6ff;
}

/* ===== Activity Overview ===== */
.gh-activity-section {
    padding: 16px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gh-activity-body {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 180px;
}
.gh-activity-left {
    flex: 1;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.gh-activity-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.gh-activity-divider {
    width: 1px;
    background: #30363d;
    flex-shrink: 0;
}
.gh-activity-right {
    flex: 1;
    padding-left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.gh-activity-svg {
    width: 100%;
    max-width: 260px;
    height: auto;
}
.gh-contrib-repos {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.gh-contrib-repo-link {
    color: #58a6ff;
    text-decoration: none;
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gh-contrib-repo-link:hover { text-decoration: underline; }
.gh-contrib-rest {
    font-size: 0.8rem;
    color: #8b949e;
    margin-top: 2px;
}

.gh-breakdown-block { display: flex; flex-direction: column; gap: 10px; }
.gh-breakdown-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gh-lang-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    gap: 2px;
}
.gh-lang-bar-placeholder {
    flex: 1;
    background: #21262d;
    border-radius: 4px;
}
.gh-lang-bar-seg {
    height: 100%;
    border-radius: 2px;
}
.gh-lang-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}
.gh-lang-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #8b949e;
}
.gh-lang-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gh-lang-legend-pct { color: #c9d1d9; font-weight: 500; }

.gh-feed { display: flex; flex-direction: column; gap: 2px; }
.gh-feed-placeholder, .gh-feed-error {
    font-size: 0.8rem;
    color: #8b949e;
    padding: 8px 0;
    text-align: center;
}
.gh-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}
.gh-feed-item:hover { background: #21262d; }
.gh-feed-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #21262d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b949e;
    margin-top: 1px;
}
.gh-feed-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gh-feed-text {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #c9d1d9;
}
.gh-feed-text a { color: #58a6ff; text-decoration: none; }
.gh-feed-text a:hover { text-decoration: underline; }
.gh-feed-text strong { color: #e6edf3; }
.gh-feed-time {
    font-size: 0.68rem;
    color: #8b949e;
}

/* ================= Responsive ================= */

/* Tablet landscape */
@media (max-width: 1024px) {

    .profile-section        { width: 100%; padding: 20px 16px; }

    .gh-profile             { grid-template-columns: 1fr; gap: 20px; }
    .gh-sidebar             { position: static; display: flex; flex-direction: column; align-items: center; text-align: center; }
    .gh-avatar              { width: 160px; height: 160px; flex-shrink: 0; }
    .gh-identity            { align-items: center; }
    .gh-bio                 { text-align: center; max-width: 480px; }
    .gh-status              { justify-content: center; }
    .gh-meta                { align-items: center; }
    .gh-meta li             { justify-content: center; }
    .gh-achievements        { text-align: center; }
    .gh-badge-list          { justify-content: center; }

    .gh-pinned-grid         { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet portrait */
@media (max-width: 768px) {
    /* Hero */
    .hero-section           { padding: 40px 16px 60px; gap: 20px; }
    .header-text h1         { font-size: 1.6rem; }
    .cards-container        { flex-direction: column; align-items: stretch; width: 100%; gap: 12px; padding: 0; }
    .project-card           { width: 100%; min-height: 180px; padding: 20px 16px; }
    .project-card .icon     { font-size: 2.2rem; }

    /* Profile */
    .profile-section        { width: 100%; padding: 16px 12px; margin-bottom: 32px; }
    .gh-avatar              { width: 120px; height: 120px; }
    .gh-pinned-grid         { grid-template-columns: 1fr; }
    .gh-main                { gap: 16px; }

    /* Contributions */
    .gh-contributions       { padding: 12px; overflow: hidden; }
    .contrib-wrapper        { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Mobile */
@media (max-width: 480px) {
    .gh-activity-body { flex-direction: column; min-height: unset; }
    .gh-activity-left { padding-right: 0; padding-bottom: 14px; }
    .gh-activity-divider { width: 100%; height: 1px; }
    .gh-activity-right { padding-left: 0; padding-top: 14px; }
    .gh-activity-svg { max-width: 220px; }
    .gh-activity-section { gap: 14px; }

    /* Hero */
    .hero-section           { padding: 32px 12px 48px; gap: 16px; }
    .header-text h1         { font-size: 1.3rem; }
    .header-text p          { font-size: 0.8rem; }
    .project-card           { padding: 16px 12px; min-height: 160px; border-radius: 8px; }
    .project-card .icon     { font-size: 2rem; margin-bottom: 8px; }
    .project-card h2        { font-size: 1.1rem; }
    .project-card p         { font-size: 0.8rem; }

    /* Profile */
    .profile-section        { padding: 12px 8px; }
    .gh-avatar              { width: 96px; height: 96px; }
    .gh-name                { font-size: 1rem; }
    .gh-username            { font-size: 0.9rem; }
    .gh-bio                 { font-size: 0.78rem; }
    .gh-status              { font-size: 0.72rem; padding: 3px 8px; }
    .gh-intro-card          { padding: 12px; gap: 10px; }
    .gh-intro-greeting      { font-size: 0.875rem; }
    .gh-intro-desc          { font-size: 0.78rem; }
    .gh-intro-item          { font-size: 0.78rem; }
    .gh-repo-card           { padding: 12px; }
    .gh-repo-name           { font-size: 0.78rem; }
    .gh-repo-desc           { font-size: 0.7rem; }
    .gh-section-title       { font-size: 0.85rem; }

    /* Contributions — smaller cells on phone */
    .contrib-graph          { grid-template-columns: repeat(53, 8px); grid-template-rows: repeat(7, 8px); gap: 2px; }
    .contrib-months-row     { grid-template-columns: repeat(53, 8px); gap: 2px; }
    .contrib-cell           { width: 8px; height: 8px; }
    .contrib-days-col       { grid-template-rows: repeat(7, 8px); gap: 2px; padding-top: 18px; }
    .contrib-day-label      { font-size: 7px; line-height: 8px; }
    .contrib-month-label    { font-size: 7px; }
    .contrib-legend .contrib-cell { width: 8px; height: 8px; }

    /* Research */
    .gh-research-panel      { padding: 12px; }
    .gh-achievement-badge   { width: 38px; height: 38px; }
}

/* ================= Personal Card Footer ================= */
.pcard-footer {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 32px 36px;
    border-top: 1px solid #21262d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}
.pcard-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 680px;
}

/* The card itself */
.pcard {
    width: 100%;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.45), 0 1px 4px rgba(0,0,0,0.3);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.pcard:hover {
    border-color: #8b949e;
    box-shadow: 0 8px 40px rgba(0,0,0,0.55), 0 1px 6px rgba(0,0,0,0.3);
}
.pcard-stripe {
    display: block;
    width: 4px;
    background: linear-gradient(180deg, #1f6feb 0%, #58a6ff 100%);
    flex-shrink: 0;
}
.pcard-left {
    padding: 28px 20px 28px 18px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.pcard-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-image: url("petch.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border: 2px solid #30363d;
    box-shadow: 0 0 0 3px #0d1117;
    flex-shrink: 0;
}
.pcard-right {
    flex: 1;
    padding: 22px 24px 22px 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 3px;
}
.pcard-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f0f6fc;
    letter-spacing: -0.01em;
}
.pcard-role {
    font-size: 0.8rem;
    color: #8b949e;
}
.pcard-org {
    font-size: 0.75rem;
    color: #58a6ff;
    margin-bottom: 2px;
}
.pcard-rule {
    height: 1px;
    background: #21262d;
    margin: 8px 0 6px;
}
.pcard-contacts { display: flex; flex-direction: column; gap: 5px; }
.pcard-row {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    transition: opacity 0.15s;
}
.pcard-row:hover { opacity: 0.7; }
.pcard-row-icon { color: #484f58; flex-shrink: 0; }
.pcard-row-lbl {
    font-size: 0.62rem;
    font-weight: 600;
    color: #484f58;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    width: 40px;
    flex-shrink: 0;
}
.pcard-row-val {
    font-size: 0.78rem;
    color: #c9d1d9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Export buttons */
.pcard-actions { display: flex; gap: 10px; width: 100%; }
.pcard-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: background 0.15s, box-shadow 0.15s;
}
.pcard-btn-primary { background: #238636; color: #fff; }
.pcard-btn-primary:hover { background: #2ea043; box-shadow: 0 0 0 3px rgba(46,160,67,0.3); }
.pcard-btn-ghost { background: #21262d; color: #c9d1d9; border: 1px solid #30363d; }
.pcard-btn-ghost:hover { background: #30363d; border-color: #8b949e; }

.pcard-copy { font-size: 0.7rem; color: #484f58; }

@media (max-width: 480px) {
    .pcard-footer   { padding: 36px 16px 28px; }
    .pcard-left     { padding: 20px 14px 20px 14px; }
    .pcard-avatar   { width: 60px; height: 60px; }
    .pcard-right    { padding: 18px 16px 18px 4px; }
    .pcard-name     { font-size: 0.95rem; }
    .pcard-actions  { flex-direction: column; }
}
