/* ============================================================
   DINESH PRAJAPATI — Portfolio CSS
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-rgb: 99, 102, 241;

  --accent: #06b6d4;

  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12);
  --shadow-colored: 0 8px 30px rgba(99,102,241,.25);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;

  --transition: 0.22s cubic-bezier(.4,0,.2,1);

  --nav-h: 72px;
  --section-gap: 110px;
}

[data-theme="dark"] {
  --bg: #0b0f1a;
  --bg-secondary: #111827;
  --bg-card: #161d2e;
  --bg-card-hover: #1e2840;

  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --border: #1e2840;
  --border-light: #1a2235;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow:    0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: var(--radius-full); }

/* ---------- Selection ---------- */
::selection { background: rgba(var(--primary-rgb), .2); color: var(--primary); }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Section ---------- */
.section { padding: var(--section-gap) 0; }

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.section-subtitle {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ---------- Gradient Text ---------- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-colored);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(var(--primary-rgb), .4);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), .06);
}

.btn-white {
  background: #fff;
  color: var(--primary);
  font-size: .8rem;
  padding: 7px 16px;
}
.btn-white:hover { background: #f1f5f9; }

.btn-outline-white {
  border-color: rgba(255,255,255,.6);
  color: #fff;
  font-size: .8rem;
  padding: 7px 16px;
  background: transparent;
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); }

.btn-sm { font-size: .8rem; padding: 7px 16px; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(var(--bg-rgb, 255,255,255), .85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(11,15,26,.85);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}
.nav-logo .dot { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), .08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 1rem;
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--bg-card-hover); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 30%, transparent 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .25;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: -100px; right: -100px;
  animation-delay: 0s;
}
.blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  bottom: 0; left: -80px;
  animation-delay: -4s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px,-20px) scale(1.05); }
  66%       { transform: translate(-15px, 15px) scale(.97); }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding-top: 40px;
  padding-bottom: 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.2);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
  50%       { box-shadow: 0 0 0 6px rgba(34,197,94,.08); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}

.br-desktop { display: block; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .04em;
}
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Avatar */
.hero-visual { display: flex; justify-content: center; align-items: center; }

.avatar-wrapper {
  position: relative;
  width: 340px; height: 340px;
  display: flex; align-items: center; justify-content: center;
}

.avatar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed rgba(var(--primary-rgb), .3);
  animation: spin 20s linear infinite;
}
.ring-2 {
  inset: -30px;
  border-color: rgba(var(--primary-rgb), .15);
  animation-direction: reverse;
  animation-duration: 30s;
}

@keyframes spin { to { transform: rotate(360deg); } }

.avatar {
  width: 240px; height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  box-shadow: var(--shadow-colored);
  z-index: 1;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  white-space: nowrap;
  z-index: 2;
}
.floating-badge img { border-radius: 3px; }
/* 5 orbit badges — evenly distributed, clockwise from top-right */
.ob-1 { top: 18px;  right: -20px; animation: floatY 3.2s ease-in-out infinite 0s; }
.ob-2 { top: 155px; right: -50px; animation: floatY 3.2s ease-in-out infinite 0.65s; }
.ob-3 { bottom: 35px; right: -15px; animation: floatY 3.2s ease-in-out infinite 1.3s; }
.ob-4 { bottom: 15px; left: -15px; animation: floatY 3.2s ease-in-out infinite 1.95s; }
.ob-5 { top: 110px;  left: -45px; animation: floatY 3.2s ease-in-out infinite 2.6s; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  transform-origin: top;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { opacity: 0; transform: scaleY(0); }
  40%  { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--bg-secondary); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 70px;
  align-items: center;
}

.about-img-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;          /* allow badge to hang outside */
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}
.about-img-card > img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.about-img-overlay {
  position: absolute;
  bottom: 20px; right: -16px;
}
.experience-badge {
  background: var(--primary);
  color: #fff;
  padding: 16px 20px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-colored);
}
.exp-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.exp-text {
  font-size: .76rem;
  font-weight: 500;
  opacity: .85;
  line-height: 1.4;
}

.about-lead {
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
}
.about-body {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.detail-label {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 600;
}
.detail-value {
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
}
.detail-value a:hover { color: var(--primary); }
.detail-value.available { color: #22c55e; }

/* About colophon (CTA line) */
.about-colophon {
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
  margin-bottom: 28px;
}

/* What I Bring to the Table */
.about-pillars {
  margin-top: 72px;
}

.pillars-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 36px;
}
.pillars-heading::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 10px auto 0;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  border-radius: 0;
}
.pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--primary-rgb), .4);
}
.pillar-card:hover::before { transform: scaleX(1); }

.pillar-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: rgba(var(--primary-rgb), .1);
  border: 1px solid rgba(var(--primary-rgb), .18);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: all var(--transition);
}
.pillar-card:hover .pillar-icon {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-colored);
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.pillar-desc {
  font-size: .855rem;
  color: var(--text-secondary);
  line-height: 1.68;
}

@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .pillars-grid { grid-template-columns: 1fr; }
  .about-pillars { margin-top: 52px; }
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills { background: var(--bg); }

.skills-categories { display: flex; flex-direction: column; gap: 48px; }

.category-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.category-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all var(--transition);
  cursor: default;
}
.skill-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-colored);
  transform: translateY(-4px);
}
.skill-card img { width: 36px; height: 36px; }
.skill-card span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.invert-dark { filter: none; }
[data-theme="dark"] .invert-dark { filter: invert(1); }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects { background: var(--bg-secondary); }

.projects-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: .84rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-colored);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.project-card.hidden { display: none; }

.project-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(
    135deg,
    hsl(var(--hue), 65%, 50%) 0%,
    hsl(calc(var(--hue) + 40), 70%, 40%) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}
.project-placeholder span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  letter-spacing: .06em;
}

.project-card:hover .project-placeholder { transform: scale(1.04); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}
.project-card:hover .project-overlay { opacity: 1; }

.project-info { padding: 22px 24px; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.tag {
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), .2);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.3;
}
.project-desc {
  font-size: .87rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Project card: impact badge & CTA --- */
.project-impact {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 0;
  padding: 9px 12px;
  background: rgba(var(--primary-rgb), .07);
  border: 1px solid rgba(var(--primary-rgb), .18);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.4;
}
.project-impact svg { flex-shrink: 0; }
.project-impact strong { font-weight: 700; }

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.btn-case-study {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-case-study:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  gap: 12px;
}
.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-github:hover {
  background: #24292e;
  border-color: #24292e;
  color: #fff;
}

/* --- Overlay CTA button --- */
.btn-overlay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  cursor: pointer;
  font-family: inherit;
}
.btn-overlay:hover {
  background: rgba(255,255,255,.28);
  border-color: #fff;
  transform: scale(1.05);
}

/* --- Mini Diagrams (card image area) --- */
.project-placeholder {
  position: relative;
}

.mini-diagram {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 20px 18px;
}

/* ETL / Flow diagram */
.mini-flow .mf-sources {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.mini-flow .mf-sources span {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.4);
  color: rgba(255,255,255,.92);
  font-size: .6rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  letter-spacing: .03em;
  white-space: nowrap;
}
.mini-flow .mf-arrow {
  color: rgba(255,255,255,.45);
  font-size: .8rem;
  letter-spacing: 3px;
}
.mini-flow .mf-engine {
  background: rgba(255,255,255,.26);
  border: 1.5px solid rgba(255,255,255,.55);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 7px;
  text-align: center;
  white-space: nowrap;
}
.mini-flow .mf-target {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.38);
  color: rgba(255,255,255,.88);
  font-size: .68rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ML pipeline diagram */
.mini-ml { gap: 14px; }
.ml-pipeline {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.ml-pipeline span {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.ml-pipeline svg { flex-shrink: 0; }
.ml-models {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.ml-badge {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.28);
  color: rgba(255,255,255,.8);
  font-size: .59rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  letter-spacing: .04em;
}

/* BI Dashboard diagram */
.mini-bi { gap: 10px; }
.bi-kpis {
  display: flex;
  gap: 8px;
}
.bi-kpi {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  padding: 6px 12px;
  border-radius: 7px;
  text-align: center;
  min-width: 52px;
}
.bi-val {
  display: block;
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.1;
}
.bi-lbl {
  display: block;
  color: rgba(255,255,255,.6);
  font-size: .53rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}
.bi-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 54px;
  background: rgba(0,0,0,.12);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 7px;
  padding: 6px 14px;
}
.bi-bar {
  flex: 1;
  height: var(--h, 60%);
  background: rgba(255,255,255,.55);
  border-radius: 3px 3px 0 0;
  min-width: 8px;
}
.bi-label {
  color: rgba(255,255,255,.48);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* Cloud medallion diagram */
.mini-cloud { gap: 8px; }
.cloud-layers {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 230px;
}
.cloud-layer {
  padding: 5px 12px;
  border-radius: 6px;
  color: #fff;
  font-size: .63rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: .02em;
  border: 1px solid rgba(255,255,255,.25);
}
.cloud-layer.gold   { background: rgba(255,210,0,.28);  border-color: rgba(255,225,30,.5); }
.cloud-layer.silver { background: rgba(190,215,255,.18); border-color: rgba(190,215,255,.38); }
.cloud-layer.bronze { background: rgba(190,120,45,.25);  border-color: rgba(210,145,65,.42); }
.cloud-svc {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}
.cloud-svc span {
  color: #fff;
  font-size: .64rem;
  font-weight: 700;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  padding: 4px 9px;
  border-radius: 4px;
}
.csarr {
  background: none !important;
  border: none !important;
  color: rgba(255,255,255,.5) !important;
  font-size: .85rem !important;
  padding: 0 !important;
}

/* ============================================================
   CASE STUDY MODAL
   ============================================================ */
.cs-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.cs-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cs-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(28px) scale(.97);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}
.cs-backdrop.open .cs-modal {
  transform: translateY(0) scale(1);
}

.cs-modal::-webkit-scrollbar { width: 4px; }
.cs-modal::-webkit-scrollbar-track { background: transparent; }
.cs-modal::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

.cs-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
  cursor: pointer;
  font-family: inherit;
}
.cs-close:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.cs-content { padding: 40px 40px 48px; clearfix: both; }
.cs-content::after { content: ''; display: table; clear: both; }

.cs-header { margin-bottom: 28px; }
.cs-category {
  display: inline-flex;
  align-items: center;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  background: rgba(var(--primary-rgb), .1);
  border: 1px solid rgba(var(--primary-rgb), .22);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}
.cs-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 12px;
}
.cs-impact-headline {
  font-size: .95rem;
  color: var(--text-secondary);
  font-weight: 500;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
  line-height: 1.5;
}

/* Metrics banner */
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 36px;
  padding: 20px;
  background: rgba(var(--primary-rgb), .04);
  border: 1px solid rgba(var(--primary-rgb), .12);
  border-radius: var(--radius);
}
.cs-metric { text-align: center; padding: 6px 4px; }
.cs-metric-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.cs-metric-lbl {
  display: block;
  font-size: .7rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}

/* Problem / Solution panels */
.cs-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}
.cs-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.cs-panel-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-panel-title svg { color: var(--primary); flex-shrink: 0; }
.cs-panel p {
  font-size: .87rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Architecture diagram */
.cs-diagram { margin-bottom: 36px; }
.cs-section-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-section-title svg { color: var(--primary); flex-shrink: 0; }
.cs-diagram-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
}
.diagram-svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 520px;
}

/* Tech stack */
.cs-tech { }
.cs-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cs-tech-tags .tag { font-size: .78rem; padding: 5px 13px; }

/* Responsive modal */
@media (max-width: 680px) {
  .cs-content { padding: 28px 20px 36px; }
  .cs-metrics { grid-template-columns: repeat(2, 1fr); }
  .cs-body { grid-template-columns: 1fr; }
  .cs-title { font-size: 1.3rem; }
  .cs-close { margin: 12px 12px 0 0; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 16px; }

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.contact-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.contact-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.contact-card h4 {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.contact-card a, .contact-card span {
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
}
.contact-card a:hover { color: var(--primary); }

.contact-socials {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
}
.contact-socials h4 {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.social-links { display: flex; gap: 12px; }

.social-link {
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-colored);
}

/* Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.form-group input,
.form-group textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .92rem;
  color: var(--text);
  transition: all var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15);
  background: var(--bg);
}
.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-error {
  font-size: .77rem;
  color: #ef4444;
  font-weight: 500;
  min-height: 16px;
}

.form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  color: #16a34a;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  margin-top: 12px;
}
[data-theme="dark"] .form-success { color: #4ade80; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}
.footer-copy {
  font-size: .84rem;
  color: var(--text-muted);
  text-align: center;
}
.back-to-top {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.back-to-top:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

/* ============================================================
   ANIMATIONS — fade-in on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-text { align-items: center; display: flex; flex-direction: column; }
  .hero-subtitle { text-align: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { justify-content: center; }
  .br-desktop { display: none; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image { max-width: 380px; margin: 0 auto; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --section-gap: 72px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 4px;
    box-shadow: var(--shadow);
    z-index: 999;
  }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .avatar-wrapper { width: 260px; height: 260px; }
  .avatar { width: 180px; height: 180px; }
  .floating-badge { display: none; }

  .hero-title { font-size: clamp(2.2rem, 8vw, 3rem); }
  .hero-actions { justify-content: center; }

  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }

  .projects-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; gap: 12px; }

  .about-details { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 16px; }
  .skills-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .certs-grid-new { grid-template-columns: 1fr; }
}

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
.experience { background: var(--bg-secondary); }

.timeline {
  position: relative;
  padding-left: 32px;
  margin-bottom: 64px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: var(--radius-full);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.timeline-content:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.timeline-company {
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.timeline-period {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.timeline-location {
  font-size: .78rem;
  color: var(--text-muted);
}

.timeline-bullets {
  list-style: none;
  margin-bottom: 16px;
}
.timeline-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 6px;
}
.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: .75rem;
  top: 2px;
}

.timeline-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tool-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 600;
}

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
/* ---- Education & Certifications Block ---- */
.edu-certs-block {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.edc-section-hdr { margin-bottom: 24px; }

.edc-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}
.edc-sub {
  font-size: .83rem;
  color: var(--text-muted);
}

/* Education degree cards */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: all var(--transition);
}
.edu-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.edu-deg-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-degree {
  font-size: .93rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.4;
}

.edu-inst {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: var(--text-muted);
}
.edu-inst svg { flex-shrink: 0; }

/* Certification cards */
.certs-grid-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cert-card-new {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all var(--transition);
}
.cert-card-new:hover {
  border-color: rgba(245, 158, 11, .5);
  box-shadow: 0 4px 20px rgba(245,158,11,.12);
  transform: translateY(-3px);
}

.cert-icon-new {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-name {
  font-size: .86rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.4;
}

.cert-issuer {
  font-size: .76rem;
  color: var(--text-muted);
}

/* ============================================================
   SKILL CARD — text-icon variant
   ============================================================ */
.skill-card-text img,
.skill-card-text svg { border-radius: 6px; }

/* ============================================================
   RESPONSIVE — Experience
   ============================================================ */
@media (max-width: 640px) {
  .timeline-header { flex-direction: column; }
  .timeline-meta { align-items: flex-start; }
  .certs-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .certs-grid-new { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   ADMIN PANEL — FAB, Backdrop, Drawer, Form, Toast
   ============================================================ */

/* FAB (hidden by default, toggle with Ctrl+Shift+A) */
.adm-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.7);
  transition: opacity .25s, transform .25s;
}
.adm-fab.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.adm-fab:hover { filter: brightness(1.12); }

/* Backdrop */
.adm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.adm-backdrop.open { opacity: 1; pointer-events: auto; }

/* Drawer */
.adm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1400;
  width: 480px;
  max-width: 96vw;
  background: var(--surface, #1a1a2e);
  border-left: 1px solid var(--border, rgba(255,255,255,.08));
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.adm-drawer.open { transform: translateX(0); }

/* Drawer header */
.adm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
  flex-shrink: 0;
}
.adm-head-title {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text, #e2e8f0);
}
.adm-close {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.adm-close:hover { background: rgba(255,255,255,.06); color: var(--text, #e2e8f0); }

/* Drawer body — scrollable */
.adm-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Toolbar (list view top bar) */
.adm-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.adm-btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter .2s;
}
.adm-btn-add:hover { filter: brightness(1.12); }
.adm-btn-ghost {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border, rgba(255,255,255,.12));
  color: var(--text-muted, #94a3b8);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .78rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.adm-btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* List items */
.adm-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border, rgba(255,255,255,.06));
  transition: background .2s;
}
.adm-list-item:hover { background: rgba(255,255,255,.06); }
.adm-li-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.adm-li-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adm-li-title {
  font-size: .84rem;
  font-weight: 600;
  color: var(--text, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-li-cat {
  font-size: .72rem;
  color: var(--text-muted, #94a3b8);
}
.adm-li-btns { display: flex; gap: 4px; }
.adm-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s, border-color .2s;
}
.adm-edit-btn { color: var(--primary); }
.adm-edit-btn:hover { background: rgba(99,102,241,.15); border-color: var(--primary); }
.adm-del-btn { color: #f87171; }
.adm-del-btn:hover { background: rgba(248,113,113,.12); border-color: #f87171; }

/* Empty state */
.adm-empty {
  text-align: center;
  padding: 32px 0;
  color: var(--text-muted, #94a3b8);
  font-size: .85rem;
}

/* Form */
.adm-form-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.adm-back-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  font-size: .8rem;
  gap: 4px;
  transition: background .2s;
}
.adm-back-btn:hover { background: rgba(99,102,241,.12); }
.adm-form-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text, #e2e8f0);
}
.adm-fieldset {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 4px;
}
.adm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.adm-field label {
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.adm-field input,
.adm-field textarea,
.adm-field select {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text, #e2e8f0);
  font-size: .84rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.adm-field input:focus,
.adm-field textarea:focus,
.adm-field select:focus { border-color: var(--primary); }
.adm-field textarea { resize: vertical; min-height: 70px; }
.adm-field select option { background: #1e1e2e; }
.adm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-hue-row { display: flex; align-items: center; gap: 10px; }
.adm-hue-row input[type="range"] { flex: 1; }
.adm-hue-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  flex-shrink: 0;
  transition: background .2s;
}
.adm-metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adm-metric-pair { display: flex; gap: 6px; }
.adm-metric-pair input { flex: 1; min-width: 0; }
.adm-diag-cond { display: none; }
.adm-diag-cond.active { display: flex; flex-direction: column; gap: 14px; }
.adm-form-footer {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}
.adm-form-footer .adm-btn-add { flex: 1; justify-content: center; padding: 10px; }
.adm-form-footer .adm-btn-ghost { margin-left: 0; }

/* Toast */
.adm-toast {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 2000;
  background: #22c55e;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.adm-toast.show { opacity: 1; transform: translateY(0); }
.adm-toast.adm-toast-err { background: #ef4444; }

@media (max-width: 520px) {
  .adm-drawer { width: 100vw; }
  .adm-row { grid-template-columns: 1fr; }
  .adm-metrics-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PROJECTS PAGINATION
   ============================================================ */
.proj-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.proj-pg-btn,
.proj-pg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: .83rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.proj-pg-btn:hover:not(:disabled),
.proj-pg-num:hover:not(.active) {
  background: rgba(99,102,241,.1);
  border-color: var(--primary);
  color: var(--primary);
}
.proj-pg-num.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  cursor: default;
}
.proj-pg-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.proj-pg-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  color: var(--text-muted);
  font-size: .85rem;
  user-select: none;
}

/* ============================================================
   ADMIN LOGIN FORM
   ============================================================ */
.adm-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 8px;
  text-align: center;
}
.adm-login-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(99,102,241,.12);
  border: 1.5px solid rgba(99,102,241,.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  margin-bottom: 4px;
}
.adm-login-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.adm-login-sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.adm-login-err {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  color: #f87171;
  font-size: .8rem;
  text-align: left;
}
.adm-login form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.adm-login-btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  padding: 11px;
}
