/* ============================================
   BUFILM - Editorial Film Casting Platform
   Inspired by film magazines, Criterion, A24
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=optional');

:root {
  /* Greyscale palette */
  --white: #ffffff;
  --off-white: #fafafa;
  --cream: #f5f5f5;
  --light-gray: #e5e5e5;
  --mid-gray: #a3a3a3;
  --dark-gray: #737373;
  --charcoal: #404040;
  --black: #171717;

  /* Red accent - Primary brand color */
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-light: #fef2f2;
  --red-lighter: #fee2e2;

  /* Keep red as the accent */
  --accent: #dc2626;
  --accent-dark: #b91c1c;
  --accent-light: #fef2f2;

  /* Functional - greyscale based */
  --success: #404040;
  --success-light: #f5f5f5;
  --warning: #737373;
  --warning-light: #fafafa;
  --border: #e5e5e5;

  /* Typography - Modern complementary fonts */
  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;

  /* Border radius - Modern rounded */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows - Soft & Modern */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--light-gray);
  background: var(--black);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--red);
  color: var(--white);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   TYPOGRAPHY - The Soul of Editorial Design
   ============================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 800;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  max-width: 100%;
}

.page-header p,
.project-description,
.role-description,
.card-body p {
  max-width: 100%;
}

/* ============================================
   LAYOUT - Fluid & Responsive
   ============================================ */

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}

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

.container-full {
  max-width: 100%;
  padding: 0 clamp(24px, 5vw, 80px);
}

/* Ensure main content stretches */
main.container {
  width: 100%;
  max-width: 100%;
  padding-bottom: var(--space-2xl);
}

/* ============================================
   HEADER - Clean, Authoritative
   ============================================ */

header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(23, 23, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 18px;
  width: auto;
  display: block;
  transition: opacity 0.2s;
}

.logo:hover img {
  opacity: 0.8;
}

nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

nav a {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--light-gray);
  transition: color 0.2s;
  white-space: nowrap;
}

nav a:hover {
  color: var(--white);
}

/* Nav auth/user containers - prevent flash on tab clicks */
#nav-auth {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

#nav-auth .btn {
  padding: 8px 16px;
  font-size: 0.8rem;
  border: 1.5px solid transparent;
}

#nav-auth .btn-secondary {
  border-color: rgba(255, 255, 255, 0.3);
}

#nav-auth .btn-primary {
  border-color: var(--red);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-user span {
  color: var(--mid-gray);
}

#user-name {
  font-weight: 600;
  color: var(--white);
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.user-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-dropdown-toggle::after {
  content: '';
  border: 4px solid transparent;
  border-top-color: var(--dark-gray);
  margin-top: 2px;
}

.user-dropdown.open .user-dropdown-toggle::after {
  border-top-color: transparent;
  border-bottom-color: var(--dark-gray);
  margin-top: -4px;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-xs);
  min-width: 180px;
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 200;
}

.user-dropdown.open .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-menu a {
  display: block;
  padding: 12px var(--space-lg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--light-gray);
  transition: background 0.15s, color 0.15s;
}

.user-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--red);
}

.user-dropdown-menu a:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.user-dropdown-menu a:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-xs) 0;
}

.user-dropdown-menu a.logout-link {
  color: var(--red);
}

.user-dropdown-menu a.logout-link:hover {
  background: var(--red-light);
}

/* ============================================
   BUTTONS - Refined, Not Flashy
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--red-dark);
  color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-success {
  background: var(--black);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  background: var(--charcoal);
  color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.15);
  color: var(--red);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: var(--light-gray);
}

.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(220, 38, 38, 0.1);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 0.9rem;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

/* ============================================
   FORMS - Clean & Functional
   ============================================ */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light-gray);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background: var(--charcoal);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control::placeholder {
  color: var(--mid-gray);
}

.form-control:hover {
  border-color: var(--mid-gray);
}

.form-control:focus {
  outline: none;
  border-color: var(--black);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='%234a4a4a'%3E%3Cpath d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.form-section-divider {
  display: flex;
  align-items: center;
  margin: var(--space-xl) 0 var(--space-md);
  gap: var(--space-md);
}

.form-section-divider::before,
.form-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.form-section-divider span {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light-gray);
  white-space: nowrap;
}

/* ============================================
   PAGE HEADER - Editorial Statement
   ============================================ */

.page-header {
  padding: var(--space-lg) 0 var(--space-md);
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  font-size: 1.125rem;
  color: var(--light-gray);
  font-weight: 300;
}

.page-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

/* Profile Page Header with Avatar */
.profile-page-header {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.profile-header-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--charcoal);
  border: 3px solid rgba(255, 255, 255, 0.15);
  transition: border-color 0.2s;
}

.profile-header-avatar:hover {
  border-color: var(--red);
}

.profile-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 600;
  color: var(--light-gray);
  background: var(--charcoal);
  text-transform: uppercase;
}

.profile-header-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.profile-header-avatar:hover .profile-header-avatar-overlay {
  opacity: 1;
}

.profile-header-avatar-overlay span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-header-text {
  flex: 1;
}

.profile-header-text h1 {
  margin-bottom: var(--space-sm);
}

.profile-header-text p {
  font-size: 1.125rem;
  color: var(--light-gray);
  font-weight: 300;
  margin: 0;
}

.profile-header-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-end;
  flex-shrink: 0;
}

.profile-header-stats {
  display: flex;
  gap: var(--space-xl);
  padding-left: var(--space-xl);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: auto;
}

.profile-header-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 70px;
}

.profile-header-stat .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.profile-header-stat .stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--light-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Crop Modal Styles */
.crop-container {
  width: 100%;
  max-height: 400px;
  background: var(--black);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.crop-container img {
  display: block;
  max-width: 100%;
}

/* Cropper.js overrides for dark theme */
.cropper-view-box,
.cropper-face {
  border-radius: 50%;
}

.cropper-view-box {
  outline: 2px solid var(--red);
  outline-color: rgba(229, 62, 62, 0.75);
}

.cropper-line {
  background-color: var(--red);
}

.cropper-point {
  background-color: var(--red);
}

.cropper-modal {
  background-color: rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
  .profile-page-header {
    flex-direction: column;
    text-align: center;
    gap: var(--space-lg);
  }

  .profile-header-avatar {
    width: 100px;
    height: 100px;
  }

  .profile-header-avatar-placeholder {
    font-size: 2.5rem;
  }

  .profile-header-stats {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    justify-content: center;
  }

  .profile-header-stat .stat-value {
    font-size: 1.5rem;
  }
}

/* ============================================
   FILTERS - Minimal
   ============================================ */

.category-tabs {
  display: flex;
  gap: 8px;
  padding: var(--space-md) 0 0;
}

.cat-tab {
  padding: 8px 20px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: var(--mid-gray);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.cat-tab:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.cat-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.filters-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-lg);
}

.filters-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--light-gray);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.filters-toggle:hover,
.filters-toggle-open {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.filters-toggle-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s;
  display: inline-block;
}

.filters-toggle-open .filters-toggle-arrow {
  transform: rotate(180deg);
}

.filters-active-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--red);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.filters {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.25s ease, margin 0.25s ease;
  max-height: 400px;
  opacity: 1;
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
  width: 100%;
}

.filters.filters-collapsed {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}

.filters-row {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  align-items: flex-end;
  width: 100%;
}

.filter-group {
  flex: 1 1 200px;
  min-width: 150px;
}

.filter-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mid-gray);
}

.filter-group select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--white);
  background: var(--charcoal);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='%23a3a3a3'%3E%3Cpath d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.2s, box-shadow 0.2s;
  padding-right: 40px;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--black);
}

/* ============================================
   PROJECT CARDS - Magazine Layout
   ============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: var(--space-lg);
  padding: var(--space-lg) 0 var(--space-2xl);
  width: 100%;
}

.project-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--charcoal);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--mid-gray);
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.project-card:hover .project-card-banner img {
  transform: scale(1.05);
}

.project-card-banner {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--black) 100%);
}

.project-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card-banner-overlay {
  display: none;
}

.project-card-banner-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--black) 100%);
}

.project-card-banner-icon {
  font-size: 3rem;
  opacity: 0.4;
}

.project-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.project-card-top h3 {
  margin-bottom: 0;
}

.project-posted-date {
  font-size: 0.75rem;
  color: var(--dark-gray);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.project-card h3 a {
  color: var(--white);
  transition: color 0.2s;
}

.project-card h3 a:hover {
  color: var(--red);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  align-items: center;
}

.project-meta > span:last-child:not(.badge) {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--mid-gray);
}

/* Project detail page meta badges */
.project-header .project-meta {
  gap: var(--space-md);
}

.project-header .project-meta .badge {
  padding: 8px 16px;
  font-size: 0.75rem;
}

.project-description {
  font-size: 0.9rem;
  color: var(--white);
  line-height: 1.5;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Project Roles Display */
.project-roles {
  margin-top: auto;
  padding-top: var(--space-md);
}

.project-roles-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mid-gray);
  margin-bottom: var(--space-sm);
}

.project-roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.role-tag {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--light-gray);
  text-decoration: none;
  transition: all 0.15s ease;
}

.role-tag:hover {
  border-color: var(--red);
  color: var(--red);
}

.role-tag-name {
  display: inline;
}

.role-tag-details {
  display: none;
}

.role-tag-type,
.role-tag-gender {
  display: none;
}

.role-tag-more {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--mid-gray);
  padding: 5px 12px;
  text-decoration: none;
  transition: color 0.15s;
}

.role-tag-more:hover {
  color: var(--red);
}

.card-roles-section {
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card-roles-more {
  font-size: 0.75rem;
  color: var(--dark-gray);
  margin-top: var(--space-xs);
}

.card-roles-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark-gray);
  margin-bottom: var(--space-xs);
}

.card-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--charcoal);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
}

.card-role-info {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: var(--space-sm);
  min-width: 0;
  overflow: hidden;
}

.card-role-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-role-details {
  font-size: 0.8rem;
  color: var(--mid-gray);
}

/* ============================================
   BADGES - Understated Labels
   ============================================ */

.badge {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
}

.badge-genre,
.badge-type,
.badge-compensation {
  background: rgba(255, 255, 255, 0.08);
  color: var(--light-gray);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-pending {
  background: rgba(234, 179, 8, 0.25);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.badge-accepted {
  background: rgba(34, 197, 94, 0.25);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-rejected {
  background: rgba(220, 38, 38, 0.25);
  color: #ef4444;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.badge-shortlisted {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* ============================================
   CARDS - Simple Containers
   ============================================ */

.card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--charcoal);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light-gray);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.card-header-row h2 {
  margin: 0;
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  background: var(--off-white);
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
}

.card-actions {
  display: flex;
  gap: var(--space-md);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .card-row {
    flex-direction: column;
  }
  .card-actions {
    width: 100%;
  }
  .card-actions .btn {
    flex: 1;
  }
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-container {
  max-width: min(420px, calc(100vw - 32px));
  margin: var(--space-2xl) auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

.auth-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-xl);
  background: var(--charcoal);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  text-align: center;
  margin-bottom: var(--space-xl);
  font-size: 2rem;
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  color: var(--mid-gray);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--red);
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ============================================
   PROJECT DETAIL - Two Column Layout
   ============================================ */

.project-detail {
  padding: var(--space-xl) 0 var(--space-2xl);
  max-width: 1400px;
  margin: 0 auto;
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

@media (min-width: 1200px) {
  .project-detail {
    padding-left: 80px;
    padding-right: 80px;
  }
}

@media (min-width: 1600px) {
  .project-detail {
    padding-left: 120px;
    padding-right: 120px;
  }
}

.project-detail .back-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark-gray);
  margin-bottom: var(--space-lg);
  transition: color 0.2s;
}

.project-detail .back-link:hover {
  color: var(--red);
}

/* Two Column Layout */
.project-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 1024px) {
  .project-layout {
    grid-template-columns: 1fr 400px;
    gap: var(--space-2xl);
  }
}

@media (min-width: 1200px) {
  .project-layout {
    grid-template-columns: 1fr 450px;
    gap: 80px;
  }
}

/* Left Column - Project Details */
.project-left {
  min-width: 0;
}

.project-banner {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.project-title-section {
  margin-bottom: var(--space-xl);
}

.project-title-section h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.project-badges {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.project-badges .badge {
  font-size: 0.7rem;
  padding: 4px 10px;
}

.project-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* Meta Grid - Compact */
.project-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-xl);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid-gray);
}

.meta-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
}

.meta-value a {
  color: var(--red);
}

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

.dates-updated-indicator {
  color: var(--red);
  font-weight: 700;
  cursor: help;
}

/* Synopsis - directly below title */
.project-description-section {
  margin-bottom: var(--space-lg);
}

.project-description-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--white);
  margin: var(--space-xs) 0 0 0;
}

.script-button-wrapper {
  margin-bottom: var(--space-xl);
}

.script-link {
  display: inline-block;
  margin-top: var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red);
}

.script-link:hover {
  text-decoration: underline;
}

/* Team Section - Compact */
.project-team h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light-gray);
  margin-bottom: var(--space-md);
}

.team-member {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.team-member + .team-member {
  border-top: 1px solid var(--border);
}

.team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-avatar span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-gray);
}

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

.team-info a {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
}

.team-info a:hover {
  color: var(--red);
}

.team-info span {
  font-size: 0.75rem;
  color: var(--mid-gray);
}

.btn-icon {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  color: var(--light-gray);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(220, 38, 38, 0.15);
}

.no-team, .no-roles {
  font-size: 0.85rem;
  color: var(--mid-gray);
  padding: var(--space-md) 0;
}

.loading-text {
  font-size: 0.85rem;
  color: var(--mid-gray);
}

/* Right Column - Roles */
.project-right {
  min-width: 0;
}

@media (min-width: 1024px) {
  .project-right {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}

/* Roles Section - Subtle Dark Background */
.roles-box {
  background: rgba(255, 255, 255, 0.05);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}

.roles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.roles-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.roles-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin: 0;
}

.role-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: #22c55e;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-left: var(--space-xs);
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.role-count.empty {
  background: var(--dark-gray);
  color: var(--mid-gray);
}

.roles-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.roles-filters select {
  flex: 1;
  padding: 10px 32px 10px 12px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  background: var(--charcoal);
  color: var(--white);
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a3a3a3' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.roles-filters select:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.roles-filters select:focus {
  border-color: var(--white);
  outline: none;
}

.roles-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Compact Role Cards */
.role-card-compact {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--charcoal);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.role-card-compact:hover {
  border-color: var(--mid-gray);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.role-card-compact.role-closed {
  opacity: 0.5;
  background: var(--black);
}

.role-card-compact.role-highlighted {
  animation: roleHighlight 2s ease;
}

@keyframes roleHighlight {
  0% {
    background: var(--charcoal);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
  15% {
    background: rgba(220, 38, 38, 0.15);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.3);
    border-color: var(--red);
  }
  85% {
    background: rgba(220, 38, 38, 0.1);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
    border-color: var(--red);
  }
  100% {
    background: var(--charcoal);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-color: transparent;
  }
}

.role-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.role-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}

.role-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-sm);
}

.role-tag-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--light-gray);
}

.role-tag-crew {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* Role category toggle in modal */
.role-category-toggle {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.role-cat-btn {
  flex: 1;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--mid-gray);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.role-cat-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.role-cat-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.role-card-app-reqs {
  font-size: 0.85rem;
  color: var(--mid-gray);
  margin-bottom: var(--space-sm);
}

.role-card-requirements {
  font-size: 0.75rem;
  color: var(--dark-gray);
  font-style: italic;
  margin: 0;
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.role-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.role-card-info {
  min-width: 0;
  flex: 1;
}

.role-type-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}

.role-type-badge.lead {
  background: var(--red);
  color: var(--white);
}

.role-type-badge.supporting {
  background: var(--charcoal);
  color: var(--white);
}

.role-type-badge.extra {
  background: var(--light-gray);
  color: var(--light-gray);
}

.role-card-compact h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--white);
  line-height: 1.3;
}

.role-card-desc {
  font-size: 0.9rem;
  color: var(--light-gray);
  line-height: 1.6;
  margin: 0 0 var(--space-sm) 0;
}

.role-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  color: var(--mid-gray);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.role-card-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.role-card-meta .app-count {
  color: var(--red);
  font-weight: 600;
}

.role-card-req {
  font-size: 0.85rem;
  color: var(--light-gray);
  background: var(--black);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  margin-top: var(--space-sm);
  line-height: 1.5;
}

.role-card-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.role-card-top > .btn {
  flex-shrink: 0;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 0.7rem;
}

/* Scrollbar for roles panel */
.project-right::-webkit-scrollbar {
  width: 4px;
}

.project-right::-webkit-scrollbar-track {
  background: transparent;
}

.project-right::-webkit-scrollbar-thumb {
  background: var(--light-gray);
  border-radius: 2px;
}

.project-right::-webkit-scrollbar-thumb:hover {
  background: var(--mid-gray);
}

/* Legacy role card styles (for browse page) */
.role-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-xl);
  background: var(--charcoal);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.role-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.role-header h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.role-badges {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.role-description {
  color: var(--dark-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.role-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  font-size: 0.85rem;
  color: var(--mid-gray);
  margin-bottom: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.role-requirements {
  font-size: 0.9rem;
  color: var(--dark-gray);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--cream);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--charcoal);
}

.role-requirements strong {
  color: var(--light-gray);
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding-top: var(--space-md);
}

/* Team Section */
#team-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

#team-section h2 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xl);
}

#team-list {
  display: grid;
  gap: var(--space-md);
}

#team-list .review-card {
  padding: var(--space-lg);
}

#team-list .review-header {
  margin-bottom: 0;
}

/* ============================================
   APPLICATIONS
   ============================================ */

.applications-list {
  margin-top: var(--space-md);
}

/* Application Cards - Grid Style */
.app-card {
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.app-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.app-card:hover .app-card-img {
  transform: scale(1.06);
}

.app-card-banner {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1e1e 0%, var(--black) 100%);
  flex-shrink: 0;
}

.app-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.app-card-banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.2;
}

.app-card-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(transparent, #2a2a2a);
  pointer-events: none;
}

.app-card-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.app-card-body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-card-role-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-gray);
  margin-bottom: 6px;
}

.app-card-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.app-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: var(--white);
}

.app-card-title a {
  color: inherit;
  transition: color 0.2s;
}

.app-card-title a:hover {
  color: var(--red);
}

.app-card-film {
  font-size: 0.85rem;
  color: var(--mid-gray);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 5px;
}

.app-card-film-in {
  font-style: italic;
  color: var(--dark-gray);
}

.app-card-film-name {
  color: var(--light-gray);
  font-weight: 500;
}

.app-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.app-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-card-date {
  font-size: 0.75rem;
  color: var(--dark-gray);
  letter-spacing: 0.02em;
}

.app-card-actions {
  display: flex;
  gap: var(--space-sm);
}

.application-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--charcoal);
  border-radius: var(--radius-md);
}

.application-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.application-meta {
  font-size: 0.85rem;
  color: var(--mid-gray);
  margin-top: 4px;
}

.application-contact {
  font-size: 0.85rem;
  color: var(--light-gray);
  margin-top: 4px;
  padding: 6px 10px;
  background: rgba(34, 197, 94, 0.15);
  border-radius: var(--radius-sm);
  display: inline-block;
}

.cover-letter-preview {
  margin: var(--space-md) 0;
  color: var(--dark-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   APPLICATION DETAIL PAGE
   ============================================ */

.apd-back {
  display: inline-block;
  color: var(--mid-gray);
  font-size: 0.875rem;
  margin-bottom: var(--space-lg);
  transition: color 0.2s;
}

.apd-back:hover {
  color: var(--white);
}

.apd {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.apd-hero {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.apd-hero-top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.apd-hero-date {
  font-size: 0.8rem;
  color: var(--dark-gray);
}

.apd-hero-role {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.apd-hero-type {
  font-weight: 400;
  color: var(--mid-gray);
  font-size: 1.4rem;
}

.apd-hero-project {
  font-size: 0.95rem;
  color: var(--mid-gray);
  transition: color 0.2s;
}

.apd-hero-project:hover {
  color: var(--white);
}

.apd-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 500px;
}

.apd-main {
  padding: var(--space-xl);
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.apd-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.apd-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.apd-meta-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dark-gray);
}

.apd-meta-value {
  font-size: 0.95rem;
  color: var(--light-gray);
  font-weight: 500;
}

.apd-meta-value a {
  color: var(--light-gray);
  transition: color 0.2s;
}

.apd-meta-value a:hover {
  color: var(--white);
}

.apd-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.apd-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dark-gray);
  margin: 0;
}

.apd-section-text {
  font-size: 0.95rem;
  color: var(--light-gray);
  line-height: 1.7;
  margin: 0;
}

.apd-decision-btns {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.apd-hero-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  padding: var(--space-xl);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.apd-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.apd-sidebar {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  background: #242424;
  border-left: 1px solid rgba(255,255,255,0.07);
}

@media (max-width: 768px) {
  .apd-body {
    grid-template-columns: 1fr;
  }

  .apd-main {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  .apd-hero {
    padding: var(--space-lg);
  }

  .apd-hero-role {
    font-size: 1.5rem;
  }
}

/* ============================================
   MESSAGES
   ============================================ */

.messages-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.messages-section h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark-gray);
  margin-bottom: var(--space-md);
}

.messages-list {
  margin-bottom: var(--space-md);
  max-height: 400px;
  overflow-y: auto;
}

.message {
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  background: var(--off-white);
  border: 1px solid var(--border);
}

.message-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--mid-gray);
  margin-bottom: var(--space-sm);
}

.message-header strong {
  color: var(--white);
}

.message p {
  font-size: 0.95rem;
  color: var(--light-gray);
}

.message-form {
  display: flex;
  gap: var(--space-sm);
}

.message-form input {
  flex: 1;
}

/* ============================================
   DASHBOARD STATS
   ============================================ */

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  overflow: hidden;
}

.stat-card {
  background: var(--white);
  padding: var(--space-lg);
  text-align: center;
}

.stat-card h3 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mid-gray);
  margin-bottom: var(--space-sm);
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--white);
}

/* ============================================
   MY PROJECTS PAGE
   ============================================ */

.my-projects-page {
  padding-bottom: var(--space-2xl);
}

.my-projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.my-projects-title h1 {
  margin-bottom: var(--space-xs);
}

.my-projects-title p {
  color: var(--dark-gray);
  font-size: 0.95rem;
}

.my-project-stats {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  margin: var(--space-md) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.my-project-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.my-project-stat .stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.my-project-stat .stat-num.has-open {
  color: #16a34a;
}

.my-project-stat .stat-num.has-pending {
  color: var(--red);
}

.my-project-stat .stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mid-gray);
}

.my-project-actions {
  display: flex;
  gap: var(--space-xs);
}

.pending-apps-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Status Select Dropdown */
.status-select {
  padding: 4px 24px 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all 0.15s ease;
}

.status-select:hover {
  opacity: 0.85;
}

.status-select:focus {
  outline: 2px solid var(--charcoal);
  outline-offset: 1px;
}

.status-select.status-open {
  background-color: #dcfce7;
  color: #166534;
}

.status-select.status-closed {
  background-color: #fee2e2;
  color: #991b1b;
}

.status-select.status-completed {
  background-color: var(--cream);
  color: var(--light-gray);
}

/* Edit Notice */
.edit-notice {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.edit-notice-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.edit-notice-content strong {
  color: #92400e;
  font-size: 0.9rem;
}

.edit-notice-content p {
  color: #a16207;
  font-size: 0.85rem;
  margin: 0;
}

.edit-notice-content .btn {
  align-self: flex-start;
  margin-top: var(--space-sm);
}

/* Dates Updated Notice */
.dates-updated-notice {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8rem;
  color: var(--mid-gray);
  margin-bottom: var(--space-lg);
}

.dates-updated-notice span {
  font-style: italic;
}

/* Notifications Section */
.notifications-section {
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  overflow: hidden;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}

.notifications-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.notifications-list {
  padding: 0;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item.unread {
  background: #fef3c7;
}

.notification-item.read {
  opacity: 0.7;
}

.notification-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-content p {
  margin: 0 0 4px 0;
  font-size: 0.9rem;
  color: var(--light-gray);
}

.notification-time {
  font-size: 0.75rem;
  color: var(--mid-gray);
}

.notification-dismiss {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--mid-gray);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

.notification-dismiss:hover {
  color: var(--red);
}

@media (max-width: 600px) {
  .my-projects-header {
    flex-direction: column;
    align-items: stretch;
  }

  .my-projects-header .btn {
    text-align: center;
  }

  .my-project-stats {
    justify-content: space-around;
  }

  .my-project-actions {
    width: 100%;
  }

  .my-project-actions .btn {
    flex: 1;
  }
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--light-gray);
  grid-column: 1 / -1;
}

.empty-state h3 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-sm);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  border: 1px solid;
  border-radius: var(--radius-md);
}

.alert-error {
  background: var(--red-light);
  border-color: #fecaca;
  color: var(--red-dark);
}

.alert-success {
  background: var(--success-light);
  border-color: #a7f3d0;
  color: #065f46;
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-lg);
}

.modal {
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  max-width: min(520px, calc(100vw - 32px));
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: var(--space-lg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--mid-gray);
  transition: all 0.2s;
}

.modal-close:hover {
  border-color: var(--white);
  color: var(--white);
}

.modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  max-height: calc(85vh - 140px);
}

.modal-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  background: var(--charcoal);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--light-gray); font-size: 0.8rem; margin-top: var(--space-xs); }

.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
  cursor: pointer;
}

.form-check label {
  font-size: 0.9rem;
  color: var(--light-gray);
  cursor: pointer;
}

.mt-2 {
  margin-top: var(--space-sm);
}

/* Spacing utilities */
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.pt-1 { padding-top: var(--space-sm); }
.pt-2 { padding-top: var(--space-md); }
.pt-3 { padding-top: var(--space-lg); }
.pb-1 { padding-bottom: var(--space-sm); }
.pb-2 { padding-bottom: var(--space-md); }
.pb-3 { padding-bottom: var(--space-lg); }

/* Form actions */
.form-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .form-actions {
    flex-direction: column;
  }
  .form-actions .btn {
    width: 100%;
  }
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--off-white);
}

::-webkit-scrollbar-thumb {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--mid-gray);
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

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

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--light-gray);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  gap: var(--space-md);
  color: var(--mid-gray);
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-title {
  height: 1.5em;
  width: 70%;
  margin-bottom: 1em;
}

.skeleton-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-lg);
  background: var(--charcoal);
  border-radius: var(--radius-lg);
}

/* Content transitions */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

.fade-in-up {
  animation: fadeInUp 0.5s ease-out;
}

/* Staggered animations for lists */
.stagger-item {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }

/* ============================================
   ENHANCED BUTTON INTERACTIONS
   ============================================ */

.btn:active {
  transform: scale(0.98);
}

.btn:disabled,
.btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.loading {
  position: relative;
}

.btn.loading .btn-text {
  visibility: hidden;
}

.btn.loading::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   ENHANCED CARD INTERACTIONS
   ============================================ */


.card {
  transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* ============================================
   GRID UTILITIES (for responsive layouts)
   ============================================ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-2-responsive {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

/* ============================================
   ENHANCED ALERTS
   ============================================ */

.alert {
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  color: inherit;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
}

.alert-close:hover {
  opacity: 1;
}

.alert.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* Toast notifications (fixed position) */
.toast-container {
  position: fixed;
  top: 100px;
  right: var(--space-lg);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 400px;
}

.toast {
  padding: var(--space-md) var(--space-lg);
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--white);
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-error {
  border-left: 3px solid var(--red);
}

/* ============================================
   ENHANCED MODAL
   ============================================ */

.modal-overlay {
  animation: fadeIn 0.2s ease-out;
}

.modal {
  animation: fadeInUp 0.3s ease-out;
}

.modal-overlay.closing {
  animation: fadeOut 0.2s ease-out forwards;
}

.modal-overlay.closing .modal {
  animation: fadeOut 0.2s ease-out forwards;
}

/* ============================================
   FORM FOCUS STATES
   ============================================ */

.form-control:focus {
  outline: none;
  border-color: var(--light-gray);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* ============================================
   RESPONSIVE - Mobile First, Scales to Any Screen
   ============================================ */

/* Extra large screens (1920px+) */
@media (min-width: 1920px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--space-xl);
  }

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

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

/* Large screens (1400px+) */
@media (min-width: 1400px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  }
}

/* Medium-large screens */
@media (min-width: 1024px) and (max-width: 1399px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

/* Tablet */
@media (max-width: 1023px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    height: auto;
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-md);
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-header {
    padding: var(--space-xl) 0;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .filters-row {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .page-header-actions {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
  }

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

  .role-header {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .role-badges {
    order: -1;
  }

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

  .auth-card {
    padding: var(--space-lg);
  }

  .grid-2-responsive {
    grid-template-columns: 1fr;
  }

  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    max-width: none;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

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

  .profile-meta {
    justify-content: center;
    flex-wrap: wrap;
  }

  .profile-avatar img,
  .profile-avatar-placeholder {
    width: 140px;
    height: 140px;
  }

  /* Project Detail Mobile */
  .project-detail {
    padding: var(--space-md) var(--space-md) var(--space-xl);
  }

  .project-layout {
    gap: var(--space-xl);
  }

  .project-banner {
    max-height: 220px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
  }

  .project-title-section h1 {
    font-size: 1.5rem;
  }

  .project-synopsis p {
    font-size: 0.95rem;
  }

  .project-meta-grid {
    gap: var(--space-md) var(--space-lg);
  }

  .roles-box {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  .roles-header {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .roles-filters {
    flex-direction: column;
  }

  .role-card-compact {
    padding: var(--space-md);
  }

  .role-card-top {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .role-card-actions {
    width: 100%;
  }

  .role-card-actions .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .project-meta-grid {
    flex-direction: column;
    gap: var(--space-md);
  }

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

  .role-actions {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .role-actions .btn {
    width: 100%;
  }

  .card-actions {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .card-actions .btn {
    width: 100%;
  }

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

  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

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

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

  .role-type-selector {
    gap: var(--space-xs);
  }

  .role-type-option label {
    padding: 6px 12px;
    font-size: 0.7rem;
  }
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  margin-top: auto;
  padding: var(--space-xl) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--black);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--mid-gray);
}

.footer-content a {
  color: var(--dark-gray);
  transition: color 0.2s;
}

.footer-content a:hover {
  color: var(--red);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
}

@media (max-width: 480px) {
  .footer-content {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* Ensure body fills viewport for footer positioning */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ============================================
   PROFILE PAGE - Enhanced
   ============================================ */

.profile-header {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);
}

.profile-avatar {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.profile-avatar-placeholder {
  width: 180px;
  height: 180px;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 600;
  color: var(--light-gray);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
}

.profile-avatar-upload {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: var(--space-sm);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.profile-avatar:hover .profile-avatar-upload {
  opacity: 1;
}

.profile-info {
  flex: 1;
}

.profile-info h1 {
  margin-bottom: var(--space-sm);
}

.profile-info .role-types {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.profile-bio {
  color: var(--dark-gray);
  margin-bottom: var(--space-md);
}

.profile-meta {
  display: flex;
  gap: var(--space-xl);
  font-size: 0.9rem;
  color: var(--mid-gray);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Role Type Badges */
.role-type-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-full);
}

.role-type-badge.actor { background: var(--red); }
.role-type-badge.director { background: var(--black); }
.role-type-badge.writer { background: var(--charcoal); }
.role-type-badge.cinematographer { background: var(--dark-gray); }
.role-type-badge.producer { background: var(--black); }
.role-type-badge.editor { background: var(--charcoal); }
.role-type-badge.singer { background: var(--red); }
.role-type-badge.composer { background: var(--dark-gray); }

/* Role Type Selector */
.role-type-selector {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.role-type-option {
  position: relative;
}

.role-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-type-option label {
  display: inline-block;
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--charcoal);
  color: var(--light-gray);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.role-type-option input:checked + label {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.role-type-option label:hover {
  border-color: var(--light-gray);
}

/* Profile Sections */
.profile-section {
  margin-bottom: var(--space-xl);
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.profile-section-header h2 {
  font-size: 1.25rem;
}

/* Rating System */
.rating-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  color: var(--light-gray);
  font-size: 1.25rem;
}

.star.filled {
  color: var(--red);
}

.rating-count {
  font-size: 0.85rem;
  color: var(--light-gray);
}

.rating-input {
  display: flex;
  gap: 4px;
}

.rating-input .star {
  cursor: pointer;
  transition: color 0.2s;
}

.rating-input .star:hover,
.rating-input .star.hover {
  color: var(--red);
}

/* Reviews */
.review-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--charcoal);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.review-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.review-author img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.review-meta {
  font-size: 0.85rem;
  color: var(--light-gray);
}

.review-project {
  font-size: 0.85rem;
  color: var(--light-gray);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

/* Past Projects Grid */
.past-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--space-lg);
  width: 100%;
}

.past-project-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--charcoal);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  overflow: hidden;
}

.past-project-card:hover {
  border-color: var(--mid-gray);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.past-project-card-body {
  padding: var(--space-lg);
}

.past-project-card h4 {
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.past-project-role {
  font-size: 0.85rem;
  color: var(--light-gray);
  margin-bottom: var(--space-sm);
}

.past-project-meta {
  font-size: 0.8rem;
  color: var(--light-gray);
}

/* Experience Entry */
.experience-entry {
  border-left: 3px solid var(--border);
  padding-left: var(--space-lg);
  margin-bottom: var(--space-lg);
  position: relative;
}

.experience-entry::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 9px;
  height: 9px;
  background: var(--charcoal);
  border-radius: 50%;
}

.experience-entry h4 {
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 4px;
}

.experience-entry .date {
  font-size: 0.85rem;
  color: var(--light-gray);
  margin-bottom: var(--space-sm);
}

.experience-entry p {
  color: var(--light-gray);
  font-size: 0.95rem;
}

/* File Upload Styling */
.file-upload {
  position: relative;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-md);
  background: transparent;
}

.file-upload:hover {
  border-color: var(--red);
  background: rgba(229, 62, 62, 0.1);
}

.file-upload.dragging {
  border-color: var(--red);
  background: rgba(229, 62, 62, 0.1);
}

.file-upload input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-icon {
  font-size: 1.5rem;
  color: var(--light-gray);
  margin-bottom: 4px;
  line-height: 1;
}

.file-upload-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--light-gray);
  margin-bottom: 2px;
}

.file-upload-hint {
  font-size: 0.75rem;
  color: var(--mid-gray);
}

/* Script Upload - Compact */
.file-upload.script-upload {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  text-align: left;
}

.file-upload.script-upload .file-upload-icon {
  font-size: 1rem;
  margin-bottom: 0;
}

.file-upload.script-upload .file-upload-hint {
  margin-left: auto;
}

/* Banner Upload - Larger */
.file-upload.banner-upload {
  padding: var(--space-2xl) var(--space-lg);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-upload.banner-upload .file-upload-icon {
  font-size: 3rem;
}

.file-preview {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.file-preview img {
  border-radius: var(--radius-md);
  object-fit: cover;
}

.file-preview-info {
  flex: 1;
}

.file-preview-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
}

.file-preview-size {
  font-size: 0.8rem;
  color: var(--mid-gray);
}

.file-preview-actions {
  display: flex;
  gap: var(--space-sm);
}

/* Portfolio Item */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--space-md);
  width: 100%;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
}

.portfolio-item:hover .portfolio-item-overlay {
  opacity: 1;
}

.portfolio-item-title {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);
  gap: var(--space-xs);
}

.tab {
  padding: var(--space-md) var(--space-lg);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--light-gray);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--light-gray);
}

.tab.active {
  color: var(--white);
  border-bottom-color: var(--red);
}

.tab-content {
  display: none;
  opacity: 0;
}

.tab-content.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.2s ease-out;
}

/* Average Rating Large Display */
.avg-rating-display {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--cream) 0%, var(--off-white) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.avg-rating-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 400;
  color: var(--white);
}

.avg-rating-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Profile Grid Layout */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
}

.profile-main {
  min-width: 0;
}

.profile-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

@media (max-width: 1024px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-meta {
    justify-content: center;
  }

  .profile-avatar img,
  .profile-avatar-placeholder {
    width: 140px;
    height: 140px;
  }
}

/* ============================================
   RED ACCENT MOMENTS - Strategic Use Only
   ============================================ */

/* Hover state on key interactive elements */
.project-card:hover h3 a,
nav a:hover,
.logo:hover {
  color: var(--red);
}

/* The primary action has a red hover */
.btn-primary:hover {
  background: var(--red);
}

/* Links in body text */
.card-body a:not(.btn),
.role-description a,
.project-description a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Selected/active states */
nav a.active {
  color: var(--red);
}

/* Focus for accessibility */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ============================================
   LANDING PAGE - Minimal & Bold
   ============================================ */

.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-page header {
  background: transparent;
}

.landing-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-xl);
}

.landing-hero {
  text-align: center;
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--red);
  margin-bottom: var(--space-lg);
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

.landing-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--mid-gray);
  margin-bottom: var(--space-2xl);
  font-weight: 400;
  line-height: 1.6;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.landing-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 220px;
  font-family: var(--font-display);
}

.landing-btn-find {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.landing-btn-find:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.landing-btn-create {
  background: var(--red);
  color: var(--white);
}

.landing-btn-create:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.landing-btn-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.landing-btn-arrow {
  font-size: 1.25rem;
  opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.landing-btn:hover .landing-btn-arrow {
  transform: translateX(4px);
  opacity: 1;
}

.landing-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  width: 100%;
  margin: 0 auto;
}

.landing-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 120px;
}

.landing-stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
}

.landing-stat-label {
  font-size: 0.8rem;
  color: var(--mid-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.landing-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
}

.landing-footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-page .footer-content {
  color: var(--mid-gray);
}

.landing-page .footer-logo {
  color: var(--white);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .landing-main {
    padding: var(--space-xl) var(--space-lg);
  }

  .landing-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

  .landing-btn {
    min-width: 100%;
    padding: var(--space-md) var(--space-lg);
  }

  .landing-btn-title {
    font-size: 1rem;
  }

  .landing-stats {
    gap: var(--space-lg);
  }

  .landing-stat-number {
    font-size: 1.5rem;
  }
}

/* ===========================
   Form helpers
   =========================== */

.form-hint {
  font-size: 0.8rem;
  color: var(--mid-gray);
  margin: 0 0 var(--space-md);
  line-height: 1.5;
}

/* ===========================
   Portfolio – video link items
   =========================== */

.portfolio-video-placeholder {
  width: 100%;
  height: 100%;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-play-icon {
  font-size: 2.5rem;
  color: var(--mid-gray);
  opacity: 0.7;
}

.portfolio-link-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: rgba(0, 0, 0, 0.65);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  pointer-events: none;
}

.portfolio-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Portfolio add-item mode toggle */
.portfolio-mode-toggle {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-lg);
}

.portfolio-mode-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mid-gray);
  background: none;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.portfolio-mode-btn:hover {
  color: var(--light-gray);
}

.portfolio-mode-btn.active {
  background: var(--charcoal);
  color: var(--white);
}

/* ===========================
   Public Profile Page
   =========================== */

.public-profile-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-xl);
}

.public-profile-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--charcoal);
  border: 3px solid rgba(255, 255, 255, 0.15);
}

.public-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 600;
  color: var(--light-gray);
  background: var(--charcoal);
  text-transform: uppercase;
}

.public-profile-info {
  flex: 1;
}

.public-profile-info h1 {
  margin-bottom: var(--space-sm);
}

.public-profile-bio {
  font-size: 1rem;
  color: var(--light-gray);
  font-weight: 300;
  margin: 0 0 var(--space-sm) 0;
  line-height: 1.6;
}

.public-profile-meta {
  display: flex;
  gap: var(--space-lg);
  font-size: 0.875rem;
  color: var(--mid-gray);
  margin-bottom: var(--space-md);
}

.public-profile-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.public-profile-stats {
  display: flex;
  gap: var(--space-xl);
  padding-left: var(--space-xl);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: auto;
  flex-shrink: 0;
}

.public-profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 70px;
}

.public-profile-stat .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.public-profile-stat .stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--light-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.public-profile-section {
  margin-bottom: var(--space-2xl);
}

.public-profile-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid-gray);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.public-profile-skills {
  color: var(--light-gray);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

/* Past projects list */
.public-profile-projects-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.public-profile-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.public-profile-project-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--black);
}

.project-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.project-item-title {
  font-weight: 600;
  color: var(--white);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-item-role {
  font-size: 0.8rem;
  color: var(--mid-gray);
}

.project-item-tags {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Reviews */
.public-profile-reviews {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.public-profile-review {
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.review-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.review-author-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.review-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.review-author-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--light-gray);
  text-transform: uppercase;
  flex-shrink: 0;
}

.review-author-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--white);
  text-decoration: none;
  display: block;
}

.review-author-name:hover {
  color: var(--red);
}

.review-date {
  font-size: 0.78rem;
  color: var(--mid-gray);
  display: block;
  margin-top: 2px;
}

.review-text {
  font-size: 0.9rem;
  color: var(--light-gray);
  line-height: 1.6;
  margin: 0 0 var(--space-sm) 0;
}

.review-project-link {
  font-size: 0.8rem;
  color: var(--mid-gray);
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-sm);
  display: block;
  margin-top: var(--space-sm);
}

.review-project-link:hover {
  color: var(--red);
}

@media (max-width: 768px) {
  .public-profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg);
  }

  .public-profile-meta {
    justify-content: center;
  }

  .public-profile-links {
    justify-content: center;
  }

  .public-profile-stats {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 0;
    padding-top: var(--space-lg);
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .public-profile-project-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .review-top {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* ============================================
   PROFILE REDESIGN – 2-column edit layout
   ============================================ */

/* 3-column responsive grid */
.grid-3-responsive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 900px) {
  .grid-3-responsive { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-3-responsive { grid-template-columns: 1fr; }
}

/* Optional field label */
.optional-label {
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--mid-gray);
}

/* Playing age min–max inline pair */
.range-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.range-input-row input { flex: 1; min-width: 0; }
.range-dash {
  color: var(--mid-gray);
  flex-shrink: 0;
}

/* Instagram @ prefix */
.input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix {
  position: absolute;
  left: 14px;
  color: var(--mid-gray);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.input-with-prefix { padding-left: 30px; }

/* ── 2-col layout container ── */
.profile-redesign-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-2xl);
  align-items: start;
  margin-top: var(--space-xl);
}
@media (max-width: 768px) {
  .profile-redesign-layout { grid-template-columns: 1fr; }
}

/* Left sidebar */
.profile-left-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
@media (max-width: 768px) {
  .profile-left-sidebar { position: static; }
}

/* Headshot (square, clickable) */
.profile-headshot-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--charcoal);
  border: 2px solid rgba(255,255,255,0.12);
  transition: border-color 0.2s;
}
.profile-headshot-wrap:hover { border-color: var(--red); }
.profile-headshot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-headshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: var(--light-gray);
  text-transform: uppercase;
}
.profile-headshot-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.profile-headshot-wrap:hover .profile-headshot-overlay { opacity: 1; }
.profile-headshot-overlay span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Additional photos */
.profile-photos-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.profile-photos-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--mid-gray);
}
.profile-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.additional-photo-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--charcoal);
}
.additional-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.additional-photo-delete {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.7);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 0;
}
.additional-photo-item:hover .additional-photo-delete { opacity: 1; }

/* Right main */
.profile-right-main { min-width: 0; }

/* Video link rows in edit form */
.video-link-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  padding: var(--space-md);
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
}
.video-link-row-fields {
  display: flex;
  gap: var(--space-md);
  flex: 1;
  min-width: 0;
}
@media (max-width: 600px) {
  .video-link-row { flex-direction: column; align-items: stretch; }
  .video-link-row-fields { flex-direction: column; }
}

/* Credits / Education preformatted */
.pub-credits-text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--light-gray);
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 0;
}

/* ============================================
   PUBLIC PROFILE – 2-column layout
   ============================================ */

.pub-profile-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-2xl);
  align-items: start;
  padding: var(--space-xl) 0 var(--space-2xl);
}
@media (max-width: 768px) {
  .pub-profile-layout { grid-template-columns: 1fr; }
}

.pub-profile-left {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
@media (max-width: 768px) {
  .pub-profile-left { position: static; }
}

/* Public headshot */
.pub-headshot-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--charcoal);
  border: 2px solid rgba(255,255,255,0.1);
}
.pub-headshot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-headshot-placeholder.pub {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: var(--light-gray);
  text-transform: uppercase;
}

/* Extra photos on public profile */
.pub-photos { margin-top: 0; }

/* Right column */
.pub-profile-right { min-width: 0; }

/* Name + gender */
.pub-name-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.pub-name-row h1 { margin: 0; }
.pub-gender-badge {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  color: var(--mid-gray);
  background: rgba(255,255,255,0.07);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* Meta row */
.pub-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  color: var(--mid-gray);
}
.pub-meta-item { display: inline-flex; align-items: center; }
.pub-meta-link { color: var(--mid-gray); text-decoration: none; transition: color 0.15s; }
.pub-meta-link:hover { color: var(--red); }

/* Section blocks */
.pub-section { margin-bottom: var(--space-xl); }
.pub-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--mid-gray);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Appearance */
.pub-appearance-grid {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}
.pub-appearance-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pub-app-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mid-gray);
}

/* Video grid */
.pub-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--space-lg);
}
.pub-video-title {
  font-size: 0.8rem;
  color: var(--mid-gray);
  margin-top: var(--space-xs);
}

/* ═══════════════════════════════════════════
   PROFILE PAGE — EDIT VIEW
   ═══════════════════════════════════════════ */

/* Settings panel */
.prof-settings {
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}
.prof-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}
.prof-settings-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

/* Hero card: photo col + info col */
.prof-hero-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-xl);
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  align-items: start;
}
@media (max-width: 768px) {
  .prof-hero-card { grid-template-columns: 1fr; }
}

.prof-hero-photo-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: stretch;
}

.prof-hero-info-col {
  min-width: 0;
}

/* Stats row */
.prof-stats {
  display: flex;
  gap: var(--space-sm);
}
.prof-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--black);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-xs);
}
.prof-stat .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.prof-stat .stat-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--mid-gray);
}

/* Action buttons below photo */
.prof-hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.prof-hero-actions .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* Body: sidebar (photos) + main (form cards) */
.prof-body-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-lg);
  align-items: start;
}
@media (max-width: 768px) {
  .prof-body-layout { grid-template-columns: 1fr; }
}

.prof-body-sidebar {
  position: sticky;
  top: 80px;
}
@media (max-width: 768px) {
  .prof-body-sidebar { position: static; }
}

.prof-body-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Section cards */
.prof-card {
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}
.prof-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--mid-gray);
  margin: 0 0 var(--space-md) 0;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.prof-card-hint {
  font-size: 0.8rem;
  color: var(--mid-gray);
  margin: -6px 0 var(--space-md);
}
.prof-card-optional {
  font-weight: 400;
  font-size: 0.68rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--mid-gray);
  opacity: 0.7;
}

/* ============================================
   TALENT SEARCH PAGE
   ============================================ */

.talent-search-bar {
  margin: var(--space-md) 0 var(--space-lg);
}

.talent-search-bar input {
  width: 100%;
  padding: 12px 18px;
  background: #404040;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--white);
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.talent-search-bar input::placeholder { color: #a3a3a3; }
.talent-search-bar input:focus { outline: none; border-color: rgba(255,255,255,0.4); }

.talent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--space-md);
  padding-bottom: var(--space-xl);
}

.talent-card {
  background: var(--dark-charcoal);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.talent-card:hover {
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.talent-card-link {
  display: block;
  padding: var(--space-md);
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.talent-card-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.talent-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.1);
}

.talent-avatar-placeholder {
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--mid-gray);
}

.talent-card-info {
  flex: 1;
  min-width: 0;
}

.talent-card-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.talent-card-location {
  font-size: 0.75rem;
  color: var(--mid-gray);
  display: block;
  margin-bottom: 4px;
}

.talent-card-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.talent-card-bio {
  font-size: 0.85rem;
  color: var(--mid-gray);
  line-height: 1.5;
  margin: 0 0 var(--space-sm);
}

.talent-card-skills {
  font-size: 0.78rem;
  color: var(--dark-gray);
  margin: 0;
}

.talent-card-footer {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.07);
}

.talent-card-footer .btn {
  flex: 1;
  text-align: center;
}

/* ============================================
   CONTACT REQUESTS (profile inbox)
   ============================================ */

.contact-request-item {
  padding: var(--space-md);
  background: var(--charcoal);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  border-left: 3px solid transparent;
}

.contact-request-item.pending { border-left-color: #f59e0b; }
.contact-request-item.accepted { border-left-color: #22c55e; }
.contact-request-item.declined { border-left-color: rgba(255,255,255,0.15); }

.contact-request-sender {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.contact-req-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.contact-req-avatar-placeholder {
  background: var(--dark-charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--mid-gray);
  font-size: 0.9rem;
}

.contact-req-info { flex: 1; }

.contact-req-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  display: block;
}

.contact-req-name:hover { color: var(--light-gray); }

.contact-req-location {
  font-size: 0.75rem;
  color: var(--mid-gray);
}

.contact-req-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-req-status-pending { background: rgba(245,158,11,0.15); color: #f59e0b; }
.contact-req-status-accepted { background: rgba(34,197,94,0.15); color: #22c55e; }
.contact-req-status-declined { background: rgba(255,255,255,0.06); color: var(--mid-gray); }

.contact-req-message {
  font-size: 0.875rem;
  color: var(--light-gray);
  font-style: italic;
  margin: 0 0 var(--space-xs);
  line-height: 1.5;
}

.contact-req-date {
  font-size: 0.75rem;
  color: var(--dark-gray);
  margin-bottom: var(--space-sm);
}

.contact-req-actions {
  display: flex;
  gap: var(--space-sm);
}
