/* ─── Skeleton loaders ─────────────────────────────── */
/* Use on a placeholder element while waiting for Firestore data
   to arrive. Gives a perceived-speed boost — empty space feels
   slower than a shimmering placeholder of the same area.

   Usage:
     <div class="skel skel-card"></div>        // card-shaped block
     <div class="skel skel-line w-3/4"></div>  // text line
     <div class="skel skel-circle w-12 h-12"></div>  // avatar */
.skel {
    background-color: #0D1526;
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-repeat: no-repeat;
    background-size: 200% 100%;
    animation: skel-shimmer 1.4s ease-in-out infinite;
    border: 1px solid #1E2D4A;
    border-radius: 12px;
}
.skel-card  { height: 18rem; }
.skel-line  { height: 0.9rem; border-radius: 9999px; margin: 0.4rem 0; }
.skel-circle { border-radius: 9999px; }
html:not(.dark) .skel { background-color: #e2e8f0; border-color: #cbd5e1; }
html:not(.dark) .skel { background-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.04) 50%, rgba(0,0,0,0) 100%); }
@keyframes skel-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Custom Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050B18; }
::-webkit-scrollbar-thumb { background: #1E2D4A; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #00D8FF; }

/* ─── Base ─────────────────────────────────────────── */
body { background-color: #050B18; }

html { scroll-padding-top: 90px; }

::selection { background: #00D8FF; color: #050B18; }

/* ─── Typewriter cursor ────────────────────────────── */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: #00D8FF;
    margin-left: 3px;
    vertical-align: text-bottom;
    animation: blink 0.9s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ─── Floating animation ───────────────────────────── */
.animate-float {
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* ─── Tech marquee (auto-scrolling ribbon under hero) ── */
.marquee-track {
    animation: marquee 40s linear infinite;
}
.marquee-wrap:hover .marquee-track {
    animation-play-state: paused;
}
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
html:not(.dark) .marquee-wrap .text-slate-700 { color: #94a3b8 !important; }

/* ─── Stat chips (hero) ────────────────────────────── */
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 216, 255, 0.07);
    border: 1px solid rgba(0, 216, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ─── Stats cards (about) ──────────────────────────── */
.stats-card {
    padding: 1rem;
    background: #0D1526;
    border: 1px solid #1E2D4A;
    border-radius: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.8;
}

/* ─── Skill cards ──────────────────────────────────── */
.skill-card {
    background: #0D1526;
    border: 1px solid #1E2D4A;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.3s, transform 0.3s;
}
.skill-card:hover {
    border-color: rgba(0, 216, 255, 0.3);
    transform: translateY(-4px);
}
.skill-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.skill-bar {
    width: 100%;
    height: 4px;
    background: #1E2D4A;
    border-radius: 2px;
    overflow: hidden;
}
.skill-bar-fill {
    height: 100%;
    border-radius: 2px;
}

/* ─── App cards ────────────────────────────────────── */
.app-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.app-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 216, 255, 0.12);
}

/* ─── Impact cards ─────────────────────────────────── */
.impact-card {
    background: #0D1526;
    border: 1px solid #1E2D4A;
    border-radius: 1rem;
    padding: 1.75rem;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}
.impact-card:hover {
    border-color: rgba(0, 216, 255, 0.3);
    transform: translateY(-4px);
}

/* ─── Category pills (impact) ──────────────────────── */
.category-pill {
    background: #0D1526;
    border: 1px solid #1E2D4A;
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color 0.3s;
}
.category-pill:hover { border-color: rgba(0, 216, 255, 0.3); }

/* ─── Contact links ────────────────────────────────── */
.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #0D1526;
    border: 1px solid #1E2D4A;
    border-radius: 0.75rem;
    transition: border-color 0.2s;
    text-decoration: none;
}
.contact-link:hover { border-color: rgba(0, 216, 255, 0.3); }
.contact-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ─── Contact form inputs ──────────────────────────── */
.contact-input {
    width: 100%;
    background: #0D1526;
    border: 1px solid #1E2D4A;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
    transition: border-color 0.2s;
    outline: none;
    font-family: inherit;
}
.contact-input::placeholder { color: #475569; }
.contact-input:focus { border-color: #00D8FF; }

/* ─── Filter buttons ───────────────────────────────── */
.filter-btn:focus { outline: none; }

/* ─── Loader ───────────────────────────────────────── */
#loader { transition: opacity 0.5s ease; }

/* ─── Section reveal (kept for compatibility) ──────── */
.section-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}
.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Navbar scrolled state ────────────────────────── */
.nav-scrolled {
    background-color: rgba(5, 11, 24, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
html:not(.dark) .nav-scrolled {
    background-color: rgba(248, 250, 252, 0.97) !important;
}

/* ─── Home-page-only light mode tweaks ───────────────────────────────
   Most light mode rules live in css/light-mode.css (shared across all
   pages). This block holds index.html-specific extras: the home-page
   stat-chip / app-card / category-pill / contact-link / filter-btn /
   gallery-slider components, plus the hero navbar styling. */

html:not(.dark) .stats-card,
html:not(.dark) .skill-card,
html:not(.dark) .impact-card,
html:not(.dark) .category-pill,
html:not(.dark) .contact-link,
html:not(.dark) .app-card               {
    background-color: #ffffff !important;
    border-color: #d4dce6 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.05);
}
html:not(.dark) .app-card:hover         {
    border-color: rgba(0, 216, 255, 0.4) !important;
    box-shadow: 0 20px 50px rgba(0, 216, 255, 0.15), 0 4px 16px rgba(15, 23, 42, 0.08);
}

html:not(.dark) .stat-chip              {
    background: rgba(0, 216, 255, 0.08) !important;
    border-color: rgba(8, 145, 178, 0.35) !important;
    color: #334155 !important;
}
html:not(.dark) .stat-chip strong       { color: #0f172a !important; }
html:not(.dark) .stat-chip .text-accent { color: #0891b2 !important; }

html:not(.dark) .contact-input          { background-color: #ffffff !important; border-color: #d4dce6 !important; color: #0f172a !important; }
html:not(.dark) .contact-input:focus    { border-color: #00D8FF !important; box-shadow: 0 0 0 3px rgba(0, 216, 255, 0.15); }

html:not(.dark) .filter-btn             { color: #475569 !important; }
html:not(.dark) .filter-btn:not(.bg-cyan-500) {
    background-color: #ffffff !important;
    border: 1px solid #d4dce6;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html:not(.dark) .gallery-slider         { background-color: #ffffff !important; box-shadow: inset 0 0 0 1px #d4dce6; }
html:not(.dark) .skill-bar              { background: #e2e8f0 !important; }
html:not(.dark) .font-mono              { color: #334155; }

html:not(.dark) #navbar                 { background-color: rgba(238, 242, 248, 0.85) !important; backdrop-filter: blur(12px); }
html:not(.dark) #navbar.nav-scrolled    { border-bottom: 1px solid #d4dce6; }

/* ═══════════════════════════════════════════════════════════════════════════
   INLINE PAGE EDITOR — Admin UI (002-inline-page-editor)
   All rules prefixed az- so they never collide with public page styles.
   Only injected into DOM when admin is authenticated.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Admin Bar ─────────────────────────────────────────────────────────── */
#az-admin-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: linear-gradient(90deg, #050B18 0%, #0D1526 100%);
  border-bottom: 1px solid rgba(0, 216, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  gap: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

body.az-admin-mode { padding-top: 44px; }

.az-admin-bar-left,
.az-admin-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.az-admin-icon { color: #00D8FF; font-size: 14px; }

.az-admin-email {
  color: #94a3b8;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status indicator */
#az-admin-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.az-status-live {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.az-status-unsaved {
  background: rgba(234, 179, 8, 0.12);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.25);
  animation: az-pulse 2s ease-in-out infinite;
}

@keyframes az-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.az-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Bar links & exit */
.az-bar-link {
  color: #64748b;
  text-decoration: none;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.az-bar-link:hover { color: #00D8FF; border-color: rgba(0, 216, 255, 0.3); background: rgba(0, 216, 255, 0.05); }

.az-bar-exit {
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}
.az-bar-exit:hover { background: rgba(239, 68, 68, 0.1); }

/* ─── Section Hover Triggers ─────────────────────────────────────────────── */
.az-section-editable { position: relative; }

.az-section-editable::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px dashed transparent;
  border-radius: 4px;
  pointer-events: none;
  transition: border-color 0.25s ease;
  z-index: 1;
}
.az-section-editable:hover::after { border-color: rgba(0, 216, 255, 0.3); }

.az-edit-trigger {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: rgba(0, 216, 255, 0.1);
  border: 1px solid rgba(0, 216, 255, 0.35);
  color: #00D8FF;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 216, 255, 0.15);
}
.az-section-editable:hover .az-edit-trigger {
  opacity: 1;
  transform: translateY(0);
}
.az-edit-trigger:hover {
  background: rgba(0, 216, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 216, 255, 0.25);
}

/* ─── Panel Backdrop ──────────────────────────────────────────────────────── */
#az-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 24, 0.5);
  backdrop-filter: blur(3px);
  z-index: 10000;
  cursor: pointer;
}

/* ─── Section Edit Panel (Right Drawer) ──────────────────────────────────── */
#az-section-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: #0D1526;
  border-left: 1px solid #1E2D4A;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
  font-family: 'Inter', sans-serif;
}
#az-section-panel.open { transform: translateX(0); }

.az-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #1E2D4A;
  background: linear-gradient(135deg, #0D1526 0%, #131f35 100%);
  flex-shrink: 0;
}

.az-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.az-panel-section-icon {
  width: 32px;
  height: 32px;
  background: rgba(0, 216, 255, 0.1);
  border: 1px solid rgba(0, 216, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00D8FF;
  font-size: 13px;
  flex-shrink: 0;
}

.az-panel-heading {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
  line-height: 1.2;
}

.az-panel-close {
  background: none;
  border: 1px solid #1E2D4A;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.az-panel-close:hover { color: #f1f5f9; border-color: #2D3F57; background: #1E2D4A; }

.az-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: #1E2D4A transparent;
}
.az-panel-body::-webkit-scrollbar { width: 4px; }
.az-panel-body::-webkit-scrollbar-track { background: transparent; }
.az-panel-body::-webkit-scrollbar-thumb { background: #1E2D4A; border-radius: 2px; }

.az-panel-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #1E2D4A;
  background: #0a0f1e;
  flex-shrink: 0;
}

.az-btn-cancel {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #1E2D4A;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}
.az-btn-cancel:hover { background: #1E2D4A; color: #f1f5f9; }

.az-btn-save {
  flex: 2;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #00D8FF, #0099cc);
  color: #050B18;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.az-btn-save:hover:not(:disabled) {
  background: linear-gradient(135deg, #06E0FF, #00aee0);
  box-shadow: 0 4px 16px rgba(0, 216, 255, 0.35);
  transform: translateY(-1px);
}
.az-btn-save:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ─── Field Components ───────────────────────────────────────────────────── */
.az-panel-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.az-field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.az-panel-input {
  width: 100%;
  padding: 9px 12px;
  background: #0a0f1e;
  border: 1px solid #1E2D4A;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  resize: vertical;
}
.az-panel-input:focus {
  border-color: #00D8FF;
  box-shadow: 0 0 0 3px rgba(0, 216, 255, 0.12);
}
.az-panel-input::placeholder { color: #334155; }

.az-panel-textarea { resize: vertical; min-height: 80px; }

.az-panel-json {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: #06090f;
}

.az-panel-help {
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
  margin: 0;
}

.az-panel-error {
  font-size: 11px;
  color: #f87171;
  font-weight: 500;
  min-height: 14px;
  margin: 0;
}

.az-panel-empty {
  color: #475569;
  font-size: 13px;
  text-align: center;
  padding: 40px 0;
  margin: 0;
}

/* ─── Image Field ────────────────────────────────────────────────────────── */
.az-image-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #0a0f1e;
  border: 1px solid #1E2D4A;
  border-radius: 8px;
}

.az-image-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #1E2D4A;
  flex-shrink: 0;
  background: #1E2D4A;
}

.az-image-change-btn {
  background: rgba(0, 216, 255, 0.08);
  border: 1px solid rgba(0, 216, 255, 0.25);
  color: #00D8FF;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.az-image-change-btn:hover { background: rgba(0, 216, 255, 0.15); }

.az-image-url-input { margin-top: 2px; font-size: 11px; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  #az-section-panel { width: 100vw; }
  .az-admin-email { display: none; }
  .az-bar-link { display: none; }
}
