﻿/* ══════════════════════════════════════════════════════
   ADMIN PANEL — CYBERSECURITY OPS-CENTER THEME
   Matches the frontend neon/dark design language
   ══════════════════════════════════════════════════════ */

:root {
  --bg-1: #05070f;
  --bg-2: #0b1120;
  --bg-3: #121a2b;
  --surface: rgba(10, 16, 28, 0.88);
  --surface-strong: rgba(12, 20, 36, 0.95);
  --surface-light: rgba(16, 26, 44, 0.82);
  --line: rgba(0, 255, 180, 0.12);
  --line-dim: rgba(60, 90, 130, 0.28);
  --ink: #e0f0e8;
  --ink-muted: #8fa8a0;
  --neon: #00ffb4;
  --neon-glow: rgba(0, 255, 180, 0.35);
  --neon-dim: rgba(0, 255, 180, 0.08);
  --neon-2: #00e0ff;
  --accent: #4da3ff;
  --accent-2: #7c5cff;
  --danger: #ff4060;
  --danger-dim: rgba(255, 64, 96, 0.12);
  --radius: 14px;
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.3);
  --font-mono: 'Courier New', Consolas, 'Liberation Mono', monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Nunito Sans', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(0, 255, 180, 0.045), transparent 36%),
    radial-gradient(circle at 82% 14%, rgba(0, 180, 255, 0.04), transparent 32%),
    linear-gradient(150deg, var(--bg-1) 0%, var(--bg-2) 48%, var(--bg-3) 100%);
  overflow-x: hidden;
}

/* Grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 180, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 180, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 90%);
  pointer-events: none;
  z-index: -3;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ═══ FLOATING BG SHAPES ═══ */
.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  z-index: -2;
  opacity: 0.35;
  animation: drift 20s ease-in-out infinite;
}

.shape-one {
  width: 320px;
  height: 320px;
  background: rgba(0, 255, 180, 0.25);
  top: -70px;
  right: -80px;
}

.shape-two {
  width: 280px;
  height: 280px;
  background: rgba(0, 200, 255, 0.2);
  bottom: -120px;
  left: -70px;
  animation-delay: -4s;
}

.shape-three {
  width: 240px;
  height: 240px;
  background: rgba(100, 140, 255, 0.18);
  top: 40%;
  left: 8%;
  animation-delay: -7s;
}

/* ═══ TOPBAR ═══ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 1.45rem 0 1rem;
  animation: topbarIn 700ms ease both;
}

.topbar nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.topbar nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.topbar nav a:hover {
  border-color: rgba(0, 255, 180, 0.3);
  color: var(--neon);
  background: rgba(0, 255, 180, 0.06);
}

.topbar nav a[aria-current='page'] {
  border-color: rgba(0, 255, 180, 0.4);
  color: var(--neon);
  background: rgba(0, 255, 180, 0.08);
}

.brand {
  font-family: 'Merienda', sans-serif;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(140deg, var(--neon), var(--neon-2));
  color: var(--bg-1);
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 255, 180, 0.2);
  overflow: hidden;
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.brand-logo-image.visible {
  display: block;
}

.brand-logo-text.hidden {
  display: none;
}

/* ═══ CARD / GLASS PANELS ═══ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  position: relative;
}

/* Subtle neon left-edge accent on cards */
.card::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--neon), transparent);
  border-radius: 2px;
  opacity: 0.4;
}

/* ═══ HERO (public pages) ═══ */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  margin: 0.8rem 0 1.2rem;
  position: relative;
  overflow: hidden;
  animation: heroIn 900ms cubic-bezier(.2, .65, .2, 1) both;
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto -110px -130px auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 255, 180, 0.15) 0%, transparent 64%);
  pointer-events: none;
  animation: glowMove 8s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-art {
  position: relative;
  min-height: 240px;
}

.halo {
  position: absolute;
  right: 8%;
  top: 10%;
  width: 210px;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 180, 0.25);
  box-shadow:
    inset 0 0 42px rgba(0, 255, 180, 0.12),
    0 0 58px rgba(0, 255, 180, 0.15);
  animation: pulse 4s ease-in-out infinite;
}

.hero-stats {
  position: absolute;
  left: 6%;
  bottom: 0;
  padding: 1rem;
  max-width: 290px;
  border-radius: 14px;
  background: var(--surface-strong);
}

.hero-stats h3 {
  font-family: 'Merienda', cursive;
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.hero-stats p {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ═══ TYPOGRAPHY ═══ */
h1,
h2,
h3 {
  font-family: 'Merienda', sans-serif;
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.02;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--neon);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  text-shadow: 0 0 8px rgba(0, 255, 180, 0.2);
}

.role {
  color: #c0d8d0;
  font-size: 1.07rem;
  margin: 0.7rem 0 0.9rem;
}

.bio {
  max-width: 68ch;
  line-height: 1.75;
  color: #b8cec4;
}

.meta-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  color: #c8e0d6;
  margin: 1.1rem 0;
}

.meta-row span {
  border: 1px solid rgba(0, 255, 180, 0.15);
  background: rgba(0, 255, 180, 0.04);
  border-radius: 999px;
  padding: 0.34rem 0.76rem;
  font-size: 0.9rem;
}

.cta-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ═══ BUTTONS ═══ */
.btn {
  border: 0;
  border-radius: 10px;
  padding: 0.72rem 1.1rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(130deg, var(--neon), var(--neon-2));
  color: var(--bg-1);
  box-shadow: 0 12px 28px rgba(0, 255, 180, 0.2);
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.btn.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: btnSheen 4s ease-in-out infinite;
  pointer-events: none;
}

.btn.primary.is-dirty {
  box-shadow: 0 0 0 1px rgba(0, 255, 180, 0.5), 0 12px 28px rgba(0, 255, 180, 0.25);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary {
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 28px rgba(77, 163, 255, 0.2);
}

.btn.ghost {
  background: rgba(0, 255, 180, 0.06);
  color: var(--neon);
  border: 1px solid rgba(0, 255, 180, 0.18);
}

.btn.ghost:hover {
  background: rgba(0, 255, 180, 0.12);
  border-color: rgba(0, 255, 180, 0.35);
  box-shadow: 0 0 16px rgba(0, 255, 180, 0.08);
}

/* ═══ SOCIALS ═══ */
.socials {
  display: flex;
  gap: 0.58rem;
  flex-wrap: wrap;
}

.socials a {
  background: rgba(0, 255, 180, 0.06);
  border: 1px solid rgba(0, 255, 180, 0.15);
  color: var(--neon);
  padding: 0.44rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.socials a:hover {
  background: rgba(0, 255, 180, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 255, 180, 0.1);
}

/* ═══ SECTIONS ═══ */
.section {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  margin: 1rem 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.05rem;
  gap: 0.8rem;
}

.section-tools {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.section-tools input {
  min-width: 220px;
}

.admin-quickbar {
  position: sticky;
  top: 10px;
  z-index: 5;
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--ink);
}

.subsection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin: 0.8rem 0;
}

.subsection-head h3 {
  font-size: 1rem;
}

/* ═══ PREVIEW PANEL ═══ */
.preview-panel {
  margin-top: 1rem;
}

.preview-panel pre {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  background: rgba(5, 10, 20, 0.8);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--neon);
}

.advanced-options {
  margin-top: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem;
}

.advanced-options>summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--neon);
  margin-bottom: 0.55rem;
}

.helper {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.hint {
  font-size: 0.89rem;
  color: var(--ink-muted);
}

/* ═══ CHIPS ═══ */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.chip {
  padding: 0.54rem 0.88rem;
  border: 1px solid rgba(0, 255, 180, 0.18);
  background: rgba(0, 255, 180, 0.04);
  border-radius: 999px;
  font-weight: 600;
  color: var(--neon);
  font-size: 0.88rem;
  animation: chipIn 520ms ease both;
}

/* ═══ PROJECT CARDS ═══ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.project-card {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateY(0);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  animation: cardIn 560ms cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 80ms);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon);
  box-shadow: 0 0 20px var(--neon-dim), 0 14px 30px rgba(0, 0, 0, 0.35);
}

.project-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.44rem;
}

.project-card p {
  color: var(--ink-muted);
  line-height: 1.58;
  margin: 0 0 0.7rem;
  min-height: 66px;
}

.project-tech {
  display: inline-flex;
  margin-bottom: 0.68rem;
  color: var(--ink);
  font-size: 0.9rem;
}

.project-tech strong {
  color: var(--neon);
}

.project-links {
  display: flex;
  gap: 0.72rem;
  flex-wrap: wrap;
}

.project-links a {
  text-decoration: none;
  font-size: 0.89rem;
  color: var(--neon);
  font-weight: 700;
}

/* ═══ CONTACT ═══ */
.contact-card {
  background: var(--surface);
}

.contact-card p {
  color: var(--ink-muted);
  margin-top: 0.6rem;
}

/* ═══ REVEAL ANIMATION ═══ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(.2, .65, .2, 1), transform 0.6s cubic-bezier(.2, .65, .2, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ CONTACT STAGGER ═══ */
.contact-hero.in-view .eyebrow {
  animation: contactChildIn 600ms cubic-bezier(.2, .75, .2, 1) 100ms both;
}

.contact-hero.in-view h1 {
  animation: contactChildIn 600ms cubic-bezier(.2, .75, .2, 1) 200ms both;
}

.contact-hero.in-view .bio {
  animation: contactChildIn 600ms cubic-bezier(.2, .75, .2, 1) 350ms both;
}

.contact-hero.in-view .contact-actions {
  animation: contactChildIn 600ms cubic-bezier(.2, .75, .2, 1) 500ms both;
}

.contact-layout {
  display: grid;
  gap: 1rem;
  padding-bottom: 2.2rem;
}

.contact-hero h1 {
  max-width: 16ch;
}

.contact-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.contact-tile {
  border: 1px solid rgba(0, 255, 180, 0.12);
  border-radius: 14px;
  padding: 1rem;
  background: var(--surface);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

.contact-tile::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), var(--neon-2), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.contact-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 180, 0.35);
  box-shadow: 0 0 20px var(--neon-dim), 0 14px 30px rgba(0, 0, 0, 0.3);
}

.contact-tile:hover::before {
  opacity: 1;
}

.contact-tile h2 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.contact-tile p {
  margin: 0;
  color: var(--ink-muted);
}

.contact-note p {
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
}

/* ══════════════════════════════════════════════════════
   ADMIN PANEL — OPS CENTER STYLES
   ══════════════════════════════════════════════════════ */

.admin-body {
  background:
    radial-gradient(circle at 18% 10%, rgba(0, 255, 180, 0.05), transparent 32%),
    radial-gradient(circle at 82% 14%, rgba(0, 200, 255, 0.04), transparent 28%),
    linear-gradient(150deg, #04060d 0%, #0a1220 45%, #0d1828 100%);
}

.admin-wrap {
  padding: 1.5rem 0 2.2rem;
}

.admin-shell,
#editorSection {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

#editorSection> :not(.admin-sidebar-shell) {
  grid-column: 2;
  margin-top: 0;
}

.admin-body #editorSection>section {
  margin: 0 0 1rem;
}

.admin-body #editorSection>section:last-child {
  margin-bottom: 0;
}

/* ── ADMIN HEADER ── */
.admin-head {
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  min-height: 100px;
  border-color: rgba(0, 255, 180, 0.18);
  background:
    linear-gradient(135deg, rgba(0, 255, 180, 0.03), transparent 60%),
    var(--surface);
}

.admin-head::before {
  display: none;
}

.admin-head h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  background: linear-gradient(140deg, var(--neon), var(--neon-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── SIDEBAR ── */
.admin-sidebar-shell {
  grid-column: 1;
  grid-row: 1;
  position: fixed;
  top: 128px;
  left: max(4vw, calc((100vw - 1140px) / 2));
  width: 300px;
  height: calc(100vh - 140px);
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-color: rgba(0, 255, 180, 0.12);
}

.admin-sidebar-shell::before {
  display: none;
}

.admin-sidebar-header h2 {
  font-size: 1.15rem;
}

.admin-sidebar-shell .eyebrow {
  margin-bottom: 0.3rem;
}

/* ── NAVIGATION CLUSTERS ── */
.admin-clusters {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.cluster {
  border: 1px solid rgba(0, 255, 180, 0.1);
  border-radius: 12px;
  padding: 0.65rem;
  background: rgba(0, 255, 180, 0.02);
}

.cluster-title {
  margin: 0 0 0.4rem;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon);
  opacity: 0.6;
}

.cluster-links {
  display: grid;
  gap: 0.3rem;
}

.cluster-link {
  border: 1px solid rgba(0, 255, 180, 0.08);
  border-radius: 8px;
  padding: 0.48rem 0.6rem;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.cluster-link:hover {
  color: var(--neon);
  border-color: rgba(0, 255, 180, 0.2);
  background: rgba(0, 255, 180, 0.04);
  transform: translateX(3px);
  padding-left: 0.8rem;
}

.cluster-link.active {
  color: var(--neon);
  border-color: rgba(0, 255, 180, 0.35);
  background: rgba(0, 255, 180, 0.06);
  box-shadow: inset 3px 0 0 var(--neon);
  padding-left: 0.8rem;
}

/* ── SIDEBAR ACTIONS ── */
.admin-sidebar-actions {
  margin-top: auto;
  border-top: 1px solid rgba(0, 255, 180, 0.08);
  padding-top: 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.admin-sidebar-actions .btn {
  width: 100%;
}

/* ── ADMIN PANELS ── */
.admin-panel {
  margin: 0 0 1rem;
}

.admin-panel::before {
  display: none;
}

/* Scanline effect on section headers */
.admin-panel h2 {
  position: relative;
  display: inline-block;
}

.admin-panel h2::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: linear-gradient(90deg, var(--neon), transparent 70%);
  opacity: 0.3;
}

/* ── DASHBOARD ── */
.admin-dashboard-head {
  border-color: rgba(0, 255, 180, 0.15);
  display: grid;
  gap: 0.9rem;
  background:
    linear-gradient(135deg, rgba(0, 255, 180, 0.02), transparent 50%),
    var(--surface);
}

.admin-dashboard-head::before {
  display: none;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.admin-kpi {
  border: 1px solid rgba(0, 255, 180, 0.1);
  border-radius: 10px;
  padding: 0.85rem;
  background: rgba(0, 255, 180, 0.02);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.admin-kpi:hover {
  border-color: rgba(0, 255, 180, 0.25);
  box-shadow: 0 0 16px var(--neon-dim);
}

.admin-kpi p {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
}

.admin-kpi strong {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--neon);
  text-shadow: 0 0 12px rgba(0, 255, 180, 0.15);
}

.admin-dashboard-head .section-tools {
  justify-content: flex-start;
}

.admin-dashboard-head .status {
  margin-top: 0.2rem;
}

/* ═══ FORM FIELDS — TERMINAL STYLE ═══ */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field span {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input,
textarea,
select {
  border: 1px solid rgba(0, 255, 180, 0.12);
  background: rgba(5, 10, 20, 0.65);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 2px rgba(0, 255, 180, 0.1), 0 0 16px rgba(0, 255, 180, 0.06);
}

input::placeholder,
textarea::placeholder {
  color: rgba(0, 255, 180, 0.2);
  font-family: var(--font-mono);
}

textarea {
  resize: vertical;
}

/* ═══ RICH EDITOR ═══ */
.rich-editor-wrap {
  border: 1px solid rgba(0, 255, 180, 0.12);
  border-radius: 10px;
  background: rgba(5, 10, 20, 0.5);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rich-editor-wrap:focus-within {
  border-color: var(--neon);
  box-shadow: 0 0 0 2px rgba(0, 255, 180, 0.06);
}

.rich-toolbar {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  padding: 6px 8px;
  position: relative;
  background: rgba(0, 255, 180, 0.03);
  border-bottom: 1px solid rgba(0, 255, 180, 0.08);
  align-items: center;
}

.rich-toolbar .btn.ghost {
  padding: 4px 8px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 12px;
  min-width: 28px;
  text-align: center;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.rich-toolbar .btn.ghost:hover {
  background: rgba(0, 255, 180, 0.12);
  border-color: rgba(0, 255, 180, 0.2);
}

.rich-toolbar .btn.ghost.active {
  background: rgba(0, 255, 180, 0.15);
  border-color: rgba(0, 255, 180, 0.35);
  color: var(--neon);
}

.rich-toolbar .tb-sep {
  width: 1px;
  height: 20px;
  background: rgba(0, 255, 180, 0.1);
  margin: 0 4px;
  flex-shrink: 0;
}

.rich-editor {
  min-height: 220px;
  max-height: 500px;
  overflow-y: auto;
  border: none;
  border-radius: 0;
  padding: 12px 14px;
  background: transparent;
  color: var(--ink);
  line-height: 1.6;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px;
}

.rich-editor:focus {
  outline: none;
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  font-style: italic;
}

.insert-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 14, 26, 0.97);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  z-index: 5;
}

.insert-popover .btn.ghost {
  justify-content: flex-start;
  width: 100%;
}

.rich-editor h1,
.rich-editor h2 {
  font-family: 'Merienda', sans-serif;
  margin: 0.4rem 0 0.6rem;
}

.rich-editor h1 {
  font-size: 1.35rem;
}

.rich-editor h2 {
  font-size: 1.18rem;
}

.rich-editor blockquote {
  margin: 0.65rem 0;
  border-left: 3px solid var(--neon);
  padding-left: 0.7rem;
  color: var(--ink);
}

.rich-editor blockquote.pull-quote {
  border-left: 0;
  text-align: center;
  font-size: 1.05rem;
  font-style: italic;
}

.rich-editor pre {
  margin: 0.7rem 0;
  background: rgba(3, 6, 14, 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
  overflow-x: auto;
}

.rich-editor code {
  background: rgba(0, 255, 180, 0.08);
  border: 1px solid rgba(0, 255, 180, 0.15);
  border-radius: 5px;
  padding: 0.06rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--neon);
}

.rich-editor pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

.rich-editor hr.rich-separator {
  border: 0;
  border-top: 1px solid rgba(0, 255, 180, 0.1);
  margin: 1rem 0;
}

.rich-editor p.drop-caps::first-letter {
  float: left;
  font-size: 2.2em;
  line-height: 0.95;
  margin: 0.04em 0.18em 0 0;
  color: var(--neon);
}

.rich-editor img,
.rich-editor video,
.rich-editor iframe {
  max-width: 100%;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 10, 20, 0.6);
  margin: 0.65rem 0;
}

.rich-editor iframe {
  min-height: 220px;
}

/* ═══ GRID / LAYOUT ═══ */
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.field.full {
  grid-column: 1 / -1;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

/* ═══ EDITOR CARDS ═══ */
.project-editor {
  border: 1px solid rgba(0, 255, 180, 0.1);
  background: rgba(5, 10, 20, 0.6);
  border-radius: 10px;
  padding: 0.8rem;
  transition: border-color 0.25s ease;
}

.project-editor:hover {
  border-color: rgba(0, 255, 180, 0.2);
}

details.project-editor {
  padding: 0.5rem 0.8rem 0.8rem;
}

.editor-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  list-style: none;
  padding: 0.35rem 0;
}

.editor-summary::-webkit-details-marker {
  display: none;
}

.editor-summary-title {
  font-weight: 700;
  color: var(--ink);
}

.editor-summary-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.editor-summary-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(0, 255, 180, 0.15);
  background: rgba(0, 255, 180, 0.03);
}

.editor-summary-text {
  display: grid;
  gap: 0.25rem;
}

.editor-summary-text .editor-summary-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-summary-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  border: 1px solid rgba(0, 255, 180, 0.15);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  color: var(--neon);
  background: rgba(0, 255, 180, 0.04);
  letter-spacing: 0.04em;
}

.editor-summary-hint {
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
  font-family: var(--font-mono);
}

.managed-item {
  cursor: grab;
}

.managed-item.dragging {
  opacity: 0.45;
  border-style: dashed;
}

.editor-body {
  margin-top: 0.7rem;
}

.project-editor .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

/* ═══ ACTION ROW / STATUS ═══ */
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.status {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.status[data-tone='success'] {
  color: var(--neon);
  text-shadow: 0 0 8px rgba(0, 255, 180, 0.2);
}

.status[data-tone='error'] {
  color: var(--danger);
}

.status[data-tone='info'] {
  color: var(--accent);
}

/* ═══ BLOCK EDITOR ═══ */
.block-editor {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
  background: rgba(5, 10, 20, 0.5);
}

.block-toolbar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.block-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.block-item {
  border: 1px solid rgba(0, 255, 180, 0.08);
  border-radius: 8px;
  padding: 0.55rem;
  background: rgba(5, 10, 20, 0.5);
}

.block-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.block-item-head span {
  font-size: 0.72rem;
  color: var(--neon);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  opacity: 0.6;
}

/* ═══ THEME PREVIEW ═══ */
.theme-preview {
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  background: rgba(5, 10, 20, 0.4);
}

.theme-preview span {
  color: var(--ink-muted);
  font-weight: 700;
  margin-right: 0.2rem;
}

/* ═══ COLOR PICKER ═══ */
input[type='color'] {
  width: 56px;
  min-height: 56px;
  padding: 0.15rem;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid rgba(0, 255, 180, 0.2);
  background: rgba(5, 10, 20, 0.6);
}

input[type='color']:hover {
  border-color: var(--neon);
  box-shadow: 0 0 12px rgba(0, 255, 180, 0.1);
}

.color-pair {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.5rem;
  align-items: center;
}

.color-pair input[type='text'] {
  text-transform: lowercase;
}

/* ═══ UPLOAD BOX ═══ */
.upload-box {
  border: 1px dashed rgba(0, 255, 180, 0.15);
  border-radius: 10px;
  padding: 0.7rem;
  background: rgba(0, 255, 180, 0.02);
  transition: border-color 0.2s ease;
}

.upload-box:hover {
  border-color: rgba(0, 255, 180, 0.3);
}

.upload-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ═══ TOAST NOTIFICATIONS ═══ */
.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  z-index: 30;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  max-width: 340px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(6, 12, 22, 0.95);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: toastIn 200ms ease-out;
  backdrop-filter: blur(12px);
}

.toast.success {
  border-color: var(--neon);
  color: var(--neon);
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

.toast.info {
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══ KEYFRAME ANIMATIONS ═══ */
@keyframes drift {

  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  50% {
    transform: translateY(18px) translateX(6px);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@keyframes topbarIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes glowMove {

  0%,
  100% {
    transform: translateX(0) translateY(0);
  }

  50% {
    transform: translateX(-10px) translateY(-12px);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chipIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  100% {
    background-position: -200% 0;
  }
}

@keyframes contactChildIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══ CURSOR EFFECTS ═══ */
.fx-global-light {
  position: fixed;
  left: 0;
  top: 0;
  width: 360px;
  height: 360px;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-9999px, -9999px, 0) translate(-50%, -50%);
  background:
    radial-gradient(circle at center,
      rgba(0, 255, 180, 0.4) 0%,
      rgba(0, 255, 180, 0.15) 22%,
      rgba(0, 200, 255, 0.08) 40%,
      transparent 65%);
  filter: blur(132px);
  mix-blend-mode: screen;
  transition: opacity 280ms ease;
}

.fx-global-light-low {
  z-index: 0;
  width: 420px;
  height: 420px;
}

.fx-global-light-high {
  z-index: 7;
}

body.cursor-light-active .fx-global-light-low {
  opacity: 0.08;
}

body.cursor-light-active .fx-global-light-high {
  opacity: 0.1;
}

/* Crosshair cursor */
.fx-cursor-dot,
.fx-cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 12000;
  opacity: 0;
  transition: opacity 160ms ease;
}

.fx-cursor-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon-glow);
  transform: translate(-50%, -50%);
}

.fx-cursor-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 255, 180, 0.45);
  background: transparent;
  transform: translate(-50%, -50%) rotate(0deg);
  transition:
    border-radius 250ms ease,
    border-color 250ms ease,
    background 250ms ease,
    width 250ms ease,
    height 250ms ease,
    transform 250ms ease;
}

.fx-crosshair-line {
  position: absolute;
  background: rgba(0, 255, 180, 0.55);
  transition: opacity 200ms ease;
}

.fx-crosshair-line:nth-child(1) {
  width: 1.5px;
  height: 8px;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
}

.fx-crosshair-line:nth-child(2) {
  width: 1.5px;
  height: 8px;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
}

.fx-crosshair-line:nth-child(3) {
  width: 8px;
  height: 1.5px;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
}

.fx-crosshair-line:nth-child(4) {
  width: 8px;
  height: 1.5px;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
}

body.custom-cursor-enabled .fx-cursor-dot,
body.custom-cursor-enabled .fx-cursor-ring {
  opacity: 1;
}

body.custom-cursor-enabled {
  cursor: none;
}

body.custom-cursor-enabled a,
body.custom-cursor-enabled button,
body.custom-cursor-enabled .btn,
body.custom-cursor-enabled .topbar nav a,
body.custom-cursor-enabled .cluster-link {
  cursor: none;
}

body.custom-cursor-enabled input,
body.custom-cursor-enabled textarea,
body.custom-cursor-enabled select {
  cursor: text;
}

body.cursor-hovering .fx-cursor-ring {
  border-radius: 4px;
  width: 16px;
  height: 16px;
  border-color: var(--neon);
  background: rgba(0, 255, 180, 0.18);
  transform: translate(-50%, -50%) rotate(45deg);
}

body.cursor-hovering .fx-crosshair-line {
  opacity: 0;
}

body.cursor-pressed .fx-cursor-ring {
  width: 12px;
  height: 12px;
  background: rgba(0, 255, 180, 0.32);
  transform: translate(-50%, -50%) rotate(45deg) scale(0.8);
}

/* Card spotlight */
.card-spotlight {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --mx: 50%;
  --my: 50%;
}

.card-spotlight::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background:
    radial-gradient(220px circle at var(--mx) var(--my),
      rgba(0, 255, 180, 0.14) 0%,
      rgba(0, 255, 180, 0.06) 30%,
      transparent 70%);
  transition: opacity 220ms ease;
}

.card-spotlight.is-pointer::before,
.card-spotlight:hover::before {
  opacity: 1;
}

.card-spotlight>* {
  position: relative;
  z-index: 1;
}

/* ═══ AMBIENT ORBS ═══ */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0;
  animation: orbFloat 22s ease-in-out infinite, orbFadeIn 1.5s ease 0.6s forwards;
}

.ambient-orb--1 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(0, 255, 180, 0.12), transparent 68%);
  top: 8%;
  right: -6%;
}

.ambient-orb--2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.1), transparent 68%);
  bottom: 12%;
  left: -4%;
  animation-delay: -6s, 1s;
}

.ambient-orb--3 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(100, 160, 255, 0.08), transparent 68%);
  top: 55%;
  right: 15%;
  animation-delay: -12s, 1.4s;
}

/* ═══ SCROLL PROGRESS ═══ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 100;
  pointer-events: none;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--neon), var(--neon-2), var(--neon));
  transition: transform 60ms linear;
  box-shadow: 0 0 8px rgba(0, 255, 180, 0.3);
}

/* ═══ BUTTON RIPPLE ═══ */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 255, 180, 0.2);
  transform: scale(0);
  animation: rippleExpand 600ms ease-out forwards;
  pointer-events: none;
}

/* ═══ BG SHAPE PULSE ═══ */
.shape-one {
  animation: drift 18s ease-in-out infinite, shapePulse 6s ease-in-out infinite;
}

.shape-two {
  animation: drift 18s ease-in-out infinite, shapePulse 8s ease-in-out infinite;
  animation-delay: -4s, -2s;
}

.shape-three {
  animation: drift 18s ease-in-out infinite, shapePulse 7s ease-in-out infinite;
  animation-delay: -7s, -3s;
}

/* ═══ CONTACT TILE STAGGER ═══ */
.contact-tile h2 {
  animation: headingSlideIn 0.5s cubic-bezier(.2, .75, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 100ms + 200ms);
}

.contact-tile p {
  animation: headingSlideIn 0.5s cubic-bezier(.2, .75, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 100ms + 350ms);
}

/* ═══ MOTION RISE ═══ */
.motion-rise {
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  animation: riseStagger 420ms cubic-bezier(.2, .75, .2, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes riseStagger {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(20px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-15px, 15px) scale(0.96);
  }
}

@keyframes orbFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes rippleExpand {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes shapePulse {

  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes headingSlideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ═══ RESPONSIVE ═══ */
@media (pointer: coarse) {

  .fx-global-light,
  .fx-cursor-dot,
  .fx-cursor-ring {
    display: none !important;
  }

  .ambient-orb {
    display: none !important;
  }
}

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

  .hero-art {
    min-height: 180px;
  }

  .hero-stats {
    position: relative;
    left: 0;
    max-width: 100%;
  }

  .halo {
    width: 160px;
    right: 2%;
  }
}

@media (max-width: 760px) {
  #editorSection {
    grid-template-columns: 1fr;
  }

  #editorSection> :not(.admin-sidebar-shell) {
    grid-column: auto;
  }

  .admin-sidebar-shell {
    position: static;
    grid-row: auto;
    left: auto;
    width: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .admin-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid.two,
  .project-editor .grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding-top: 1rem;
  }

  .action-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .shape-three {
    display: none;
  }

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

  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }

  .admin-kpi strong {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .section-tools input {
    min-width: 0;
  }
}