/* ============================================================
   СТУДФОЛИО — Complete Production Stylesheet
   Multi-user student portfolio platform
   ============================================================ */

/* ---- Theme Variables ---- */
[data-theme="light"] {
    --bg-primary: #f0f4ff;
    --bg-secondary: #e8eeff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8faff;
    --accent-primary: #3b82f6;
    --accent-secondary: #6366f1;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #6366f1);
    --accent-gradient-rev: linear-gradient(135deg, #6366f1, #3b82f6);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    --shadow-accent: 0 4px 20px rgba(59,130,246,0.15);
    --navbar-bg: rgba(240,244,255,0.85);
    --navbar-scrolled: rgba(255,255,255,0.95);
    --input-bg: #ffffff;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --info: #3b82f6;
    --overlay: rgba(0,0,0,0.5);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #253348;
    --accent-primary: #60a5fa;
    --accent-secondary: #818cf8;
    --accent-gradient: linear-gradient(135deg, #60a5fa, #818cf8);
    --accent-gradient-rev: linear-gradient(135deg, #818cf8, #60a5fa);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.2), 0 2px 4px -1px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.2);
    --shadow-accent: 0 4px 20px rgba(96,165,250,0.2);
    --navbar-bg: rgba(15,23,42,0.85);
    --navbar-scrolled: rgba(30,41,59,0.95);
    --input-bg: #0f172a;
    --danger: #f87171;
    --success: #4ade80;
    --warning: #fbbf24;
    --info: #60a5fa;
    --overlay: rgba(0,0,0,0.7);
}

/* ---- Common Variables ---- */
:root {
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
    --navbar-height: 72px;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-secondary);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-secondary); }

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition), color var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--accent-secondary); }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }

.main-content { min-height: calc(100vh - var(--navbar-height) - 200px); padding-top: var(--navbar-height); }

/* ---- Gradient Text ---- */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    line-height: 1.4;
}
.btn i { font-size: 0.9em; }

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59,130,246,0.3);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(59,130,246,0.05);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding: 8px 12px;
}
.btn-ghost:hover { color: var(--accent-primary); background: rgba(59,130,246,0.08); }

.btn-sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-xs { padding: 6px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 20px;
    transition: all var(--transition);
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    background: var(--navbar-scrolled);
    border-bottom-color: var(--border-color);
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
    gap: 16px;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo:hover { color: var(--text-primary); }
.logo-icon { color: var(--accent-primary); font-size: 1.4rem; }
.logo-text { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}
.nav-link:hover { color: var(--text-primary); background: rgba(59,130,246,0.08); }
.nav-link i { font-size: 0.95em; }

.nav-link-messages { position: relative; }
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    margin-left: 2px;
}

.nav-btn { margin-left: 4px; }

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { position: relative; }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
    z-index: 1001;
}
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.nav-dropdown-item:hover { background: rgba(59,130,246,0.08); color: var(--accent-primary); }
.nav-dropdown-item i { width: 18px; text-align: center; color: var(--text-muted); }
.nav-dropdown-item:hover i { color: var(--accent-primary); }
.nav-dropdown-divider { height: 1px; background: var(--border-color); margin: 6px 0; }
.nav-dropdown-danger { color: var(--danger); }
.nav-dropdown-danger:hover { background: rgba(239,68,68,0.08); color: var(--danger); }
.nav-dropdown-danger i { color: var(--danger); }

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.theme-toggle:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.theme-icon-light, .theme-icon-dark {
    position: absolute;
    transition: all 0.4s ease;
}
[data-theme="light"] .theme-icon-light { opacity: 1; transform: rotate(0); }
[data-theme="light"] .theme-icon-dark { opacity: 0; transform: rotate(90deg); }
[data-theme="dark"] .theme-icon-light { opacity: 0; transform: rotate(-90deg); }
[data-theme="dark"] .theme-icon-dark { opacity: 1; transform: rotate(0); }

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.hamburger {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all var(--transition);
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 2px;
    background: var(--text-primary);
    left: 0;
    transition: all var(--transition);
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }
.nav-toggle.active .hamburger { background: transparent; }
.nav-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 16px);
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
}
.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    color: var(--text-primary);
}
.toast-content { display: flex; align-items: center; gap: 10px; }
.toast-content i { font-size: 1.2rem; flex-shrink: 0; }
.toast-success .toast-content i { color: var(--success); }
.toast-error .toast-content i { color: var(--danger); }
.toast-warning .toast-content i { color: var(--warning); }
.toast-info .toast-content i { color: var(--info); }
.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: color var(--transition);
}
.toast-close:hover { color: var(--text-primary); }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   HERO — HOME PAGE
   ============================================================ */
.hero-home {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--navbar-height) + 60px) 0 80px;
    overflow: hidden;
}
.hero-home-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(99,102,241,0.1) 0%, transparent 60%);
    z-index: 0;
}
.hero-home-container { position: relative; z-index: 1; text-align: center; }
.hero-home-content { max-width: 720px; margin: 0 auto; }
.hero-home-title {
    font-size: 3rem;
    margin-bottom: 16px;
    line-height: 1.15;
}
.hero-home-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.7;
}

/* Search */
.hero-search {
    display: flex;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto 24px;
}
.hero-search-input-wrapper {
    flex: 1;
    position: relative;
}
.hero-search-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.hero-search-input {
    width: 100%;
    padding: 14px 18px 14px 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all var(--transition);
    outline: none;
}
.hero-search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.hero-search-input::placeholder { color: var(--text-muted); }

/* Filter chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all var(--transition);
    background: var(--bg-card);
}
.filter-chip:hover,
.filter-chip.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
}
.filter-chip i { font-size: 0.8em; }

/* ============================================================
   PAGE SECTION & HEADER
   ============================================================ */
.page-section { padding: 40px 0 80px; }
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}
.page-header h1 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-header h1 i { color: var(--accent-primary); }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.section-header h2 { font-size: 1.5rem; }
.results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 24px;
    transition: color var(--transition);
}
.back-link:hover { color: var(--accent-primary); }

/* ============================================================
   USERS GRID (Home page)
   ============================================================ */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.user-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.user-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}
.user-card-header {
    position: relative;
    padding: 28px 24px 0;
    text-align: center;
}
.user-card-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-primary);
    box-shadow: var(--shadow-accent);
}
.user-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-card-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}
.user-card-available {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 3px 10px;
    background: var(--success);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.user-card-body {
    padding: 16px 24px;
    text-align: center;
    flex: 1;
}
.user-card-name {
    font-size: 1.1rem;
    margin-bottom: 4px;
}
.user-card-title {
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
}
.user-card-location {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.user-card-location i { margin-right: 4px; }
.user-card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 12px;
}
.skill-badge {
    padding: 3px 10px;
    background: rgba(59,130,246,0.1);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1px solid rgba(59,130,246,0.15);
}
.user-card-stats {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.user-card-stats i { margin-right: 4px; }
.user-card-footer {
    padding: 0 24px 20px;
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}
.project-card-link { display: block; }
.project-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.project-card:hover .project-image { transform: scale(1.05); }
.project-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}
.project-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}
.project-info { padding: 20px; }
.project-title-link { text-decoration: none; color: inherit; }
.project-title-link:hover { color: var(--accent-primary); }
.project-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.project-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.85rem;
}
.project-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.project-author-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.project-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tech-tag {
    padding: 3px 10px;
    background: rgba(99,102,241,0.1);
    color: var(--accent-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1px solid rgba(99,102,241,0.15);
}
.project-card-footer, .project-card-stats {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.project-stat { display: flex; align-items: center; gap: 4px; }

/* ============================================================
   PROJECT DETAIL
   ============================================================ */
.project-detail {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.project-detail-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}
.project-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-detail-header { padding: 32px; }
.project-detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.project-detail-title-row h1 { font-size: 2rem; }
.project-detail-actions { display: flex; gap: 8px; flex-shrink: 0; }

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
}
.action-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.like-btn.active { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.08); }
.bookmark-btn.active { border-color: var(--accent-primary); color: var(--accent-primary); background: rgba(59,130,246,0.08); }

.project-detail-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.project-author-card {
    margin: 24px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}
.project-author-card-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}
.project-author-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}
.project-author-card-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-muted);
}
.project-author-card-link h4 { font-size: 1rem; margin-bottom: 2px; }
.project-author-card-link p { color: var(--text-secondary); font-size: 0.85rem; }

.project-detail-description {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.9;
}

/* Gallery */
.project-detail-gallery {
    padding: 0 32px 32px;
}
.project-detail-gallery h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.gallery-item img { width: 100%; display: block; }
.gallery-caption {
    padding: 10px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-section {
    padding: 32px;
    border-top: 1px solid var(--border-color);
}
.comments-section h2 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.comments-section h2 i { color: var(--accent-primary); }

.comment-form { margin-bottom: 28px; }
.comment-form-body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.comment-avatar, .comment-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}
.comment-avatar { object-fit: cover; }
.comment-avatar-placeholder {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
.comment-form-body textarea {
    flex: 1;
    resize: none;
    min-height: 50px;
}
.comment-submit { margin-left: auto; display: flex; }

.comment-login-prompt {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.comments-list { display: flex; flex-direction: column; gap: 20px; }
.comment {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}
.comment.reply {
    margin-left: 40px;
    background: var(--bg-primary);
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-meta { flex: 1; }
.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.comment-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 8px;
}
.comment-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}
.comment-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 0.85rem;
}
.comment-delete-btn:hover { color: var(--danger); background: rgba(239,68,68,0.08); }
.comment-reply-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 6px;
    transition: color var(--transition);
    font-family: var(--font-body);
}
.comment-reply-btn:hover { color: var(--accent-primary); }
.comment-replies { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.comments-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-section { padding: 40px 0 80px; }
.profile-header {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 28px;
}
.profile-cover {
    height: 160px;
    background: var(--accent-gradient);
    position: relative;
}
.profile-header-content {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 28px 24px;
    margin-top: -50px;
    position: relative;
    flex-wrap: wrap;
}
.profile-avatar-wrapper { position: relative; flex-shrink: 0; }
.profile-avatar, .profile-avatar-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow);
}
.profile-avatar { object-fit: cover; }
.profile-avatar-placeholder {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}
.availability-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 3px 10px;
    background: var(--success);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-card);
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 1.6rem; margin-bottom: 4px; }
.profile-title { color: var(--accent-primary); font-weight: 500; margin-bottom: 4px; }
.profile-location { color: var(--text-muted); font-size: 0.9rem; }
.profile-location i { margin-right: 4px; }
.profile-actions { flex-shrink: 0; }

/* Profile Grid */
.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}
.profile-sidebar { display: flex; flex-direction: column; gap: 20px; }
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}
.profile-card h3 {
    font-size: 1.05rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.profile-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

.profile-contacts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.profile-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition);
}
.profile-contact-item:hover { color: var(--accent-primary); }
.profile-contact-item i { width: 18px; text-align: center; color: var(--accent-primary); }
.profile-socials { display: flex; gap: 10px; }
.social-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all var(--transition);
}
.social-link:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
}

/* Skills in sidebar */
.skills-list { display: flex; flex-direction: column; gap: 12px; }
.skill-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
}
.skill-info { display: flex; align-items: center; gap: 8px; }
.skill-info i { color: var(--accent-primary); width: 18px; text-align: center; }
.skill-bar-mini {
    width: 60px;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}
.skill-bar-fill-mini {
    height: 100%;
    width: 0;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 1.5s ease;
}
.skill-pct { color: var(--text-muted); font-size: 0.8rem; min-width: 32px; text-align: right; }

/* Profile Main */
.profile-main { display: flex; flex-direction: column; gap: 28px; }
.profile-section-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}
.profile-section-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-section-title i { color: var(--accent-primary); }

.projects-grid-profile {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}
.project-card-mini {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.project-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent-primary);
    color: inherit;
}
.project-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
}
.project-card-image img { width: 100%; height: 100%; object-fit: cover; }
.project-card-placeholder {
    width: 100%; height: 100%;
    background: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--text-muted);
}
.project-card-body { padding: 14px; }
.project-card-body h4 { font-size: 0.95rem; margin-bottom: 8px; }

/* Timeline Compact */
.timeline-compact { display: flex; flex-direction: column; gap: 16px; }
.timeline-compact-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}
.timeline-compact-item:hover { border-color: var(--accent-primary); }
.timeline-compact-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.timeline-compact-icon.education {
    background: rgba(99,102,241,0.12);
    color: var(--accent-secondary);
}
.timeline-compact-icon.experience {
    background: rgba(59,130,246,0.12);
    color: var(--accent-primary);
}
.timeline-compact-content { flex: 1; }
.timeline-compact-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.education-badge { background: rgba(99,102,241,0.12); color: var(--accent-secondary); }
.experience-badge { background: rgba(59,130,246,0.12); color: var(--accent-primary); }
.timeline-compact-content h4 { font-size: 1rem; margin-bottom: 2px; }
.timeline-compact-sub { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 4px; }
.timeline-compact-date { color: var(--text-muted); font-size: 0.8rem; }
.timeline-compact-desc { color: var(--text-secondary); font-size: 0.9rem; margin-top: 6px; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-card-icon.blue { background: rgba(59,130,246,0.12); color: var(--accent-primary); }
.stat-card-icon.red { background: rgba(239,68,68,0.12); color: var(--danger); }
.stat-card-icon.green { background: rgba(34,197,94,0.12); color: var(--success); }
.stat-card-icon.purple { background: rgba(99,102,241,0.12); color: var(--accent-secondary); }
.stat-card-number { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; display: block; }
.stat-card-label { color: var(--text-muted); font-size: 0.85rem; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
}
.dashboard-card-header h2 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-card-header h2 i { color: var(--accent-primary); }
.dashboard-card-body { padding: 16px 22px; }

.dashboard-project-list { display: flex; flex-direction: column; gap: 12px; }
.dashboard-project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.dashboard-project-item:hover { background: var(--bg-secondary); }
.dashboard-project-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.dashboard-project-thumb {
    width: 48px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.dashboard-project-thumb-placeholder {
    width: 48px;
    height: 36px;
    border-radius: 6px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.dashboard-project-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-project-title:hover { color: var(--accent-primary); }
.dashboard-project-stats { display: flex; gap: 10px; color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }
.dashboard-project-actions { display: flex; gap: 4px; flex-shrink: 0; }

.dashboard-comments-list { display: flex; flex-direction: column; gap: 14px; }
.dashboard-comment-item { display: flex; gap: 12px; }
.dashboard-comment-avatar {
    width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.8rem;
}
.dashboard-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dashboard-comment-content { flex: 1; }
.dashboard-comment-author { font-size: 0.85rem; color: var(--text-secondary); }
.dashboard-comment-author span { color: var(--text-muted); }
.dashboard-comment-author a { font-weight: 600; }
.dashboard-comment-text { font-size: 0.9rem; color: var(--text-primary); margin-top: 4px; }
.dashboard-comment-date { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================================
   CHAT / MESSAGING
   ============================================================ */
.inbox-container {
    max-width: 700px;
    margin: 0 auto;
}
.conversations-list { display: flex; flex-direction: column; gap: 4px; }
.conversation-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}
.conversation-item:hover { background: var(--bg-card-hover); border-color: var(--accent-primary); color: inherit; }
.conversation-item.unread { border-left: 3px solid var(--accent-primary); }
.conversation-avatar, .conversation-avatar-placeholder {
    width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
}
.conversation-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.conversation-avatar-placeholder {
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1.2rem;
}
.conversation-content { flex: 1; min-width: 0; }
.conversation-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.conversation-name { font-size: 0.95rem; font-weight: 600; }
.conversation-time { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.conversation-preview {
    color: var(--text-secondary); font-size: 0.85rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.you-label { font-weight: 600; color: var(--text-muted); }
.conversation-badge {
    min-width: 22px; height: 22px; padding: 0 7px;
    background: var(--accent-primary); color: #fff;
    font-size: 0.75rem; font-weight: 700;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Chat view */
.chat-section {
    padding: 0;
    height: calc(100vh - var(--navbar-height));
    display: flex;
    flex-direction: column;
    padding-top: var(--navbar-height);
}
.chat-section .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    height: 100%;
    overflow: hidden;
}
.chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.chat-back {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 1rem;
    transition: all var(--transition);
}
.chat-back:hover { background: var(--bg-secondary); color: var(--accent-primary); }
.chat-user-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.chat-avatar, .chat-avatar-placeholder {
    width: 40px; height: 40px; border-radius: 50%;
}
.chat-avatar { object-fit: cover; }
.chat-avatar-placeholder {
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
}
.chat-user-info h3 { font-size: 1rem; margin-bottom: 1px; }
.chat-user-info p { color: var(--text-muted); font-size: 0.8rem; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-message {
    display: flex;
    gap: 10px;
    max-width: 75%;
    align-items: flex-end;
}
.chat-message.sent { margin-left: auto; flex-direction: row-reverse; }
.chat-message.received { margin-right: auto; }
.chat-message-avatar { flex-shrink: 0; }
.chat-message-avatar img {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
}
.chat-msg-avatar-placeholder {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.75rem;
}
.chat-message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
}
.chat-message.sent .chat-message-bubble {
    background: var(--accent-gradient);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-message.received .chat-message-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}
.chat-message-time {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}
.chat-message.received .chat-message-time { color: var(--text-muted); opacity: 1; }

.chat-input-container {
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}
.chat-input-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    resize: none;
    max-height: 120px;
    outline: none;
    transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--accent-primary); }
.chat-input::placeholder { color: var(--text-muted); }
.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all var(--transition);
}
.chat-send-btn:hover { transform: scale(1.05); box-shadow: var(--shadow-accent); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-section {
    padding: calc(var(--navbar-height) + 60px) 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.auth-card {
    max-width: 440px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}
.auth-card-wide { max-width: 640px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 50%;
    font-size: 1.4rem;
    margin-bottom: 16px;
}
.auth-header h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-header p { color: var(--text-secondary); font-size: 0.95rem; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-footer { text-align: center; margin-top: 24px; color: var(--text-secondary); font-size: 0.9rem; }
.auth-footer a { font-weight: 600; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-control,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group textarea,
.form-group select,
.search-input,
.search-select {
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all var(--transition);
    outline: none;
    width: 100%;
}
.form-control:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.form-control::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-error { color: var(--danger); font-size: 0.8rem; }
.form-hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }
.form-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.input-icon-wrapper {
    position: relative;
}
.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.input-icon-wrapper input { padding-left: 42px; }

.form-card, .form-card-page {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-bottom: 20px;
}
.form-card h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}
.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}
.avatar-preview-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    border: 2px dashed var(--border-color);
}
.current-image {
    margin-bottom: 10px;
}
.current-image-preview {
    max-width: 200px;
    border-radius: var(--radius-sm);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}
.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Search / Filters */
.search-filters { margin-bottom: 28px; }
.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.search-input { padding-left: 42px; }
.search-select { max-width: 220px; }

/* ============================================================
   CONFIRM PAGE
   ============================================================ */
.confirm-card {
    max-width: 480px;
    margin: 80px auto;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
}
.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}
.confirm-icon.danger { background: rgba(239,68,68,0.12); color: var(--danger); }
.confirm-card h1 { font-size: 1.5rem; margin-bottom: 10px; }
.confirm-card p { color: var(--text-secondary); margin-bottom: 28px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state, .empty-state-full {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state i, .empty-state-full i {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}
.empty-state h3, .empty-state-full h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.empty-state p, .empty-state-full p {
    margin-bottom: 20px;
}
.empty-state-full { grid-column: 1 / -1; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 0;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.footer-logo:hover { color: var(--text-primary); }
.footer-logo i { color: var(--accent-primary); }
.footer-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h4 { font-size: 0.95rem; margin-bottom: 6px; color: var(--text-primary); }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent-primary); }
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-accent);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(59,130,246,0.3); }

/* ============================================================
   LOADING
   ============================================================ */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 992px) {
    .hero-home-title { font-size: 2.4rem; }

    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-sidebar { order: 1; }
    .profile-main { order: 2; }

    .dashboard-grid { grid-template-columns: 1fr; }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
    :root { --navbar-height: 64px; }

    .nav-toggle { display: block; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        padding: 80px 20px 20px;
        gap: 4px;
        transition: right var(--transition);
        z-index: 999;
        border-left: 1px solid var(--border-color);
        overflow-y: auto;
    }
    .nav-menu.open { right: 0; }
    .nav-link { padding: 12px 14px; font-size: 1rem; }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
    }

    .hero-home-title { font-size: 2rem; }
    .hero-home-subtitle { font-size: 1rem; }
    .hero-search { flex-direction: column; }

    .users-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }

    .profile-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-info { text-align: center; }

    .form-row { grid-template-columns: 1fr; }

    .project-detail-title-row { flex-direction: column; }
    .project-detail-header { padding: 20px; }
    .comments-section { padding: 20px; }
    .project-detail-gallery { padding: 0 20px 20px; }

    .chat-message { max-width: 88%; }

    .stats-grid { grid-template-columns: 1fr 1fr; }

    .auth-card { padding: 28px 20px; }

    .confirm-card { margin: 40px auto; padding: 32px 24px; }
}

@media (max-width: 480px) {
    .hero-home-title { font-size: 1.7rem; }

    .stats-grid { grid-template-columns: 1fr; }

    .projects-grid-profile { grid-template-columns: 1fr; }

    .gallery-grid { grid-template-columns: 1fr; }
}
