/* =============================================
   FreelanceHub – Main Stylesheet
   ============================================= */

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

:root {
    --primary:     #6366f1;
    --primary-dk:  #4f46e5;
    --primary-lt:  #e0e7ff;
    --accent:      #f59e0b;
    --success:     #10b981;
    --danger:      #ef4444;
    --text:        #111827;
    --text-2:      #6b7280;
    --text-3:      #9ca3af;
    --border:      #e5e7eb;
    --bg:          #f9fafb;
    --white:       #ffffff;
    --radius:      12px;
    --shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
    --shadow-md:   0 4px 20px rgba(0,0,0,.12);
    --font:        'Inter', system-ui, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-container { min-height: calc(100vh - 80px); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .6rem 1.4rem; border-radius: 8px; font-size: .9rem;
    font-weight: 600; cursor: pointer; border: 2px solid transparent;
    transition: all .2s ease; white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-white { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover { background: var(--primary-lt); }
.btn-sm { padding: .4rem 1rem; font-size: .82rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
    background: var(--white); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.nav-brand { font-size: 1.25rem; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: .4rem; }
.nav-brand:hover { text-decoration: none; color: var(--primary-dk); }
.brand-icon { font-size: 1.4rem; }
.nav-links { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nav-link { color: var(--text-2); font-weight: 500; padding: .4rem .75rem; border-radius: 6px; font-size: .9rem; transition: .15s; }
.nav-link:hover { color: var(--primary); background: var(--primary-lt); text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: .6rem; padding-left: .75rem; border-left: 1px solid var(--border); }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-lt); }
.nav-name { font-size: .85rem; font-weight: 600; color: var(--text); }

/* =============================================
   ALERTS
   ============================================= */
.alert {
    padding: .9rem 1.5rem; display: flex; align-items: center; gap: .75rem;
    font-size: .9rem; font-weight: 500;
}
.alert-success { background: #d1fae5; color: #065f46; border-bottom: 2px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border-bottom: 2px solid #fca5a5; }

/* =============================================
   HERO
   ============================================= */
.hero { background: linear-gradient(135deg, #f0f4ff 0%, #fdf4ff 100%); padding: 6rem 0 5rem; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-badge { display: inline-block; background: var(--primary-lt); color: var(--primary); font-size: .8rem; font-weight: 700; padding: .35rem .85rem; border-radius: 20px; margin-bottom: 1.25rem; letter-spacing: .03em; }
.hero-title { font-size: 3.25rem; font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem; }
.gradient-text { background: linear-gradient(135deg, var(--primary), #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 1.1rem; color: var(--text-2); line-height: 1.7; margin-bottom: 2rem; max-width: 480px; }
.hero-actions { display: flex; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.hero-stats { display: flex; align-items: center; gap: 1.5rem; }
.stat strong { display: block; font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.stat span { font-size: .8rem; color: var(--text-2); font-weight: 500; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Hero visual mock */
.hero-visual { display: flex; justify-content: center; }
.hero-card-mock { background: var(--white); border-radius: 20px; padding: 2rem; box-shadow: var(--shadow-md); width: 320px; }
.mock-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #a855f7); margin-bottom: 1rem; }
.mock-lines { margin-bottom: 1.25rem; }
.mock-line { height: 12px; background: var(--border); border-radius: 6px; margin-bottom: .5rem; }
.w-60 { width: 60%; }
.w-40 { width: 40%; }
.mock-steps { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.mock-step { padding: .5rem .75rem; border-radius: 8px; font-size: .75rem; font-weight: 700; text-align: center; }
.mock-step.problem  { background: #fee2e2; color: #991b1b; }
.mock-step.process  { background: #fef3c7; color: #92400e; }
.mock-step.solution { background: #d1fae5; color: #065f46; }
.mock-step.outcome  { background: #dbeafe; color: #1e40af; }

/* =============================================
   SECTIONS
   ============================================= */
.section-light { padding: 5rem 0; background: var(--white); }
.section-dark  { padding: 5rem 0; background: var(--bg); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: .6rem; }
.section-header p  { color: var(--text-2); font-size: 1.05rem; }

/* Steps grid */
.steps-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
.step-card { background: var(--bg); border-radius: var(--radius); padding: 1.75rem; border: 1px solid var(--border); }
.step-num { font-size: 2rem; font-weight: 800; color: var(--primary-lt); margin-bottom: .75rem; }
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.step-card p  { font-size: .88rem; color: var(--text-2); }

/* Categories */
.categories-grid { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.category-chip { background: var(--white); border: 1px solid var(--border); color: var(--text); padding: .55rem 1.25rem; border-radius: 50px; font-size: .88rem; font-weight: 500; transition: .2s; }
.category-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* CTA */
.cta-section { background: linear-gradient(135deg, var(--primary), #7c3aed); padding: 5rem 0; color: #fff; text-align: center; }
.cta-inner h2 { font-size: 2.25rem; font-weight: 800; margin-bottom: .75rem; }
.cta-inner p  { font-size: 1.05rem; opacity: .85; margin-bottom: 2rem; }
.cta-actions  { display: flex; justify-content: center; gap: 1rem; }

/* =============================================
   PORTFOLIO GRID / CARDS
   ============================================= */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 1.5rem; }
.portfolio-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .25s; border: 1px solid var(--border); }
.portfolio-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.portfolio-card-img { height: 200px; background: #e5e7eb center/cover no-repeat; position: relative; }
.portfolio-category { position: absolute; top: .75rem; left: .75rem; background: rgba(0,0,0,.55); color: #fff; font-size: .75rem; font-weight: 700; padding: .25rem .65rem; border-radius: 20px; backdrop-filter: blur(4px); }
.portfolio-card-body { padding: 1.25rem; }
.portfolio-card-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.portfolio-card-author { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; font-size: .83rem; color: var(--text-2); }
.author-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.portfolio-snippet { font-size: .85rem; color: var(--text-2); margin-bottom: 1rem; line-height: 1.5; }
.narrative-mini { display: flex; gap: .35rem; margin-bottom: .75rem; flex-wrap: wrap; }
.nano-badge { font-size: .68rem; font-weight: 700; padding: .18rem .55rem; border-radius: 20px; }
.nano-badge.nano-problem  { background: #fee2e2; color: #991b1b; }
.nano-badge.nano-process  { background: #fef3c7; color: #92400e; }
.nano-badge.nano-solution { background: #d1fae5; color: #065f46; }
.nano-badge.nano-outcome  { background: #dbeafe; color: #1e40af; }

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-page { min-height: 100vh; background: linear-gradient(135deg, #f0f4ff, #fdf4ff); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { background: var(--white); border-radius: 20px; box-shadow: var(--shadow-md); padding: 2.5rem; width: 100%; max-width: 460px; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-brand { font-size: 1.3rem; font-weight: 800; color: var(--primary); display: block; margin-bottom: 1.25rem; }
.auth-header h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: .35rem; }
.auth-header p { color: var(--text-2); }
.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--text-2); font-size: .88rem; }

/* Role selector */
.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .5rem; }
.role-card { border: 2px solid var(--border); border-radius: var(--radius); padding: 1.25rem; cursor: pointer; transition: .2s; }
.role-card input { display: none; }
.role-card:hover { border-color: var(--primary); }
.role-card.selected { border-color: var(--primary); background: var(--primary-lt); }
.role-icon { font-size: 1.75rem; margin-bottom: .5rem; }
.role-title { font-weight: 700; font-size: .95rem; margin-bottom: .25rem; }
.role-desc { font-size: .78rem; color: var(--text-2); }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
.form-control {
    width: 100%; padding: .65rem 1rem; border: 1.5px solid var(--border);
    border-radius: 8px; font-size: .9rem; font-family: var(--font);
    background: var(--white); color: var(--text); transition: .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.form-control.is-invalid { border-color: var(--danger); }
textarea.form-control { resize: vertical; }
select.form-control { cursor: pointer; }
.form-check { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; font-size: .88rem; color: var(--text-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: .78rem; color: var(--text-3); margin-top: .3rem; display: block; }
.error-msg { color: var(--danger); font-size: .8rem; margin-top: .3rem; display: block; }
.req { color: var(--danger); }

/* Form cards */
.form-page-header { padding: 2.5rem 0 1.5rem; }
.form-page-header .back-link { color: var(--text-2); font-size: .88rem; display: block; margin-bottom: .75rem; }
.form-page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: .4rem; }
.form-page-header p { color: var(--text-2); }
.form-card { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 1.5rem; }
.form-section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.form-section-sub { color: var(--text-2); font-size: .9rem; margin-bottom: 1.5rem; margin-top: -.5rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1rem; align-items: center; }

/* Narrative steps */
.narrative-steps { display: flex; flex-direction: column; gap: 1.5rem; }
.narrative-step { border-left: 3px solid var(--border); padding-left: 1.25rem; }
.step-label { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; font-size: .95rem; }
.step-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.step-problem  .step-dot { background: #ef4444; }
.step-process  .step-dot { background: #f59e0b; }
.step-solution .step-dot { background: #10b981; }
.step-outcome  .step-dot { background: #6366f1; }
.step-problem  { border-left-color: #ef4444; }
.step-process  { border-left-color: #f59e0b; }
.step-solution { border-left-color: #10b981; }
.step-outcome  { border-left-color: #6366f1; }

/* File upload */
.file-upload-area { border: 2px dashed var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; cursor: pointer; position: relative; transition: .2s; background: var(--bg); }
.file-upload-area:hover { border-color: var(--primary); background: var(--primary-lt); }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-icon { font-size: 2rem; display: block; margin-bottom: .5rem; }
.file-upload-placeholder p { font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.file-upload-placeholder small { color: var(--text-3); font-size: .8rem; }
.file-preview { max-height: 200px; border-radius: 8px; margin: 0 auto; display: block; }
.current-image { margin-bottom: .75rem; }
.current-image small { display: block; color: var(--text-3); font-size: .78rem; margin-top: .3rem; }
.existing-images { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }

/* =============================================
   DASHBOARD
   ============================================= */
.dashboard-header { background: linear-gradient(135deg, var(--primary), #7c3aed); padding: 3rem 0; color: #fff; }
.dash-profile { display: flex; align-items: flex-start; gap: 2rem; }
.dash-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,.3); flex-shrink: 0; }
.dash-info { flex: 1; }
.dash-info h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: .35rem; }
.dash-info p { opacity: .85; font-size: .95rem; margin-bottom: .75rem; }
.dash-meta { display: flex; gap: 1.25rem; font-size: .85rem; opacity: .8; margin-bottom: .75rem; }
.dash-meta a { color: #fff; }
.dash-actions { display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; flex-shrink: 0; }

.dash-body { padding: 2.5rem 1rem; }
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2.5rem; }
.stat-box { background: var(--white); border-radius: var(--radius); padding: 1.25rem; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: .8rem; color: var(--text-2); font-weight: 500; margin-top: .25rem; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.dash-section { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.section-title-row h2 { font-size: 1.05rem; font-weight: 700; }
.count-badge { background: var(--primary-lt); color: var(--primary); padding: .2rem .7rem; border-radius: 20px; font-size: .8rem; font-weight: 700; }

/* Portfolio list (in dashboard) */
.portfolio-list { display: flex; flex-direction: column; gap: 1rem; }
.portfolio-list-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; transition: .15s; }
.portfolio-list-item:hover { background: var(--bg); }
.pli-cover { width: 80px; height: 68px; border-radius: 8px; background: #e5e7eb center/cover no-repeat; flex-shrink: 0; }
.pli-body { flex: 1; min-width: 0; }
.pli-meta { display: flex; gap: .5rem; margin-bottom: .35rem; }
.pli-body h3 { font-size: .9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pli-body p { font-size: .78rem; color: var(--text-2); }
.pli-actions { display: flex; flex-direction: column; gap: .35rem; flex-shrink: 0; }

/* Badges */
.category-badge { background: var(--primary-lt); color: var(--primary); font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 20px; }
.status-badge { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 20px; }
.status-published { background: #d1fae5; color: #065f46; }
.status-draft { background: #fef3c7; color: #92400e; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-accepted { background: #d1fae5; color: #065f46; }
.status-declined { background: #fee2e2; color: #991b1b; }

/* Hire requests */
.requests-list { display: flex; flex-direction: column; gap: 1rem; }
.request-card { padding: 1rem; border: 1px solid var(--border); border-radius: 10px; }
.request-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.req-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.req-status { margin-left: auto; }
.req-date { font-size: .75rem; color: var(--text-3); }
.request-card h4 { font-size: .9rem; font-weight: 700; margin-bottom: .35rem; }
.request-card p { font-size: .82rem; color: var(--text-2); margin-bottom: .5rem; }
.request-card small { display: block; font-size: .78rem; color: var(--text-3); }
.request-actions { display: flex; gap: .5rem; margin-top: .75rem; }

/* =============================================
   BROWSE PAGE
   ============================================= */
.browse-hero { background: linear-gradient(135deg, var(--primary), #7c3aed); padding: 3rem 0 2.5rem; color: #fff; text-align: center; }
.browse-hero h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: .5rem; }
.browse-hero p { opacity: .85; margin-bottom: 1.5rem; }
.browse-search { display: flex; gap: .75rem; max-width: 520px; margin: 0 auto 1.5rem; }
.search-input { flex: 1; background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3) !important; color: #fff !important; }
.search-input::placeholder { color: rgba(255,255,255,.6); }
.category-filter { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.cat-filter-btn { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25); padding: .35rem .9rem; border-radius: 20px; font-size: .82rem; font-weight: 500; cursor: pointer; transition: .2s; }
.cat-filter-btn:hover, .cat-filter-btn.active { background: #fff; color: var(--primary); text-decoration: none; }
.results-header { padding: 1.5rem 0 .5rem; color: var(--text-2); font-size: .88rem; }

/* Freelancer grid */
.freelancer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.5rem; padding-bottom: 3rem; }
.freelancer-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); transition: .25s; }
.freelancer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.fc-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.fc-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-lt); }
.fc-header h3 { font-size: 1rem; font-weight: 700; margin-bottom: .15rem; }
.fc-location { font-size: .78rem; color: var(--text-2); }
.fc-bio { font-size: .85rem; color: var(--text-2); margin-bottom: .75rem; line-height: 1.5; }
.fc-skills { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.fc-portfolio-count { font-size: .8rem; color: var(--text-3); margin-bottom: 1rem; }
.fc-actions { display: flex; gap: .5rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.skill-tag { background: var(--primary-lt); color: var(--primary); font-size: .78rem; font-weight: 600; padding: .22rem .65rem; border-radius: 20px; }
.skill-tag.skill-sm { font-size: .7rem; padding: .16rem .5rem; }
.pagination-wrap { padding: 2rem 0; }

/* =============================================
   PROFILE PAGE
   ============================================= */
.profile-hero { background: linear-gradient(135deg, #1e1b4b, var(--primary)); padding: 4rem 0; color: #fff; }
.profile-hero-inner { display: flex; gap: 2.5rem; align-items: flex-start; }
.profile-hero-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,.3); flex-shrink: 0; }
.profile-hero-info { flex: 1; }
.profile-hero-info h1 { font-size: 2rem; font-weight: 800; margin-bottom: .4rem; }
.profile-location { opacity: .8; font-size: .9rem; margin-bottom: .75rem; }
.profile-bio { opacity: .9; font-size: .95rem; line-height: 1.6; margin-bottom: .75rem; }
.profile-meta { display: flex; gap: 1.5rem; font-size: .85rem; opacity: .8; }
.profile-link { color: #fff; }
.profile-hero-action { flex-shrink: 0; text-align: center; }
.hire-hint { font-size: .78rem; opacity: .7; margin-top: .5rem; }

/* =============================================
   PORTFOLIO DETAIL PAGE
   ============================================= */
.portfolio-detail-hero { height: 380px; background: #1e1b4b center/cover no-repeat; position: relative; }
.portfolio-detail-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.2)); display: flex; align-items: flex-end; padding-bottom: 2.5rem; }
.portfolio-detail-title { font-size: 2.25rem; font-weight: 800; color: #fff; margin: .5rem 0 .75rem; line-height: 1.2; }
.portfolio-detail-author { display: flex; align-items: center; gap: .5rem; color: rgba(255,255,255,.8); font-size: .88rem; }
.author-avatar-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.dot-sep { opacity: .5; }
.portfolio-detail-body { padding: 3rem 1rem; }
.portfolio-detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; }

/* Narrative blocks */
.portfolio-narrative { display: flex; flex-direction: column; gap: 1.5rem; }
.narrative-block { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--border); border-left: 4px solid; }
.narrative-block-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.narrative-icon { font-size: 1.5rem; }
.narrative-block-header h2 { font-size: 1.15rem; font-weight: 700; }
.narrative-block p { color: var(--text-2); line-height: 1.75; white-space: pre-line; }
.narrative-problem  { border-left-color: #ef4444; }
.narrative-process  { border-left-color: #f59e0b; }
.narrative-solution { border-left-color: #10b981; }
.narrative-outcome  { border-left-color: #6366f1; }

/* Gallery */
.portfolio-gallery { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.portfolio-gallery h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: .75rem; }
.gallery-item img { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; cursor: pointer; transition: .2s; }
.gallery-item img:hover { transform: scale(1.02); }

/* Sidebar */
.portfolio-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); text-align: center; }
.sidebar-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-lt); margin-bottom: .75rem; }
.sidebar-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .25rem; }
.sidebar-location { font-size: .82rem; color: var(--text-2); margin-bottom: .5rem; }
.sidebar-bio { font-size: .83rem; color: var(--text-2); line-height: 1.5; }
.sidebar-meta { text-align: left; }
.sidebar-meta h4 { font-size: .85rem; font-weight: 700; margin-bottom: .75rem; }
.sidebar-meta dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .83rem; }
.sidebar-meta dt { color: var(--text-2); font-weight: 600; }
.sidebar-meta dd { color: var(--text); }

/* =============================================
   HIRE PAGE
   ============================================= */
.hire-grid { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; }
.hire-form-wrap { }
.hire-sidebar { }

/* =============================================
   REQUESTS FULL
   ============================================= */
.requests-list-full { display: flex; flex-direction: column; gap: 1.25rem; max-width: 780px; margin: 0 auto; }
.request-card-full { padding: 1.5rem; }
.req-info strong { display: block; font-weight: 700; }
.req-info span { font-size: .78rem; color: var(--text-2); }
.req-meta { display: flex; gap: 1.25rem; font-size: .82rem; color: var(--text-2); margin: .5rem 0 .75rem; }

/* =============================================
   PROFILE EDIT
   ============================================= */
.avatar-upload { display: flex; align-items: center; gap: 1.5rem; }
.profile-avatar-preview { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-lt); flex-shrink: 0; }

/* =============================================
   EMPTY STATES
   ============================================= */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .4rem; }
.empty-state p { color: var(--text-2); margin-bottom: 1.5rem; }

/* =============================================
   FOOTER
   ============================================= */
.footer { background: var(--text); color: rgba(255,255,255,.7); padding: 3rem 0 2rem; margin-top: 4rem; }
.footer-inner { display: flex; align-items: flex-start; gap: 3rem; flex-wrap: wrap; }
.footer-brand .brand-icon { color: var(--primary); }
.footer-brand strong { color: #fff; font-size: 1.1rem; }
.footer-brand p { font-size: .85rem; margin-top: .5rem; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { color: rgba(255,255,255,.6); font-size: .88rem; transition: .15s; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-copy { margin-left: auto; font-size: .78rem; opacity: .5; align-self: flex-end; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .hero-title { font-size: 2.25rem; }
    .steps-grid { grid-template-columns: 1fr 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
    .portfolio-detail-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .hire-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .profile-hero-inner { flex-direction: column; }
    .profile-hero-action { width: 100%; }
}

@media (max-width: 600px) {
    .steps-grid { grid-template-columns: 1fr; }
    .nav-links { gap: .25rem; }
    .nav-name { display: none; }
    .hero-title { font-size: 1.85rem; }
    .dash-profile { flex-direction: column; }
    .dash-actions { align-items: flex-start; }
    .stats-row { grid-template-columns: 1fr 1fr; }
}
