/* ─────────────────────────────────────────────
   Kayla Richards Portfolio — Styles
   ───────────────────────────────────────────── */

/* ── Variables ── */
:root {
  --white: #F3F3F3;
  --slate-blue: #537F91;
  --slate-blue-light: #E4EEF2;
  --slate-blue-dark: #3A5F6B;
  --dark: #1A1A2E;
  --gray: #6B7280;
  --border: #D1D9E6;
  --shadow: 0 4px 24px rgba(83, 127, 145, 0.12);
  --shadow-hover: 0 12px 40px rgba(83, 127, 145, 0.22);
  --radius: 12px;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--white); }
::-webkit-scrollbar-thumb { background: var(--slate-blue); border-radius: 3px; }

/* ── Utility ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeUp 0.55s ease-out both;
}
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }
.delay-6 { animation-delay: 0.48s; }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  padding: 14px 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--slate-blue);
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--slate-blue);
  transition: width var(--transition);
  border-radius: 2px;
}
.nav-links a:hover,
.nav-links a.active { color: var(--slate-blue); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Nav */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--white);
  padding: 80px 32px 32px;
  flex-direction: column;
  gap: 24px;
  z-index: 99;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--dark);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:hover { color: var(--slate-blue); }

/* ── Scroll indicator (unused — removed) ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--slate-blue);
  color: var(--white);
  border-color: var(--slate-blue);
}
.btn-primary:hover {
  background: var(--slate-blue-dark);
  border-color: var(--slate-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 134, 167, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--slate-blue);
  border-color: var(--slate-blue);
}
.btn-outline:hover {
  background: var(--slate-blue);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: linear-gradient(160deg, var(--white) 60%, var(--slate-blue-light) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107,134,167,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-sm {
  min-height: 18vh;
  padding-top: 80px;
  background: linear-gradient(160deg, var(--white) 60%, var(--slate-blue-light) 100%);
  position: relative;
  overflow: hidden;
}
.hero-sm::before {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107,134,167,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate-blue);
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: italic;
  color: var(--slate-blue);
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
/* ── Page Header ── */
.page-header {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.page-header h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--slate-blue);
}
.page-header h1 em { font-style: normal; color: inherit; }
.page-header p {
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 600px;
  line-height: 1.8;
}
.page-header .tag {
  display: inline-block;
  background: var(--slate-blue-light);
  color: var(--slate-blue);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 16px;
}

/* ── Section ── */
.section { padding: 64px 0; }
.section-title {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 40px;
}

/* ── Intro block (home) ── */
.intro-block {
  text-align: center;
  margin-bottom: 48px;
}
.intro-image {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 16/9;
  margin: 0 auto 22px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-blue);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
}
.intro-image.intro-image-empty {
  background: var(--slate-blue-light);
  border: 2px dashed var(--slate-blue);
}
.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.intro-title {
  font-size: 1.3rem;
  color: var(--slate-blue);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.intro-contact {
  font-size: 1.1rem;
  color: var(--gray);
  line-height: 1.8;
}
.intro-contact a {
  color: inherit;
  transition: color var(--transition);
}
.intro-contact a:hover { color: var(--slate-blue); }
.intro-sep {
  margin: 0 10px;
  opacity: 0.4;
}

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.discipline-grid-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 48px;
}
.discipline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.discipline-grid .card {
  border-radius: var(--radius);
  overflow: visible;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.discipline-grid .card-body {
  flex: 1;
}
.discipline-grid .card-img {
  aspect-ratio: 16/9;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: var(--slate-blue-light);
}
.discipline-grid .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Visual Development card: pre-zoomed 5% so the composition crops nicely.
   Hover adds the standard +6% scale used by all the other cards. */
.discipline-grid a[href="visual-development.html"] .card-img img {
  transform: scale(1.05);
}
.discipline-grid a[href="visual-development.html"]:hover .card-img img {
  transform: scale(1.11);
}
.discipline-grid .card-body {
  border-radius: 0 0 var(--radius) var(--radius);
  border: 1px solid var(--border);
  border-top: none;
  padding: 28px 28px 32px;
}
.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--slate-blue-light);
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-img img { transform: scale(1.06); }
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,46,0.7) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover .card-overlay { opacity: 1; }
.card-overlay span {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}
.card-body { padding: 20px 22px 22px; }
.card-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 14px;
  line-height: 1.6;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  background: var(--slate-blue-light);
  color: var(--slate-blue-dark);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.04em;
}

/* ── Back link (project detail) ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate-blue);
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 50px;
  transition: all var(--transition);
  margin-bottom: 40px;
  background: var(--white);
}
.back-link:hover {
  background: var(--slate-blue);
  color: var(--white);
  border-color: var(--slate-blue);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(83,127,145,0.2);
}

/* ── Project detail ── */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
}
.project-detail img {
  cursor: zoom-in;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: lightboxFade 0.2s ease-out;
}
.lightbox.open { display: flex; }
@keyframes lightboxFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox-img {
  max-width: 94vw;
  max-height: 94vh;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}
.lightbox-img.zoomed {
  cursor: grab;
  transition: none;
}
.lightbox-img.grabbing { cursor: grabbing; }
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
  z-index: 2;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}
.lightbox-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
.project-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--slate-blue);
  margin-bottom: 16px;
  line-height: 1.1;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.project-hero {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--slate-blue-light);
  margin-bottom: 32px;
  border: 1px solid var(--border);
}
.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-description p {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.9;
  margin-bottom: 20px;
}

/* ── Project content blocks ── */
.project-blocks { display: block; }
.project-block {
  margin-bottom: 32px;
}
.project-block:last-child { margin-bottom: 0; }
.project-block-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--slate-blue-light);
  border: 1px solid var(--border);
}
.project-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-block-text {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.9;
}
.project-block-text p { margin-bottom: 18px; }
.project-block-text p:last-child { margin-bottom: 0; }
.project-block-text h2,
.project-block-text h3 {
  color: var(--dark);
  font-family: var(--font-sans);
  font-weight: 700;
  margin: 8px 0 12px;
}
.project-block-video {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  border: 1px solid var(--border);
}
.project-block-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Video Embed ── */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: var(--slate-blue-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--slate-blue);
}
.video-placeholder i { font-size: 3rem; opacity: 0.6; }
.video-placeholder span {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.7;
}

/* ── Color Swatches ── */
.swatch-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.swatch-dot {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
}
.swatch-label {
  font-size: 0.72rem;
  color: var(--gray);
  text-align: center;
}

/* ── About Page ── */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.about-photo-wrap {
  position: relative;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--slate-blue-light);
}
.about-photo-badge {
  position: absolute;
  bottom: -16px; right: -16px;
  background: var(--slate-blue);
  color: var(--white);
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.about-bio h1 {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 4px;
}
.about-bio .pronouns {
  font-size: 0.9rem;
  color: var(--slate-blue);
  font-weight: 500;
  margin-bottom: 24px;
}
.about-bio p {
  color: var(--gray);
  line-height: 1.9;
  margin-bottom: 16px;
}
.skills-section { margin-top: 36px; }
.skills-section h3 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.skill-item { margin-bottom: 16px; }
.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.skill-bar-bg {
  height: 6px;
  background: var(--slate-blue-light);
  border-radius: 3px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--slate-blue), var(--slate-blue-dark));
  border-radius: 3px;
  transform-origin: left;
}
.contact-cta {
  margin-top: 40px;
  padding: 28px 32px;
  background: var(--slate-blue-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.contact-cta p {
  font-size: 0.95rem;
  color: var(--slate-blue-dark);
  font-weight: 500;
  margin: 0;
}
.social-row { display: flex; gap: 12px; }
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--white);
  color: var(--slate-blue);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.social-icon:hover {
  background: var(--slate-blue);
  color: var(--white);
  border-color: var(--slate-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107,134,167,0.3);
}
.social-icon svg { width: 18px; height: 18px; }

/* ── Footer ── */
.footer {
  background: var(--slate-blue);
  color: var(--white);
  padding: 48px 0;
  margin-top: 80px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-name {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  opacity: 0.9;
}
.footer-copy {
  font-size: 0.82rem;
  opacity: 0.65;
}
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  transition: all var(--transition);
}
.footer-social a:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.footer-social svg { width: 16px; height: 16px; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ─────────────────────────────────────────────
   EDIT MODE
   ───────────────────────────────────────────── */

/* ── Login card (edit.html) ── */
.edit-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  text-align: center;
}
.edit-login-title {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--slate-blue);
  margin-bottom: 6px;
}
.edit-login-sub {
  color: var(--gray);
  font-size: 0.92rem;
  margin-bottom: 28px;
}
.edit-login-form input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--dark);
  margin-bottom: 12px;
  transition: border-color var(--transition);
}
.edit-login-form input[type="password"]:focus {
  outline: none;
  border-color: var(--slate-blue);
}
.edit-login-form button {
  width: 100%;
  justify-content: center;
}
.edit-login-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 18px;
}
.edit-login-already p { color: var(--gray); margin-bottom: 20px; }
.edit-login-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.edit-login-back { margin-top: 24px; font-size: 0.82rem; }
.edit-login-back a { color: var(--gray); transition: color var(--transition); }
.edit-login-back a:hover { color: var(--slate-blue); }

/* ── Edit toolbar (bottom of screen when logged in) ── */
body.edit-mode { padding-bottom: 72px; }
.edit-toolbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--slate-blue-dark);
  color: var(--white);
  padding: 12px 24px;
  display: none;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
body.edit-mode .edit-toolbar { display: flex; }
.edit-toolbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.edit-toolbar-badge::before {
  content: '';
  width: 8px; height: 8px;
  background: #8FE388;
  border-radius: 50%;
  display: inline-block;
}
.edit-toolbar-dirty {
  display: none;
  font-size: 0.82rem;
  opacity: 0.85;
}
.edit-toolbar-dirty::before {
  content: '●';
  color: #F5C26B;
  margin-right: 6px;
}
body.edit-mode.is-dirty .edit-toolbar-dirty { display: inline; }
.edit-toolbar-spacer { flex: 1; }
.edit-toolbar button {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 8px 18px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.edit-toolbar button:hover:not(:disabled) {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}
.edit-toolbar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.edit-toolbar .edit-save {
  background: #8FE388;
  color: var(--slate-blue-dark);
  border-color: #8FE388;
}
.edit-toolbar .edit-save:hover:not(:disabled) {
  background: #74d96d;
  border-color: #74d96d;
}
body.edit-mode:not(.is-dirty) .edit-toolbar .edit-save { opacity: 0.45; cursor: default; }
body.edit-mode:not(.is-dirty) .edit-toolbar .edit-discard { display: none; }

/* ── Card overrides in edit mode ── */
body.edit-mode .card { cursor: pointer; position: relative; }
body.edit-mode .card.dragging { opacity: 0.4; }
body.edit-mode .card.drop-target { outline: 3px dashed var(--slate-blue); outline-offset: -4px; }
.edit-card-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--slate-blue);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ── Ghost "+" card ── */
.ghost-card {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--slate-blue);
  border-radius: var(--radius);
  background: var(--slate-blue-light);
  color: var(--slate-blue-dark);
  min-height: 260px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.ghost-card:hover {
  background: #DBE7EE;
  transform: translateY(-4px);
  border-color: var(--slate-blue-dark);
}
.ghost-card-inner { padding: 32px; }
.ghost-card-plus {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 8px;
}
.ghost-card-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Edit modal ── */
.edit-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(26, 26, 46, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  backdrop-filter: blur(4px);
}
.edit-modal.open { display: flex; }
.edit-modal-panel {
  width: 100%;
  max-width: 640px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.edit-modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.edit-modal-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-blue);
}
.edit-modal-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--gray);
  cursor: pointer;
  padding: 4px 10px;
  line-height: 1;
  border-radius: 6px;
  transition: all var(--transition);
}
.edit-modal-close:hover { background: var(--slate-blue-light); color: var(--slate-blue-dark); }
.edit-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}
.edit-modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  background: #FAFBFC;
}
.edit-modal-footer .spacer { flex: 1; }

/* Form controls inside modal */
.edit-field { margin-bottom: 20px; }
.edit-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.edit-field input[type="text"],
.edit-field input[type="url"],
.edit-field textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--dark);
  transition: border-color var(--transition);
  resize: vertical;
}
.edit-field input:focus,
.edit-field textarea:focus {
  outline: none;
  border-color: var(--slate-blue);
}
.edit-field textarea { min-height: 80px; line-height: 1.5; }
.edit-field .field-hint {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 4px;
}

/* Image picker */
.edit-image-picker {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
  background: #FAFBFC;
}
.edit-image-preview {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--slate-blue-light);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.8rem;
}
.edit-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.edit-image-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.edit-image-actions button,
.edit-image-actions label {
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-blue-dark);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.edit-image-actions button:hover,
.edit-image-actions label:hover {
  background: var(--slate-blue);
  color: var(--white);
  border-color: var(--slate-blue);
}
.edit-image-actions input[type="file"] { display: none; }

/* Chip editor (tools) */
.edit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  min-height: 48px;
  align-items: center;
}
.edit-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--slate-blue-light);
  color: var(--slate-blue-dark);
  padding: 4px 4px 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
}
.edit-chip-remove {
  background: rgba(83, 127, 145, 0.18);
  color: var(--slate-blue-dark);
  border: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.edit-chip-remove:hover { background: var(--slate-blue); color: #fff; }
.edit-chips input {
  border: none;
  outline: none;
  padding: 4px 8px;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--dark);
  flex: 1;
  min-width: 120px;
}

/* Modal buttons */
.edit-btn {
  padding: 10px 22px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--slate-blue-dark);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.edit-btn:hover {
  background: var(--slate-blue-light);
}
.edit-btn-primary {
  background: var(--slate-blue);
  color: var(--white);
  border-color: var(--slate-blue);
}
.edit-btn-primary:hover {
  background: var(--slate-blue-dark);
  border-color: var(--slate-blue-dark);
}
.edit-btn-danger {
  background: var(--white);
  color: #c0392b;
  border-color: #e8b2a8;
}
.edit-btn-danger:hover {
  background: #c0392b;
  color: var(--white);
  border-color: #c0392b;
}
.edit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Toast */
.edit-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 500;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.edit-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.edit-toast.error { background: #c0392b; }
.edit-toast.success { background: #2c7a4a; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .container { padding: 0 20px; }
  .about-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-photo-wrap { max-width: 340px; }
  .contact-cta { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .card-grid { grid-template-columns: 1fr; }
  .discipline-grid { grid-template-columns: 1fr; }
  .discipline-grid-container { padding: 0 20px; }
}

/* ─── Skeleton loading states ─── */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton-shimmer {
  background: linear-gradient(90deg, #E4EEF2 0%, #C9DDE4 50%, #E4EEF2 100%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s infinite linear;
  border-radius: 6px;
}
.skeleton-card {
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  background: #E4EEF2;
  border: 2px dashed rgba(83, 127, 145, 0.35);
}
.skeleton-card .card-img {
  aspect-ratio: 16/9;
  width: 100%;
}
.skeleton-card .card-body { padding: 18px; }
.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
}
.skeleton-line:last-child { margin-bottom: 0; }
.skeleton-block {
  width: 100%;
  aspect-ratio: 16/9;
  margin-bottom: 20px;
}

/* ─── Phase 4: project-page block editor ─── */
body.edit-mode .project-detail [contenteditable="true"] {
  outline: 1px dashed rgba(96, 165, 250, 0.5);
  outline-offset: 4px;
  border-radius: 4px;
  transition: outline-color 0.15s;
}
body.edit-mode .project-detail [contenteditable="true"]:hover,
body.edit-mode .project-detail [contenteditable="true"]:focus {
  outline-color: #60a5fa;
}
.project-block-wrap {
  position: relative;
  margin-bottom: 24px;
}
.project-block-wrap .project-block { margin-bottom: 0; }
.block-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  background: rgba(15, 20, 32, 0.92);
  border: 1px solid rgba(96, 165, 250, 0.5);
  border-radius: 6px;
  padding: 4px;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.15s;
}
.project-block-wrap:hover .block-controls,
.project-block-wrap:focus-within .block-controls { opacity: 1; }
.block-controls button {
  background: transparent;
  color: #e5e7eb;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
}
.block-controls button:hover { background: rgba(96,165,250,0.2); }
.block-controls button.danger:hover { background: rgba(239,68,68,0.3); }
.block-edit-panel {
  background: var(--slate-blue-light);
  border: 1px solid rgba(83, 127, 145, 0.4);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  color: #1a1f2e;
}
.block-edit-panel label {
  display: block;
  font-size: 12px;
  color: var(--slate-blue-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  margin-top: 12px;
}
.block-edit-panel label:first-child { margin-top: 0; }
.block-edit-panel textarea,
.block-edit-panel input[type="text"],
.block-edit-panel input[type="url"],
.block-edit-panel input[type="file"] {
  width: 100%;
  background: #ffffff;
  color: #1a1f2e;
  border: 1px solid rgba(83, 127, 145, 0.4);
  border-radius: 4px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
}
.block-edit-panel textarea { min-height: 120px; resize: vertical; }
.block-edit-panel .field-hint,
.block-edit-panel div[style*="color:#9ca3af"] { color: var(--slate-blue-dark) !important; }
.block-edit-panel .edit-btn {
  background: var(--slate-blue);
  color: #ffffff;
  border: 1px solid var(--slate-blue-dark);
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.block-edit-panel .edit-btn:hover { background: var(--slate-blue-dark); }
.block-edit-done-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(83, 127, 145, 0.3);
}
.block-edit-done-row .block-edit-done {
  background: var(--slate-blue);
  color: #ffffff;
  border: 1px solid var(--slate-blue-dark);
  padding: 9px 22px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
}
.block-edit-done-row .block-edit-done:hover { background: var(--slate-blue-dark); }
.project-add-block {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
  padding: 18px;
  border: 2px dashed rgba(96, 165, 250, 0.35);
  border-radius: 10px;
}
.project-add-block button {
  background: var(--slate-blue);
  color: #ffffff;
  border: 1px solid var(--slate-blue-dark);
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.project-add-block button:hover {
  background: var(--slate-blue-dark);
  transform: translateY(-1px);
}

/* Full-width alternating tinted backgrounds so blocks are visually distinct in edit mode.
   clip-path + box-shadow trick bleeds the background left/right past the container. */
body.edit-mode .project-block-wrap {
  padding: 20px 14px;
  border-top: 1px solid rgba(83, 127, 145, 0.2);
  border-bottom: 1px solid rgba(83, 127, 145, 0.2);
  clip-path: inset(0 -100vmax);
}
body.edit-mode .project-block-wrap:nth-child(odd) {
  box-shadow: 0 0 0 100vmax rgba(228, 238, 242, 0.75);
}
body.edit-mode .project-block-wrap:nth-child(even) {
  box-shadow: 0 0 0 100vmax rgba(201, 221, 228, 0.75);
}
body.edit-mode .project-block-wrap + .project-block-wrap { margin-top: 0; }
body.edit-mode .project-block-wrap { cursor: grab; }
body.edit-mode .project-block-wrap:active { cursor: grabbing; }
body.edit-mode .project-block-wrap.dragging { opacity: 0.4; }
body.edit-mode .project-block-wrap.drop-target {
  outline: 3px solid var(--slate-blue);
  outline-offset: -3px;
}
body.edit-mode .project-block-wrap [contenteditable="true"],
body.edit-mode .project-block-wrap .block-edit-panel,
body.edit-mode .project-block-wrap .rte-editor,
body.edit-mode .project-block-wrap input,
body.edit-mode .project-block-wrap textarea,
body.edit-mode .project-block-wrap select { cursor: auto; }

/* Empty video placeholder */
.project-block-empty {
  background: rgba(83, 127, 145, 0.08);
  border: 2px dashed rgba(83, 127, 145, 0.4);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  color: var(--slate-blue-dark);
  font-style: italic;
}

/* Fix dropdown contrast in project editor bar */
.project-editor-bar select {
  background: #ffffff;
  color: #1a1f2e;
  border: 1px solid rgba(83, 127, 145, 0.4);
}

/* Rich text editor toolbar for text blocks */
.rte-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px;
  background: #f4f7f9;
  border: 1px solid rgba(83, 127, 145, 0.3);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
}
.rte-toolbar button,
.rte-toolbar select {
  background: #ffffff;
  color: #1a1f2e;
  border: 1px solid rgba(83, 127, 145, 0.3);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  min-width: 32px;
}
.rte-toolbar button:hover { background: var(--slate-blue-light); }
.rte-toolbar button.active { background: var(--slate-blue); color: #fff; border-color: var(--slate-blue-dark); }
.rte-toolbar .rte-sep {
  width: 1px;
  background: rgba(83, 127, 145, 0.3);
  margin: 2px 4px;
}
.rte-editor {
  min-height: 140px;
  background: #ffffff;
  color: #1a1f2e;
  border: 1px solid rgba(83, 127, 145, 0.3);
  border-radius: 0 0 6px 6px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  outline: none;
}
.rte-editor:focus { border-color: var(--slate-blue); }
.rte-editor p { margin: 0 0 12px 0; }
.rte-editor p:last-child { margin-bottom: 0; }
.rte-editor h2 { font-size: 1.6rem; margin: 12px 0 8px; }
.rte-editor h3 { font-size: 1.3rem; margin: 10px 0 6px; }
.project-editor-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--slate-blue-light);
  border: 1px solid rgba(83, 127, 145, 0.4);
  border-radius: 8px;
  color: #1a1f2e;
}
.project-editor-bar label {
  font-size: 12px;
  color: var(--slate-blue-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.project-editor-bar select {
  background: #1a1f2e;
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 14px;
}

/* ─── Phase 5: About page editor ─── */
body.edit-mode .about-editable {
  outline: 1px dashed rgba(83, 127, 145, 0.5);
  outline-offset: 4px;
  border-radius: 4px;
  transition: outline-color 0.15s, background 0.15s;
}
body.edit-mode .about-editable:hover,
body.edit-mode .about-editable:focus {
  outline-color: var(--slate-blue);
  background: rgba(228, 238, 242, 0.35);
}
.about-bio-controls {
  display: flex;
  gap: 6px;
  margin: 6px 0 18px;
  justify-content: flex-start;
}
.about-bio-controls button {
  background: var(--slate-blue-light);
  color: var(--slate-blue-dark);
  border: 1px solid rgba(83, 127, 145, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.about-bio-controls button:hover { background: var(--slate-blue); color: #fff; }
.about-bio-controls button.danger:hover { background: #b91c1c; border-color: #7f1d1d; }
.about-add-bio {
  display: inline-block;
  margin-top: 6px;
  margin-bottom: 18px;
  background: var(--slate-blue);
  color: #fff;
  border: 1px solid var(--slate-blue-dark);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.about-add-bio:hover { background: var(--slate-blue-dark); }

/* Photo overlay */
body.edit-mode .about-photo-wrap { position: relative; }
.about-photo-edit {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.about-photo-edit .edit-btn {
  display: inline-block;
  background: var(--slate-blue);
  color: #fff;
  border: 1px solid var(--slate-blue-dark);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.about-photo-edit .edit-btn:hover { background: var(--slate-blue-dark); }
.about-photo-status {
  font-size: 12px;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 2px 8px;
  border-radius: 4px;
  min-height: 0;
}
.about-photo-status:empty { display: none; }

/* Socials edit panel */
.about-socials-panel,
.about-skills-panel {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--slate-blue-light);
  border: 1px solid rgba(83, 127, 145, 0.4);
  border-radius: 8px;
  color: #1a1f2e;
}
.about-socials-panel h4,
.about-skills-panel h4 {
  margin: 0 0 10px;
  color: var(--slate-blue-dark);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.about-socials-panel label {
  display: block;
  font-size: 12px;
  color: var(--slate-blue-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 10px 0 4px;
}
.about-socials-panel input {
  width: 100%;
  background: #fff;
  color: #1a1f2e;
  border: 1px solid rgba(83, 127, 145, 0.4);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
}

/* Skills editor */
.skill-edit-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.skill-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.skill-edit-row .skill-name {
  flex: 1 1 160px;
  background: #fff;
  color: #1a1f2e;
  border: 1px solid rgba(83, 127, 145, 0.4);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 14px;
}
.skill-edit-row .skill-level { flex: 2 1 200px; }
.skill-edit-row .skill-pct {
  min-width: 44px;
  text-align: right;
  font-size: 13px;
  color: var(--slate-blue-dark);
  font-weight: 600;
}
.skill-edit-row .skill-remove {
  background: transparent;
  color: var(--slate-blue-dark);
  border: 1px solid rgba(83, 127, 145, 0.4);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
}
.skill-edit-row .skill-remove:hover { background: #b91c1c; color: #fff; border-color: #7f1d1d; }
.about-skills-panel .skill-add {
  background: var(--slate-blue);
  color: #fff;
  border: 1px solid var(--slate-blue-dark);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.about-skills-panel .skill-add:hover { background: var(--slate-blue-dark); }

.about-badge-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding: 10px 14px;
  background: var(--slate-blue-light);
  border: 1px solid rgba(83, 127, 145, 0.4);
  border-radius: 6px;
  font-size: 13px;
  color: var(--slate-blue-dark);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.about-badge-toggle input { cursor: pointer; }

body.edit-mode .about-photo-inner {
  position: relative;
}
body.edit-mode .about-photo-inner > .about-photo { display: block; }

[data-reel] { position: relative; }
[data-reel].video-embed-empty {
  background: rgba(83, 127, 145, 0.08);
  border: 2px dashed rgba(83, 127, 145, 0.4);
  border-radius: 8px;
}
body.edit-mode .reel-edit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  background: var(--slate-blue);
  color: #fff;
  border: 1px solid var(--slate-blue-dark);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
body.edit-mode .reel-edit-btn:hover { background: var(--slate-blue-dark); }
body:not(.edit-mode) .reel-edit-btn { display: none; }

body.edit-mode #home-intro-image { position: relative; }
body.edit-mode #home-intro-image .home-intro-edit {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
}
body.edit-mode #home-intro-image .home-intro-edit .edit-btn {
  background: var(--slate-blue);
  color: #fff;
  border: 1px solid var(--slate-blue-dark);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
body.edit-mode #home-intro-image .home-intro-edit .edit-btn:hover { background: var(--slate-blue-dark); }
body.edit-mode #home-intro-image .home-intro-status {
  font-size: 12px;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 2px 8px;
  border-radius: 4px;
}
body.edit-mode #home-intro-image .home-intro-status:empty { display: none; }

/* ─── Phase 6: Discipline page header editor ─── */
.discipline-badge-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 12px;
  background: var(--slate-blue-light);
  border: 1px solid rgba(83, 127, 145, 0.4);
  border-radius: 6px;
  font-size: 13px;
  color: var(--slate-blue-dark);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.discipline-badge-toggle input { cursor: pointer; }

/* ─── Image crop modal ─── */
.crop-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.crop-modal.open { display: flex; }
.crop-panel {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  width: 100%;
  max-width: 748px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}
.crop-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-blue-dark);
  margin-bottom: 16px;
}
.crop-viewport {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  line-height: 0;
}
.crop-canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: grab;
}
.crop-canvas:active { cursor: grabbing; }
.crop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.crop-zoom-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-blue-dark);
  white-space: nowrap;
}
.crop-zoom-range {
  flex: 1;
  accent-color: var(--slate-blue);
}
.crop-zoom-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--slate-blue-light);
  color: var(--slate-blue-dark);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-zoom-btn:hover { background: var(--slate-blue); color: #fff; }
.crop-hint {
  font-size: 12px;
  color: var(--gray);
  margin: 8px 0 0;
  text-align: center;
}
.crop-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
