/* ── VARIABLES & RESET ── */
:root {
  --blue-light:     #93c5fd;
  --blue-main:      #3b82f6;
  --blue-dark:      #2563eb;
  --blue-text:      #1e40af;
  --bg-dark:        #18181b;
  --bg-dark2:       #27272a;
  --text-main:      #f1f5f9;
  --text-muted:     #94a3b8;
  --border:         rgba(59, 130, 246, 0.18);
  --card-bg:        rgba(255, 255, 255, 0.04);
  --label-color:    #93c5fd;
}
[data-theme='light'] {
  --blue-light:     #1d4ed8;
  --blue-main:      #2563eb;
  --blue-dark:      #1e40af;
  --blue-text:      #1e3a8a;
  --bg-dark:        #f8fafc;
  --bg-dark2:       #e2e8f0;
  --text-main:      #0f172a;
  --text-muted:     #475569;
  --border:         rgba(37, 99, 235, 0.18);
  --card-bg:        #ffffff;
  --label-color:    #1e3a8a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark2) 100%);
  min-height: 100vh;
  color: var(--text-main);
}

/* ── BACKGROUND GLOWS ── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  opacity: 0.25;
  pointer-events: none;
}
body::before {
  width: 420px; height: 420px;
  background: var(--blue-main);
  top: -80px; left: -80px;
}
body::after {
  width: 480px; height: 480px;
  background: var(--blue-main);
  bottom: -80px; right: -80px;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(24, 24, 27, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

[data-theme='light'] .navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(37, 99, 235, 0.15);
}

.navbar-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--blue-main);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.nav-logo-short {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
  margin-right: auto;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 36px;
  line-height: 1;
}

.nav-links a:hover,
.nav-links a.nav-active {
  color: var(--blue-main);
}

.nav-btn-action,
.nav-register-btn {
  border-color: rgba(59, 130, 246, 0.4) !important;
  color: var(--blue-light) !important;
  padding: 0 0.85rem !important;
  height: 36px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
}

.nav-btn-action:hover {
  background: rgba(59, 130, 246, 0.12) !important;
  border-color: var(--blue-main) !important;
  transform: translateY(-1px);
}

.nav-register-btn {
  background: transparent !important;
  border-color: rgba(147, 197, 253, 0.38) !important;
}

.nav-register-mobile {
  display: none !important;
}

.nav-register-btn:hover {
  background: rgba(59, 130, 246, 0.1) !important;
}

[data-theme='light'] .nav-btn-action {
  color: #1d4ed8 !important;
  border-color: rgba(37, 99, 235, 0.4) !important;
}

/* ── Navbar Actions ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

#userNavSlot,
.user-nav-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nav-signin-btn {
  background: var(--blue-main) !important;
  border: 1px solid var(--blue-main) !important;
  color: #ffffff !important;
  box-shadow: 0 5px 16px rgba(59, 130, 246, 0.24);
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 0.9rem !important;
  font-size: 0.78rem !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.nav-signin-btn:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.theme-toggle {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue-main);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  box-sizing: border-box;
}

.theme-toggle:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--blue-main);
  transform: translateY(-1px);
}

[data-theme='light'] .theme-toggle {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
}

/* User pill & Notif Bell in Nav */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  padding: 0 0.85rem;
  height: 36px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  flex-shrink: 0;
  box-sizing: border-box;
  white-space: nowrap;
}

[data-theme='light'] .user-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.user-pill .user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.user-pill-logout:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

[data-theme='light'] .user-pill-logout:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.role-badge {
  background: var(--blue-main);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue-light);
  border-radius: 999px;
  padding: 0 0.65rem;
  height: 36px;
  min-width: 36px;
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-sizing: border-box;
  line-height: 1;
}

.notif-bell-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--blue-main);
  transform: translateY(-1px);
}

[data-theme='light'] .notif-bell-btn {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
}

.notif-badge {
  background: #ef4444;
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.12rem 0.42rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 17px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--blue-main);
  border-radius: 2px;
  transition: 0.3s;
}

/* ── Form Labels Across All Pages & Modals (Dark Mode Default) ── */
label,
.form-label,
.input-field label,
.form-group label,
.filter-group label,
.info-label,
.detail-label,
.slip-overlay label,
.modal label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--label-color, #93c5fd);
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

[data-theme='dark'] label,
[data-theme='dark'] .form-label,
[data-theme='dark'] .input-field label,
[data-theme='dark'] .form-group label,
[data-theme='dark'] .filter-group label,
[data-theme='dark'] .info-label,
[data-theme='dark'] .detail-label,
[data-theme='dark'] .slip-overlay label,
[data-theme='dark'] .modal label {
  color: #93c5fd !important;
  font-weight: 700 !important;
}

/* ── SECTION DIVIDER ── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: 900px;
  margin: 0 auto;
}

/* ── SHARED SECTION WRAPPER ── */
.hero-section,
.tools-section,
.projects-section,
.timeline-section,
.contact-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  position: relative;
  z-index: 1;
}

h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue-main);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

/* ── HERO ── */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  min-height: calc(100vh - 60px);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.hero-text {
  flex: 1;
}

.hero-greeting {
  font-size: 1.1rem;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.hero-name {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
  padding-bottom: 0.18em;
  margin-bottom: 0.5rem;
  display: block;
  background: linear-gradient(90deg, #ffffff 40%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue-main);
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
}

.hero-bio {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #1d4ed8 100%);
  box-shadow: 0 6px 22px rgba(59, 130, 246, 0.55);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1.5px solid rgba(59, 130, 246, 0.5);
  color: var(--blue-main);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--blue-main);
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--blue-main);
}

/* Avatar / photo */
.hero-avatar {
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.15);
}

.avatar-placeholder img,
.hero-avatar img {
  width: 240px;
  height: 300px;
  border-radius: 16px;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.25), 0 8px 32px rgba(0,0,0,0.4);
}

.hero-seal {
  width: 180px;
  height: 180px;
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16), rgba(17, 24, 39, 0.25) 68%);
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.05), 0 0 36px rgba(59, 130, 246, 0.18);
}

.hero-avatar .hero-seal img {
  width: 132px;
  height: 132px;
  border: 0;
  border-radius: 50%;
  object-fit: contain;
  object-position: center;
  box-shadow: none;
}

/* ── TOOLS ── */
.tools-section h2 {
  margin-bottom: 1.75rem;
}

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tool-chip {
  padding: 0.45rem 1rem;
  border: 1.5px solid rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-light);
  background: rgba(59, 130, 246, 0.07);
  transition: background 0.2s, border-color 0.2s;
}

.tool-chip:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.6);
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  grid-auto-rows: minmax(390px, auto);
}

.projects-grid > .project-card {
  min-width: 0;
  min-height: 390px;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.projects-grid .item-card-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.projects-grid .item-card-category-ref {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  min-width: 0;
}

.projects-grid .item-card-category-ref .ref-code {
  margin-left: 0 !important;
  overflow-wrap: anywhere;
}

.projects-grid .item-badge {
  flex: 0 0 auto;
  white-space: nowrap;
}

.projects-grid .item-card-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 2.72em;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.12);
  transform: translateY(-3px);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.project-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.project-card h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.project-type {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue-main);
  background: rgba(59, 130, 246, 0.07);
}

.project-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-dark);
  text-decoration: none;
  transition: color 0.2s;
  margin-top: auto;
}

.project-link:hover {
  color: var(--blue-main);
  text-decoration: underline;
}

/* ── TIMELINE (Experience & Certifications) ── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid rgba(59, 130, 246, 0.2);
  padding-left: 1.75rem;
  margin-left: 0.5rem;
}

.tl-item {
  position: relative;
  padding-bottom: 2.25rem;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -2.25rem;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.tl-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-dark);
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 6px;
  display: inline-block;
  padding: 0.15rem 0.55rem;
}

.tl-body h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.tl-company {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-main);
  margin-bottom: 0.5rem;
}

.tl-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── CONTACT ── */
.contact-section {
  text-align: center;
  padding-bottom: 6rem;
}

.contact-section h2 {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-main);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.contact-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-email {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-main);
  text-decoration: none;
  border-bottom: 2px solid rgba(59, 130, 246, 0.4);
  padding-bottom: 2px;
  letter-spacing: 0.03em;
  transition: color 0.2s, border-color 0.2s;
}

.contact-email:hover {
  color: var(--blue-light);
  border-color: var(--blue-main);
}

/* ── FOOTER ── */
.site-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-left p,
.footer-right p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-right {
  text-align: right;
}

/* ── DROPDOWN OPTGROUP & OPTIONS HIGH CONTRAST ── */
select optgroup {
  background-color: #18181b !important;
  color: #3b82f6 !important;
  font-weight: 800 !important;
  font-style: normal !important;
  font-size: 0.88rem !important;
  padding: 0.4rem 0.2rem !important;
}

select option {
  background-color: #27272a !important;
  color: #f8fafc !important;
  font-weight: 500 !important;
  padding: 0.35rem !important;
}

[data-theme='light'] select optgroup { background-color: #f1f5f9 !important; color: #2563eb !important; }
[data-theme='light'] select option { background-color: #ffffff !important; color: #0f172a !important; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .nav-logo-full { display: none; }
  .nav-logo-short { display: inline; }
}

@media (max-width: 768px) {
  .nav-actions > .nav-register-btn {
    display: none !important;
  }

  .nav-links .nav-register-mobile {
    display: inline-flex !important;
  }

  .hero-section {
    flex-direction: column-reverse;
    text-align: center;
    align-items: center;
    gap: 2rem;
    min-height: auto;
    padding-top: 3rem;
  }

  .hero-seal {
    width: 150px;
    height: 150px;
  }

  .hero-avatar .hero-seal img {
    width: 110px;
    height: 110px;
  }

  .hero-bio {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons,
  .social-links {
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: rgba(24, 24, 27, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  [data-theme='light'] .nav-links {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links {
    margin-left: 0;
    margin-right: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .footer-right {
    text-align: left;
  }
}

/* ── LIGHT THEME COMPONENT OVERRIDES ── */
[data-theme='light'] body::before,
[data-theme='light'] body::after {
  opacity: 0.10;
}

[data-theme='light'] .hero-greeting {
  color: #475569;
}

[data-theme='light'] .hero-name {
  background: linear-gradient(90deg, #0f172a 40%, var(--blue-main) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme='light'] .hero-bio {
  color: #475569;
}

[data-theme='light'] .simple-card,
[data-theme='light'] .project-card,
[data-theme='light'] .item-card,
[data-theme='light'] .stat-box,
[data-theme='light'] .stat-card,
[data-theme='light'] .filter-bar,
[data-theme='light'] .claim-card,
[data-theme='light'] .pin-card,
[data-theme='light'] .auth-card,
[data-theme='light'] .detail-card,
[data-theme='light'] .sidebar-card,
[data-theme='light'] .admin-table-wrap {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

[data-theme='light'] .project-title,
[data-theme='light'] .item-card-title,
[data-theme='light'] .auth-header h1,
[data-theme='light'] .pin-box h2,
[data-theme='light'] .detail-title {
  color: #0f172a;
}

[data-theme='light'] .project-desc,
[data-theme='light'] .item-card-desc,
[data-theme='light'] .auth-header p,
[data-theme='light'] .pin-box p {
  color: #64748b;
}

[data-theme='light'] .stat-lbl {
  color: #475569 !important;
  font-weight: 700 !important;
}

[data-theme='light'] label,
[data-theme='light'] .form-label,
[data-theme='light'] .input-field label,
[data-theme='light'] .form-group label,
[data-theme='light'] .filter-group label,
[data-theme='light'] .info-label,
[data-theme='light'] .detail-label,
[data-theme='light'] .slip-overlay label,
[data-theme='light'] .modal label {
  color: #1e3a8a !important; /* Deep navy for maximum contrast and readability in light mode */
  font-weight: 700 !important;
}

[data-theme='light'] .required,
[data-theme='light'] label span.required,
[data-theme='light'] .form-label .required {
  color: #dc2626 !important;
  font-weight: 800;
}

[data-theme='light'] .input-field input,
[data-theme='light'] .input-field select,
[data-theme='light'] .input-field textarea,
[data-theme='light'] .form-control,
[data-theme='light'] .form-group input,
[data-theme='light'] .form-group select,
[data-theme='light'] .form-group textarea,
[data-theme='light'] .search-box input,
[data-theme='light'] .slip-overlay input,
[data-theme='light'] .slip-overlay select,
[data-theme='light'] .slip-overlay textarea,
[data-theme='light'] .modal input,
[data-theme='light'] .modal select,
[data-theme='light'] .modal textarea {
  background: #ffffff !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
  color: #0f172a !important;
}

/* ── Input Placeholders ── */
input::placeholder,
textarea::placeholder,
select::placeholder,
.form-control::placeholder {
  color: #94a3b8;
  opacity: 0.85;
}

[data-theme='dark'] input::placeholder,
[data-theme='dark'] textarea::placeholder,
[data-theme='dark'] select::placeholder,
[data-theme='dark'] .form-control::placeholder {
  color: #94a3b8 !important;
  opacity: 0.85;
}

[data-theme='light'] input::placeholder,
[data-theme='light'] textarea::placeholder,
[data-theme='light'] select::placeholder,
[data-theme='light'] .form-control::placeholder,
[data-theme='light'] .slip-overlay input::placeholder,
[data-theme='light'] .slip-overlay textarea::placeholder {
  color: #64748b !important;
  opacity: 1;
}

[data-theme='light'] .input-field input:focus,
[data-theme='light'] .input-field select:focus,
[data-theme='light'] .input-field textarea:focus,
[data-theme='light'] .form-control:focus,
[data-theme='light'] .form-group input:focus,
[data-theme='light'] .form-group select:focus,
[data-theme='light'] .form-group textarea:focus,
[data-theme='light'] .search-box input:focus {
  background: #ffffff;
  border-color: var(--blue-main);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

[data-theme='light'] .chip,
[data-theme='light'] .hotspot-chip,
[data-theme='light'] .type-tab,
[data-theme='light'] .admin-tab {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme='light'] .chip:hover,
[data-theme='light'] .chip.active,
[data-theme='light'] .hotspot-chip:hover,
[data-theme='light'] .hotspot-chip.active,
[data-theme='light'] .type-tab:hover,
[data-theme='light'] .type-tab.active,
[data-theme='light'] .admin-tab:hover,
[data-theme='light'] .admin-tab.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: #2563eb;
  color: #1d4ed8;
}

[data-theme='light'] .chip-my-vault {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #1d4ed8 !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
}

[data-theme='light'] .chip-my-vault.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

[data-theme='light'] .match-banner {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}

[data-theme='light'] .btn-match-qr {
  background: #2563eb;
  color: #ffffff;
}

[data-theme='light'] table thead tr {
  background: rgba(37, 99, 235, 0.06);
}

[data-theme='light'] table th {
  color: #1e40af;
}

[data-theme='light'] table td {
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme='light'] table tr:hover td {
  background: rgba(37, 99, 235, 0.03);
}

[data-theme='light'] .td-title {
  color: #0f172a;
}

[data-theme='light'] .slip-overlay > div:not(.slip-box),
[data-theme='light'] .slip-overlay .modal-card,
[data-theme='light'] .slip-overlay [style*="background: #18181b"],
[data-theme='light'] .slip-overlay [style*="background:#18181b"] {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 10px 45px rgba(0, 0, 0, 0.18) !important;
  border-color: var(--blue-main) !important;
}

[data-theme='light'] .slip-overlay h2,
[data-theme='light'] .slip-overlay h3,
[data-theme='light'] .slip-overlay h2[style],
[data-theme='light'] .slip-overlay h3[style] {
  color: #0f172a !important;
}

[data-theme='light'] .slip-overlay p,
[data-theme='light'] .slip-overlay p[style*="color: var(--text-muted)"] {
  color: #475569 !important;
}

[data-theme='light'] .modal {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

[data-theme='light'] .del-modal {
  background: #ffffff !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}
[data-theme='light'] .del-modal h3 {
  color: #dc2626 !important;
}
[data-theme='light'] .del-modal p {
  color: #475569 !important;
}

[data-theme='light'] .toast {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--blue-main);
}

[data-theme='light'] .sort-select {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.25);
}

[data-theme='light'] #anonymousDemoBox {
  background: #f1f5f9 !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
}

[data-theme='light'] #anonymousMsgInput {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme='light'] #regCategory,
[data-theme='light'] #regLocation {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* Modal helper badges, pill tags, and notices */
.modal-badge-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}
[data-theme='light'] .modal-badge-pill,
[data-theme='light'] .slip-overlay span[style*="color: #93c5fd"] {
  background: rgba(37, 99, 235, 0.12) !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
}

.modal-notice-box {
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.2rem;
  font-size: 0.78rem;
  line-height: 1.45;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #bfdbfe;
}
[data-theme='light'] .modal-notice-box,
[data-theme='light'] .slip-overlay div[style*="color: #bfdbfe"] {
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
  color: #1e3a8a !important;
}
[data-theme='light'] .modal-notice-box strong,
[data-theme='light'] .slip-overlay div[style*="color: #bfdbfe"] strong {
  color: #1d4ed8 !important;
}

[data-theme='light'] .slip-overlay span[style*="color: #4ade80"],
[data-theme='light'] .slip-overlay div[style*="color: #4ade80"] {
  color: #15803d !important;
}

[data-theme='light'] .slip-overlay span[style*="color: #86efac"],
[data-theme='light'] .slip-overlay div[style*="color: #86efac"] {
  color: #166534 !important;
}

[data-theme='light'] .slip-overlay div[style*="color: #cbd5e1"] {
  color: #334155 !important;
}

[data-theme='light'] .slip-overlay select option,
[data-theme='light'] .modal select option,
[data-theme='light'] .input-field select option,
[data-theme='light'] select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme='light'] .notif-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme='light'] .notif-item.unread {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.35);
}

[data-theme='light'] .notif-header {
  color: #0f172a;
}

[data-theme='light'] .notif-msg {
  color: #334155;
}

[data-theme='light'] .demo-creds {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.3);
  color: #475569;
}

[data-theme='light'] .demo-creds strong {
  color: #1d4ed8;
}

[data-theme='light'] .photo-upload-area {
  border-color: rgba(37, 99, 235, 0.3);
}

[data-theme='light'] .photo-upload-area:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.04);
}

.category-picker {
  width: 100%;
  min-height: 2.55rem;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg, rgba(255, 255, 255, 0.04));
  color: var(--text-muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.category-picker:hover,
.category-picker:focus-visible,
.category-picker.selected {
  border-color: var(--blue-main);
  color: var(--text-main);
  outline: none;
}

.category-picker-selected-icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-picker-modal {
  width: min(92%, 560px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.4rem;
  border: 1.5px solid var(--blue-main);
  border-radius: 16px;
  background: var(--card-bg, #18181b);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.75);
}

.category-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.category-picker-eyebrow {
  color: var(--blue-main);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-picker-header h2 { margin: 0.25rem 0 0; color: var(--text-main); }

.category-picker-close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

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

.category-icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.category-option {
  min-height: 4.2rem;
  padding: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.04);
  color: var(--text-main);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.category-option svg {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--blue-light);
}
.category-option:hover,
.category-option:focus-visible { border-color: var(--blue-main); background: rgba(59, 130, 246, 0.12); outline: none; }

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

.items-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.pagination-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.pagination-btn:hover:not(:disabled),
.pagination-btn.active {
  background: var(--blue-main);
  border-color: var(--blue-main);
  color: #ffffff;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.photo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 9rem;
  padding: 1rem;
  border: 1.5px dashed rgba(59, 130, 246, 0.45);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.04);
  color: var(--text-main);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.photo-upload-area:hover,
.photo-upload-area:focus-visible,
.photo-upload-area.dragover {
  border-color: var(--blue-main);
  background: rgba(59, 130, 246, 0.1);
  outline: none;
}

.photo-upload-area small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.photo-upload-icon {
  height: 2.8rem;
  color: #fbbf24;
}

.photo-upload-icon svg {
  display: block;
  width: 3.5rem;
  height: 2.8rem;
}

    /* ── Badges ── */
    .badge {
      display: inline-block;
      padding: 0.18rem 0.6rem;
      border-radius: 6px;
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }
    .badge-lost    { background: rgba(239,68,68,0.15); color:#f87171; border:1px solid rgba(239,68,68,0.3); }
    .badge-found   { background: rgba(34,197,94,0.13); color:#4ade80; border:1px solid rgba(34,197,94,0.3); }
    .badge-claimed { background: rgba(59,130,246,0.13); color:#60a5fa; border:1px solid rgba(59,130,246,0.3); }

    /* ── Item Cards ── */
    .item-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      text-decoration: none;
      color: var(--text-main);
      transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    }
    .item-card:hover {
      border-color: rgba(59,130,246,0.5);
      box-shadow: 0 0 24px rgba(59,130,246,0.12);
      transform: translateY(-3px);
    }
    .item-card-top {
      position: relative;
      height: 130px;
      overflow: hidden;
      background: rgba(255,255,255,0.03);
    }
    .card-thumb {
      width: 100%; height: 100%;
      object-fit: cover;
    }
    .card-thumb-placeholder {
      width: 100%; height: 100%;
      display: flex; align-items: center; justify-content: center;
      font-size: 3rem;
      background: rgba(59,130,246,0.05);
    }
    .item-card-badges {
      position: absolute;
      top: 0.6rem; left: 0.6rem;
      display: flex; gap: 0.3rem;
      flex-wrap: wrap;
    }
    .item-card-body {
      padding: 1rem 1.1rem 1.2rem;
      display: flex; flex-direction: column; gap: 0.4rem;
    }
    .item-card-category {
      font-size: 0.72rem; font-weight: 600;
      color: var(--blue-dark); letter-spacing: 0.06em;
    }
    .item-card-title {
      font-size: 0.95rem; font-weight: 700;
      color: var(--text-main); line-height: 1.3;
    }
    .item-card-desc {
      font-size: 0.82rem; color: var(--text-muted); line-height: 1.5;
    }
    .item-card-meta {
      display: flex; flex-direction: column; gap: 0.15rem;
      font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem;
    }

    /* ── Forms ── */
    .form-group { display: flex; flex-direction: column; gap: 0.4rem; }
    .form-label { font-size: 0.8rem; font-weight: 600; color: var(--blue-light); letter-spacing: 0.04em; }
    .form-label .required { color: #f87171; margin-left: 2px; }
    .form-control {
      background: rgba(255,255,255,0.05);
      border: 1.5px solid rgba(59,130,246,0.2);
      border-radius: 8px;
      padding: 0.65rem 0.9rem;
      color: var(--text-main);
      font-size: 0.9rem;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
      width: 100%;
    }
    .form-control:focus {
      border-color: rgba(59,130,246,0.55);
      box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
    }
    .form-control::placeholder { color: var(--text-muted); }
    select.form-control option { background: #27272a; color: var(--text-main); }
    textarea.form-control { resize: vertical; min-height: 100px; }

    /* ── Stat Cards ── */
    .stat-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1.4rem 1.5rem;
      display: flex; flex-direction: column; gap: 0.5rem;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .stat-card:hover {
      border-color: rgba(59,130,246,0.4);
      box-shadow: 0 0 18px rgba(59,130,246,0.1);
    }
    .stat-icon { font-size: 1.8rem; }
    .stat-number { font-size: 2rem; font-weight: 900; color: var(--blue-main); line-height: 1; }
    .stat-label  { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.05em; }

    /* ── Toast ── */
    .toast {
      position: fixed;
      bottom: 1.5rem; right: 1.5rem;
      background: #27272a;
      border: 1px solid rgba(59,130,246,0.3);
      border-radius: 10px;
      padding: 0.85rem 1.2rem;
      font-size: 0.875rem;
      color: var(--text-main);
      box-shadow: 0 4px 24px rgba(0,0,0,0.5);
      z-index: 9999;
      opacity: 0;
      transform: translateY(12px);
      transition: opacity 0.3s, transform 0.3s;
      display: flex; align-items: center; gap: 0.5rem;
      max-width: 320px;
    }
    .toast.show { opacity:1; transform:translateY(0); }
    .toast-error { border-color: rgba(239,68,68,0.4); }

    /* ── Modal ── */
    .modal-backdrop {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.65);
      backdrop-filter: blur(4px);
      z-index: 1000;
      display: flex; align-items: center; justify-content: center;
      padding: 1rem;
      opacity: 0; pointer-events: none;
      transition: opacity 0.25s;
    }
    .modal-backdrop.open { opacity:1; pointer-events:all; }
    .modal {
      background: #1f1f23;
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 2rem;
      max-width: 480px;
      width: 100%;
      transform: translateY(20px);
      transition: transform 0.25s;
    }
    .modal-backdrop.open .modal { transform: translateY(0); }
    .modal h3 { font-size: 1.1rem; font-weight: 800; color: var(--text-main); margin-bottom: 1rem; }
    .modal-close {
      float:right; background:none; border:none; color:var(--text-muted);
      font-size:1.3rem; cursor:pointer; line-height:1;
    }
    .modal-close:hover { color: var(--blue-main); }

    /* ── Page Header ── */
    .page-header {
      max-width: 960px;
      margin: 0 auto;
      padding: 3rem 1.5rem 1.5rem;
      position: relative; z-index: 1;
    }
    .page-header h1 {
      font-size: clamp(1.6rem, 4vw, 2.4rem);
      font-weight: 900;
      line-height: 1.25;
      padding-bottom: 0.15em;
      background: linear-gradient(90deg, #ffffff 40%, #3b82f6 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-bottom: 0.4rem;
    }
    .page-header p {
      font-size: 0.9rem; color: var(--text-muted); line-height: 1.6;
    }

    /* ── Section wrapper ── */
    .page-section {
      max-width: 960px;
      margin: 0 auto;
      padding: 1.5rem 1.5rem 5rem;
      position: relative; z-index: 1;
    }

    /* ── Nav active ── */
    .nav-active { color: var(--blue-main) !important; }

    /* ── Empty state ── */
    .empty-state {
      text-align: center;
      padding: 4rem 1rem;
      color: var(--text-muted);
    }
    .empty-state-icon { font-size: 3.5rem; margin-bottom: 1rem; }
    .empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.5rem; }
    .empty-state p  { font-size: 0.875rem; }

    /* Light mode shared overrides */
    [data-theme='light'] .item-card {
      background: #ffffff;
      border-color: rgba(37,99,235,0.18);
      box-shadow: 0 4px 18px rgba(0,0,0,0.05);
    }
    [data-theme='light'] .item-card:hover {
      border-color: rgba(37,99,235,0.5);
      box-shadow: 0 0 24px rgba(37,99,235,0.15);
    }
    [data-theme='light'] .item-card-title {
      color: #0f172a;
    }
    [data-theme='light'] .form-label,
    [data-theme='light'] label {
      color: #1e3a8a !important;
      font-weight: 700 !important;
    }
    [data-theme='light'] .form-control {
      background: #ffffff !important;
      border-color: rgba(37,99,235,0.3) !important;
      color: #0f172a !important;
    }
    [data-theme='light'] .form-control::placeholder {
      color: #64748b !important;
      opacity: 1;
    }
    [data-theme='light'] select.form-control option {
      background: #ffffff !important;
      color: #0f172a !important;
    }
    [data-theme='light'] .stat-card {
      background: #ffffff;
      border-color: rgba(37,99,235,0.18);
      box-shadow: 0 4px 18px rgba(0,0,0,0.05);
    }
    [data-theme='light'] .page-header h1 {
      background: linear-gradient(90deg, #0f172a 40%, #2563eb 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    [data-theme='light'] .modal {
      background: #ffffff;
      color: #0f172a;
      box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    }
    [data-theme='light'] .toast {
      background: #ffffff;
      color: #0f172a;
      box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    }
