/* =========================================================
   Michael John Minor — Data Entry Virtual Assistant Portfolio
   Premium minimalist SaaS-inspired stylesheet
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --charcoal: #202722;
  --emerald: #16865B;
  --emerald-dark: #12704d;
  --teal: #0B3D36;
  --white: #FFFFFF;
  --bg: #F5F7F6;
  --muted: #66736D;
  --line: #e3e8e5;

  --font: "Inter", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --h1: clamp(2rem, 4.5vw, 3.1rem);
  --h2: clamp(1.55rem, 3vw, 2.2rem);
  --h3: 1.175rem;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;
  --space-6: 5.5rem;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(32, 39, 34, 0.06), 0 2px 8px rgba(32, 39, 34, 0.05);
  --shadow-md: 0 6px 20px rgba(32, 39, 34, 0.09);
  --shadow-lg: 0 18px 50px rgba(11, 61, 54, 0.16);

  --header-h: 72px;
  --transition: 0.25s ease;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  font-weight: 700;
  letter-spacing: -0.015em;
}

p { margin: 0 0 var(--space-2); }

a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--emerald-dark); }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid rgba(22, 134, 91, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -48px;
  z-index: 200;
  background: var(--teal);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-2); color: var(--white); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), color var(--transition), border-color var(--transition);
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--emerald);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(22, 134, 91, 0.28);
}
.btn-primary:hover {
  background: var(--emerald-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(22, 134, 91, 0.34);
}

.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--line);
}
.btn-outline:hover {
  border-color: var(--emerald);
  color: var(--emerald);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--charcoal); }

.btn-text { background: none; border: none; padding: 0.8rem 0.25rem; color: var(--emerald); }
.btn-text:hover { color: var(--emerald-dark); }

.btn-sm { padding: 0.55rem 1.1rem; }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  background: rgba(22, 134, 91, 0.08);
  border: 1px solid rgba(22, 134, 91, 0.18);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2);
}

.section { padding: var(--space-6) 0; }
.section-alt { background: var(--bg); }

.section-head { max-width: 640px; margin-bottom: var(--space-4); }
.section-head h2 { font-size: var(--h2); }
.section-lead { color: var(--muted); font-size: var(--text-sm); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--charcoal); }
.logo-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.logo-text { font-size: 0.95rem; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--charcoal); background: var(--bg); }
.nav-link.active-link { color: var(--emerald); background: rgba(22, 134, 91, 0.08); font-weight: 600; }

.nav-cta-item { margin-left: 0.6rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
}
.nav-toggle-bar {
  width: 24px; height: 2.5px;
  border-radius: 2px;
  background: var(--charcoal);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--space-6) 0 var(--space-5);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 46% at 50% 0%, rgba(22, 134, 91, 0.12), transparent 70%),
    radial-gradient(46% 40% at 82% 34%, rgba(11, 61, 54, 0.09), transparent 70%),
    radial-gradient(46% 40% at 14% 30%, rgba(11, 61, 54, 0.07), transparent 70%),
    linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}
.hero > .container { position: relative; z-index: 1; }

.hero-center {
  text-align: center;
  max-width: 780px;
}
.hero-center .eyebrow { margin-bottom: var(--space-3); }

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: var(--space-3);
  background: linear-gradient(160deg, var(--charcoal) 45%, var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-subtitle {
  color: var(--muted);
  font-size: var(--text-lg);
  max-width: 62ch;
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(22, 134, 91, 0.18);
  animation: pulse 2.4s infinite;
  flex: none;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22, 134, 91, 0.16); }
  50% { box-shadow: 0 0 0 7px rgba(22, 134, 91, 0.05); }
}

.hero-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: var(--space-3);
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.95rem;
}
.hero-trust .tick { width: 19px; height: 19px; font-size: 0.65rem; }

/* ---------- Showcase window ---------- */
.showcase-wrap {
  position: relative;
  z-index: 1;
  margin-top: var(--space-5);
}
.showcase-wrap::before {
  content: "";
  position: absolute;
  inset: 12% 8% -6%;
  background: linear-gradient(120deg, rgba(22, 134, 91, 0.22), rgba(11, 61, 54, 0.16) 55%, rgba(196, 160, 90, 0.14));
  filter: blur(70px);
  border-radius: 40px;
  z-index: -1;
}

.showcase {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.showcase-chrome {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1.1rem;
  background: linear-gradient(180deg, #f4f7f5, #eef2f0);
  border-bottom: 1px solid var(--line);
}
.showcase-url {
  flex: 1;
  text-align: center;
  font-size: 0.76rem;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.3rem 1rem;
  max-width: 420px;
  margin-inline: auto;
}
.showcase-badge { flex: none; }

.showcase-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 430px;
}

.showcase-side {
  border-right: 1px solid var(--line);
  background: var(--bg);
  padding: var(--space-3) var(--space-2);
  text-align: center;
}
.side-avatar img {
  width: 76px; height: 76px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  margin-inline: auto;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
}
.side-name { font-weight: 700; margin: 0.7rem 0 0.1rem; }
.side-role { font-size: 0.8rem; color: var(--emerald); font-weight: 600; margin: 0 0 0.6rem; }
.side-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.28rem 0.7rem;
}
.side-rule { border: none; border-top: 1px solid var(--line); margin: var(--space-2) 0; }
.side-meta { text-align: left; }
.side-meta li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.2rem;
  font-size: 0.8rem;
}
.side-meta span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.side-meta strong { color: var(--charcoal); font-weight: 600; }

.showcase-main { padding: var(--space-2) var(--space-3) var(--space-3); min-width: 0; }

.showcase-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  margin-bottom: var(--space-2);
}
.showcase-tabs [role="tab"] {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1.1rem;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.showcase-tabs [role="tab"]:hover { color: var(--charcoal); border-color: #cfd8d3; }
.showcase-tabs [role="tab"][aria-selected="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.showcase-panel { animation: fade-panel 0.25s ease; }
@keyframes fade-panel {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.panel-stats {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.stat-chip {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.95rem;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}
.stat-chip strong {
  display: block;
  font-size: 1.15rem;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

.showcase .data-table { min-width: 520px; font-size: 0.8rem; }
.showcase .data-table th, .showcase .data-table td { padding: 0.5rem 0.75rem; }
.showcase .table-scroll { max-height: 300px; overflow-y: auto; }

.panel-note {
  font-size: 0.74rem;
  color: var(--muted);
  margin: 0.7rem 0 0;
}
.panel-note a { font-weight: 600; }

.clean-cols-sm { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.clean-cols-sm h4 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 0.4rem; }

.inbox-pills { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: var(--space-2); }
.inbox-pills button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 0.32rem 0.85rem;
}
.inbox-pills button[aria-pressed="true"] {
  background: rgba(22, 134, 91, 0.1);
  border-color: rgba(22, 134, 91, 0.4);
  color: var(--emerald-dark);
}

.product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.8rem;
}
.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: var(--white);
  font-size: 0.8rem;
}
.product-card .p-img {
  height: 54px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(22, 134, 91, 0.14), rgba(11, 61, 54, 0.12));
  margin-bottom: 0.6rem;
  display: grid;
  place-items: center;
  color: var(--teal);
  font-weight: 800;
  font-size: 0.95rem;
}
.product-card strong { display: block; margin-bottom: 0.15rem; }
.product-card .p-sku { color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 0.7rem; }
.product-card .p-row { display: flex; justify-content: space-between; margin-top: 0.45rem; }
.product-card .p-price { font-weight: 700; color: var(--emerald-dark); }

.dot-group { display: inline-flex; gap: 4px; flex: none; }
.dot-group i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.dot-group i:first-child { background: #e0655a; }
.dot-group i:nth-child(2) { background: #e5b13e; }
.dot-group i:last-child { background: var(--emerald); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-4);
  align-items: start;
}

.about-text p { color: var(--muted); }
.about-text p:first-child { color: var(--charcoal); }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem var(--space-2);
  margin: var(--space-3) 0;
}
.about-highlights li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-sm);
  font-weight: 600;
}
.tick {
  width: 22px; height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(22, 134, 91, 0.12);
  color: var(--emerald);
  font-size: 0.75rem;
  font-weight: 800;
}

.about-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-1);
}

.profile-card {
  background: linear-gradient(160deg, var(--teal), #0e4a41 60%, var(--charcoal));
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  box-shadow: var(--shadow-lg);
}
.profile-card h3 { color: var(--white); font-size: var(--h3); }
.profile-card a { color: #8fe0bb; }
.profile-card a:hover { color: #b6efcf; }
.profile-dl div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--text-sm);
}
.profile-dl div:last-child { border-bottom: none; }
.profile-dl dt { color: rgba(255, 255, 255, 0.55); font-weight: 500; }
.profile-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.profile-note {
  margin: var(--space-2) 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}
.profile-note code { color: #8fe0bb; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: var(--space-3); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.4s ease, 
              border-color 0.4s ease,
              background 0.4s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(22, 134, 91, 0.1) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
  transform: scale(1);
}

.card:hover,
.card:focus-within {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 32px rgba(22, 134, 91, 0.18);
  border-color: rgba(22, 134, 91, 0.4);
  background: linear-gradient(135deg, var(--white) 0%, rgba(22, 134, 91, 0.02) 100%);
}

.skill-card .card-icon,
.service-card .card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-2);
  background: rgba(22, 134, 91, 0.1);
  color: var(--emerald);
}
.skill-card .card-icon svg,
.service-card .card-icon svg { width: 22px; height: 22px; }

.card h3 { font-size: var(--h3); margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: var(--text-sm); margin: 0; }

/* ---------- Tools ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--space-2);
}
.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.3s ease, 
              border-color 0.3s ease,
              background 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.6s ease-out backwards;
}

/* Stagger animation for each tool */
.tool-item:nth-child(1) { animation-delay: 0.05s; }
.tool-item:nth-child(2) { animation-delay: 0.1s; }
.tool-item:nth-child(3) { animation-delay: 0.15s; }
.tool-item:nth-child(4) { animation-delay: 0.2s; }
.tool-item:nth-child(5) { animation-delay: 0.25s; }
.tool-item:nth-child(6) { animation-delay: 0.3s; }
.tool-item:nth-child(7) { animation-delay: 0.35s; }
.tool-item:nth-child(8) { animation-delay: 0.4s; }
.tool-item:nth-child(9) { animation-delay: 0.45s; }
.tool-item:nth-child(10) { animation-delay: 0.5s; }
.tool-item:nth-child(11) { animation-delay: 0.55s; }
.tool-item:nth-child(12) { animation-delay: 0.6s; }
.tool-item:nth-child(13) { animation-delay: 0.65s; }

/* Hover effect with enhanced animation */
.tool-item:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 12px 24px rgba(22, 134, 91, 0.2);
  border-color: rgba(22, 134, 91, 0.5);
  background: linear-gradient(135deg, var(--white) 0%, rgba(22, 134, 91, 0.03) 100%);
}

/* Glow effect on hover */
.tool-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(22, 134, 91, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tool-item:hover::before {
  opacity: 1;
}

.tool-badge {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.3s ease,
              box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tool-item:hover .tool-badge {
  transform: scale(1.15) rotate(5deg);
  filter: brightness(1.1) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
}

/* Pulse animation for badge on hover */
@keyframes badgePulse {
  0%, 100% { transform: scale(1.15) rotate(5deg); }
  50% { transform: scale(1.2) rotate(8deg); }
}

.tool-item:hover .tool-badge {
  animation: badgePulse 0.6s ease-in-out;
}

/* Slide in from bottom animation */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Text fade in animation */
@keyframes fadeInText {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tool-item > * {
  animation: fadeInText 0.8s ease-out backwards;
}

.tool-item > :nth-child(1) { animation-delay: inherit; }
.tool-item > :nth-child(2) { animation-delay: calc(inherit + 0.1s); }

/* ---------- Portfolio ---------- */
.portfolio-card { display: flex; flex-direction: column; }
.portfolio-thumb {
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(22, 134, 91, 0.10), rgba(11, 61, 54, 0.10));
  border: 1px solid var(--line);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  min-height: 96px;
  display: grid;
  place-items: center;
}
.portfolio-thumb svg { width: 34px; height: 34px; color: var(--teal); }
.badge-row { display: flex; gap: 0.4rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  padding: 0.22rem 0.65rem;
}
.badge-sample { background: rgba(22, 134, 91, 0.12); color: var(--emerald-dark); }
.badge-demo { background: rgba(11, 61, 54, 0.1); color: var(--teal); }
.portfolio-card .btn { margin-top: var(--space-2); align-self: flex-start; }

/* ---------- Tables ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 560px;
}
.data-table caption {
  caption-side: bottom;
  padding: 0.7rem 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: left;
}
.data-table th,
.data-table td {
  padding: 0.7rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table thead th {
  background: var(--bg);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  position: sticky;
  top: 0;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(22, 134, 91, 0.04); }
.data-table td.email { color: var(--muted); }
.data-table td.empty-row { color: var(--muted); text-align: center; padding: var(--space-3); }

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}
.status-active { background: rgba(22, 134, 91, 0.13); color: var(--emerald-dark); }
.status-pending { background: rgba(196, 138, 32, 0.14); color: #9c6f18; }
.status-inactive { background: rgba(255, 180, 180, 0.541); color: var(--muted); }

.sort-btn {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.sort-ind { font-size: 0.7rem; }
.sort-btn[aria-sort="ascending"] .sort-ind::after { content: "▲"; }
.sort-btn[aria-sort="descending"] .sort-ind::after { content: "▼"; }

/* ---------- Demo panel ---------- */
.demo-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-3);
}

.demo-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.demo-search { flex: 1 1 240px; }
.demo-search input,
.demo-form input,
.demo-form select,
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--text-sm);
  color: var(--charcoal);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(22, 134, 91, 0.14);
}
input.invalid, textarea.invalid { border-color: #c4554d; }

.demo-count {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.demo-actions { display: flex; gap: 0.6rem; margin-left: auto; }

.demo-form {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-2) var(--space-1);
  margin-bottom: var(--space-2);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}
.form-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.field-error {
  min-height: 1.1rem;
  margin: 0.25rem 0 0;
  font-size: 0.76rem;
  color: #b34740;
}
.form-actions { display: flex; gap: 0.6rem; margin: 0.35rem 0 var(--space-1); }

.demo-msg {
  min-height: 1.4rem;
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
  font-weight: 600;
}
.demo-msg.ok { color: var(--emerald-dark); }
.demo-msg.err { color: #b34740; }

.row-actions button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 0.35rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.row-actions button:hover { color: var(--emerald); border-color: var(--emerald); background: rgba(22, 134, 91, 0.06); }
.row-actions .delete-btn:hover { color: #b34740; border-color: #c4554d; background: rgba(196, 85, 77, 0.07); }

/* ---------- Process ---------- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  counter-reset: step;
  position: relative;
}
.process-step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: var(--white);
  font-weight: 800;
  margin-bottom: var(--space-2);
}
.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 42px;
  right: calc(-1 * var(--space-3) - 1px);
  width: var(--space-3);
  border-top: 2px dashed rgba(22, 134, 91, 0.4);
}
.process-step h3 { font-size: 1.02rem; }
.process-step p { font-size: var(--text-sm); color: var(--muted); margin: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-4);
  align-items: start;
}
.contact-list li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}
.contact-list li:last-child { border-bottom: none; }
.contact-ic {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(22, 134, 91, 0.1);
  color: var(--emerald);
  font-weight: 700;
}
.placeholder-item { color: var(--muted); }
.placeholder-item .contact-ic { background: var(--bg); color: var(--muted); }
.muted { color: var(--muted); }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-3);
  display: grid;
  gap: var(--space-1);
}
.form-note {
  margin-top: var(--space-2);
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
}
.form-status { min-height: 1.4rem; margin: 0; font-size: var(--text-sm); font-weight: 600; }
.form-status.ok { color: var(--emerald-dark); }
.form-status.err { color: #b34740; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 150; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 61, 54, 0.55);
  backdrop-filter: blur(3px);
}
.modal-dialog {
  position: relative;
  width: min(860px, 94%);
  max-height: 86vh;
  margin: 5vh auto 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: pop-in 0.22s ease;
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: var(--h3); }
.modal-close {
  background: none;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
}
.modal-close:hover { color: var(--charcoal); background: var(--bg); }
.modal-body { padding: var(--space-3); overflow-y: auto; }
.modal-body .note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: var(--space-2);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
}

body.modal-open { overflow: hidden; }

/* ---------- Cleaning demo ---------- */
.demo-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--emerald-dark);
  background: rgba(22, 134, 91, 0.1);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.8rem;
  margin-bottom: var(--space-2);
}
.clean-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.clean-cols h4 { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.clean-pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
.clean-after { background: rgba(22, 134, 91, 0.05); border-color: rgba(22, 134, 91, 0.3); }
.clean-controls { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.clean-notes { margin-top: var(--space-2); }
.clean-notes li {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.25rem 0 0.25rem 1.3rem;
  position: relative;
}
.clean-notes li::before {
  content: "✓";
  position: absolute;
  left: 0.2rem;
  color: var(--emerald);
  font-weight: 700;
}

/* ---------- Process visual (PDF workflow) ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1);
  align-items: stretch;
  margin-bottom: var(--space-2);
}
.flow-step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) 0.8rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
}
.flow-step span { display: block; font-size: 1.3rem; margin-bottom: 0.3rem; }
.flow-arrow { align-self: center; color: var(--emerald); font-weight: 800; }

/* ---------- Inbox demo ---------- */
.inbox { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-2); }
.inbox-cats button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.inbox-cats button[aria-pressed="true"] {
  background: rgba(22, 134, 91, 0.1);
  border-color: rgba(22, 134, 91, 0.35);
  color: var(--emerald-dark);
}
.inbox-list { display: grid; gap: 0.5rem; }
.inbox-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.83rem;
  background: var(--white);
}
.inbox-item strong { display: block; }
.inbox-item .from { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--space-5) 0 var(--space-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.logo-light { color: var(--white); }
.logo-light:hover { color: var(--white); }
.footer-tag { font-size: var(--text-sm); max-width: 34ch; margin-top: var(--space-2); }
.footer-h {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-2);
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255, 255, 255, 0.75); font-size: var(--text-sm); }
.footer-links a:hover { color: #8fe0bb; }
.footer-bottom {
  padding-top: var(--space-3);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom p { margin: 0; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--emerald);
  color: var(--white);
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), background var(--transition);
}
.back-to-top:hover { background: var(--emerald-dark); transform: translateY(-3px); }

/* ---------- 404 page ---------- */
.page-404 {
  min-height: 80vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.page-404-text { color: var(--muted); max-width: 44ch; margin-inline: auto; }
.page-404-actions { margin-top: var(--space-3); display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .process-step:not(:last-child)::after { display: none; }
}

@media (max-width: 880px) {
  .showcase-body { grid-template-columns: 1fr; }
  .showcase-side {
    border-right: none;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 1rem;
    text-align: left;
    padding: var(--space-2);
  }
  .side-avatar { flex: none; }
  .side-avatar img { margin: 0; }
  .side-name { margin: 0; }
  .side-role { margin: 0; }
  .side-status { margin: 0; }
  .side-rule { display: none; }
  .side-meta { width: 100%; display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
  .clean-cols-sm { grid-template-columns: 1fr; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow-arrow { display: none; }

  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: var(--space-2) 4%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }
  .nav-menu.open { max-height: 420px; padding: var(--space-2) 4% var(--space-3); }
  .nav-link { padding: 0.85rem 1rem; }
  .nav-cta-item { margin: 0.6rem 0 0; }
  .nav-cta-item .btn { width: 100%; }
  .logo-text { display: none; }
}

@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .clean-cols, .inbox { grid-template-columns: 1fr; }
  .demo-actions { margin-left: 0; width: 100%; }
  .demo-actions .btn { flex: 1; }
}


/* ========================================================= */
/* ENHANCED ANIMATIONS & TRANSITIONS FOR TOOLS & CARDS    */
/* ========================================================= */

/* Slide in from bottom animation */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth stagger animation for skill and service cards */
.skill-card {
  animation: slideInUp 0.6s ease-out forwards;
}

.skill-card:nth-child(1) { animation-delay: 0.1s; }
.skill-card:nth-child(2) { animation-delay: 0.15s; }
.skill-card:nth-child(3) { animation-delay: 0.2s; }
.skill-card:nth-child(4) { animation-delay: 0.25s; }
.skill-card:nth-child(5) { animation-delay: 0.3s; }
.skill-card:nth-child(6) { animation-delay: 0.35s; }
.skill-card:nth-child(7) { animation-delay: 0.4s; }
.skill-card:nth-child(8) { animation-delay: 0.45s; }
.skill-card:nth-child(9) { animation-delay: 0.5s; }
.skill-card:nth-child(10) { animation-delay: 0.55s; }
.skill-card:nth-child(11) { animation-delay: 0.6s; }
.skill-card:nth-child(12) { animation-delay: 0.65s; }

.service-card {
  animation: slideInUp 0.6s ease-out forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.15s; }
.service-card:nth-child(3) { animation-delay: 0.2s; }
.service-card:nth-child(4) { animation-delay: 0.25s; }
.service-card:nth-child(5) { animation-delay: 0.3s; }
.service-card:nth-child(6) { animation-delay: 0.35s; }
.service-card:nth-child(7) { animation-delay: 0.4s; }
.service-card:nth-child(8) { animation-delay: 0.45s; }

/* Enhanced card hover with glow effect */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(22, 134, 91, 0.1), transparent 70%);
  opacity: 0;
  border-radius: var(--radius);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

/* Enhanced badge animation */
.skill-card .card-icon,
.service-card .card-icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.4s ease;
}

.card:hover .card-icon {
  transform: scale(1.2) rotate(8deg);
  filter: brightness(1.15) drop-shadow(0 4px 8px rgba(22, 134, 91, 0.3));
}

/* Icon bounce animation on hover */
@keyframes iconBounce {
  0%, 100% { transform: scale(1.2) rotate(8deg) translateY(0); }
  50% { transform: scale(1.2) rotate(8deg) translateY(-4px); }
}

.card:hover .card-icon {
  animation: iconBounce 0.6s ease-in-out;
}

/* Portfolio cards */
.portfolio-card {
  animation: slideInUp 0.6s ease-out forwards;
}

.portfolio-card:nth-child(1) { animation-delay: 0.1s; }
.portfolio-card:nth-child(2) { animation-delay: 0.2s; }
.portfolio-card:nth-child(3) { animation-delay: 0.3s; }
.portfolio-card:nth-child(4) { animation-delay: 0.4s; }
.portfolio-card:nth-child(5) { animation-delay: 0.5s; }
.portfolio-card:nth-child(6) { animation-delay: 0.6s; }

/* Process steps animation */
.process-step {
  animation: slideInUp 0.6s ease-out forwards;
}

.process-step:nth-child(1) { animation-delay: 0.1s; }
.process-step:nth-child(2) { animation-delay: 0.2s; }
.process-step:nth-child(3) { animation-delay: 0.3s; }
.process-step:nth-child(4) { animation-delay: 0.4s; }

/* Smooth button transitions */
.btn {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              background 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

/* Icon animation for section heads */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.section-head {
  animation: slideInRight 0.8s ease-out;
}

/* Smooth transitions for contact form fields */
input, select, textarea {
  transition: border-color 0.3s ease,
              box-shadow 0.3s ease,
              transform 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  transform: scale(1.01);
}

/* Modal entrance animation */
.modal-dialog {
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Back to top button animation */
.back-to-top {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.1);
}

/* Smooth footer animations */
.footer-links li {
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer-links li:hover {
  transform: translateX(4px);
}


/* Tool Logo Styling */
.tool-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--white);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.3s ease,
              box-shadow 0.3s ease,
              background 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: var(--white);
  overflow: hidden;
}

.tool-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.tool-logo svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.tool-item:hover .tool-logo {
  transform: scale(1.2) rotate(8deg);
  filter: brightness(1.15) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1.2) rotate(8deg); }
  50% { transform: scale(1.25) rotate(12deg); }
}

.tool-item:hover .tool-logo {
  animation: logoPulse 0.6s ease-in-out;
}


/* =========================================================
   PORTFOLIO UPGRADE — Additional Styles
   Dark mode, enhanced demo, analytics dashboard,
   task manager, portfolio filters, CSV import, etc.
   ========================================================= */

/* ---------- Dark Mode ---------- */
:root {
  color-scheme: light dark;
}

[data-theme="dark"] {
  --charcoal: #e8ede9;
  --emerald: #34c988;
  --emerald-dark: #29b579;
  --teal: #4cded3;
  --white: #141a17;
  --bg: #1c2520;
  --muted: #8ba094;
  --line: #2d3d35;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 18px 50px rgba(0,0,0,0.45);
}

[data-theme="dark"] .site-header {
  background: rgba(20, 26, 23, 0.92);
}

[data-theme="dark"] .hero-bg {
  background:
    radial-gradient(60% 46% at 50% 0%, rgba(52, 201, 136, 0.08), transparent 70%),
    radial-gradient(46% 40% at 82% 34%, rgba(11, 61, 54, 0.12), transparent 70%),
    radial-gradient(46% 40% at 14% 30%, rgba(11, 61, 54, 0.09), transparent 70%),
    linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

[data-theme="dark"] .hero-title {
  background: linear-gradient(160deg, var(--charcoal) 45%, var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="dark"] .showcase {
  background: var(--bg);
}

[data-theme="dark"] .showcase-chrome {
  background: linear-gradient(180deg, #1f2d27, #1a2720);
}

[data-theme="dark"] .showcase-side {
  background: #1a2720;
}

[data-theme="dark"] .profile-card {
  background: linear-gradient(160deg, #0d2e27, #162a22 60%, #1a2018);
}

[data-theme="dark"] .site-footer {
  background: #0d1410;
  color: rgba(232, 237, 233, 0.6);
}

[data-theme="dark"] .footer-links a { color: rgba(232, 237, 233, 0.6); }
[data-theme="dark"] .footer-links a:hover { color: #34c988; }

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--bg);
  color: var(--charcoal);
  border-color: var(--line);
}

[data-theme="dark"] .product-card { background: var(--bg); }
[data-theme="dark"] .modal-dialog { background: #1c2520; }
[data-theme="dark"] .modal-body { background: #1c2520; }

/* ---------- Theme Toggle Button ---------- */
.nav-theme-item { margin-left: 0.4rem; }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  display: grid;
  place-items: center;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}
.theme-toggle:hover { border-color: var(--emerald); background: rgba(22,134,91,0.08); }

.theme-icon { font-size: 1rem; line-height: 1; transition: opacity 0.2s, transform 0.2s; position: absolute; }
.theme-icon-sun  { opacity: 1; transform: scale(1); }
.theme-icon-moon { opacity: 0; transform: scale(0.6); }

[data-theme="dark"] .theme-icon-sun  { opacity: 0; transform: scale(0.6); }
[data-theme="dark"] .theme-icon-moon { opacity: 1; transform: scale(1); }

/* ---------- Portfolio Filters ---------- */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-2);
}
.filter-btn {
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1.1rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.filter-btn:hover { color: var(--charcoal); border-color: var(--emerald); }
.filter-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.portfolio-search input { border: 1.5px solid var(--line); border-radius: var(--radius-sm); }

.portfolio-card.hidden { display: none; }

/* ---------- Enhanced Demo: Filter & Menu ---------- */
.demo-filter-wrap { flex: 0 0 auto; }
.demo-filter-select {
  padding: 0.7rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--text-sm);
  color: var(--charcoal);
  background: var(--white);
  transition: border-color var(--transition);
}
.demo-filter-select:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(22,134,91,0.14);
}

.demo-menu-wrap { position: relative; }
.demo-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  padding: 0.35rem 0;
  animation: pop-in 0.18s ease;
}
.demo-menu button[role="menuitem"] {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--charcoal);
  transition: background var(--transition);
}
.demo-menu button[role="menuitem"]:hover { background: var(--bg); color: var(--emerald-dark); }
.demo-menu button.danger-item:hover { color: #b34740; background: rgba(196,85,77,0.07); }
.demo-menu hr { border: none; border-top: 1px solid var(--line); margin: 0.25rem 0; }

/* ---------- Import Preview ---------- */
.import-preview {
  background: rgba(22,134,91,0.05);
  border: 1px solid rgba(22,134,91,0.25);
  border-radius: var(--radius);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
}
.import-header { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-1); }
.import-summary { color: var(--muted); font-size: var(--text-sm); margin: 0; }
.import-actions { display: flex; gap: 0.6rem; margin-top: var(--space-1); }

/* ---------- Data Quality Panel ---------- */
.quality-panel {
  background: rgba(52,201,136,0.05);
  border: 1px solid rgba(22,134,91,0.2);
  border-radius: var(--radius);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
}
.quality-title { margin: 0 0 var(--space-2); font-size: 1rem; }
.quality-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
  margin-bottom: var(--space-2);
}
.quality-metric {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: var(--text-sm);
}
.quality-metric .q-label { color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.quality-metric .q-value { font-size: 1.3rem; font-weight: 700; margin: 0.2rem 0 0; }
.quality-metric.q-good .q-value { color: var(--emerald-dark); }
.quality-metric.q-warn .q-value { color: #9c6f18; }
.quality-metric.q-bad  .q-value { color: #b34740; }
.quality-actions { display: flex; gap: 0.6rem; }

/* ---------- Bulk Selection Bar ---------- */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  background: rgba(22,134,91,0.08);
  border: 1px solid rgba(22,134,91,0.25);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  margin-top: var(--space-1);
  animation: pop-in 0.18s ease;
}
.bulk-count { font-size: var(--text-sm); font-weight: 700; color: var(--emerald-dark); }

/* ---------- Pagination ---------- */
.demo-pagination {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}
.page-btn {
  min-width: 34px; height: 34px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.page-btn:hover { border-color: var(--emerald); color: var(--emerald); }
.page-btn.current {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.page-btn:disabled { opacity: 0.4; cursor: default; }

.demo-storage-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }

/* ---------- Analytics Dashboard ---------- */
.analytics-notice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(22,134,91,0.07);
  border: 1px solid rgba(22,134,91,0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-3);
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-2);
}

.kpi-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-2);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.kpi-card .kpi-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.kpi-card .kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.3rem;
}
.kpi-card .kpi-pct {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.3rem;
}
.kpi-green { color: var(--emerald-dark); }
.kpi-amber { color: #9c6f18; }
.kpi-red   { color: #b34740; }
.kpi-blue  { color: #2a71b0; }

.analytics-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.chart-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-2) var(--space-1);
  box-shadow: var(--shadow-sm);
}
.chart-title { font-size: 0.9rem; font-weight: 700; margin: 0 0 var(--space-1); }
.chart-wrap { position: relative; }
.chart-legend, .chart-desc {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

@media (max-width: 700px) {
  .analytics-charts { grid-template-columns: 1fr; }
}

/* ---------- Task Manager ---------- */
.task-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-3);
}

.task-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.task-filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.task-filter-group select {
  padding: 0.62rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--text-sm);
  color: var(--charcoal);
  background: var(--white);
  transition: border-color var(--transition);
}
.task-filter-group select:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(22,134,91,0.14);
}
.task-actions { display: flex; gap: 0.6rem; margin-left: auto; flex-wrap: wrap; }

.task-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-2);
}
.task-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.75rem;
  border: 1px solid transparent;
}
.tstat-todo     { background: rgba(42,113,176,0.1); color: #2a71b0; border-color: rgba(42,113,176,0.25); }
.tstat-inprog   { background: rgba(156,111,24,0.12); color: #9c6f18; border-color: rgba(156,111,24,0.3); }
.tstat-done     { background: rgba(22,134,91,0.1); color: var(--emerald-dark); border-color: rgba(22,134,91,0.25); }
.tstat-overdue  { background: rgba(179,71,64,0.1); color: #b34740; border-color: rgba(179,71,64,0.3); }

.task-form-wrap {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
}
.task-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2);
}
@media (max-width: 760px) {
  .task-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .task-form-grid { grid-template-columns: 1fr; }
}

.task-list {
  display: grid;
  gap: 0.5rem;
  min-height: 60px;
}
.task-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-2);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.task-card:hover { border-color: rgba(22,134,91,0.35); box-shadow: var(--shadow-sm); }

.task-card.done-task { opacity: 0.65; }
.task-card.done-task .task-title { text-decoration: line-through; }
.task-card.overdue-task { border-left: 3px solid #c4554d; }

.task-left { min-width: 0; }
.task-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 0.25rem; }
.task-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.78rem; color: var(--muted); }
.task-notes { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.priority-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.55rem;
}
.priority-high   { background: rgba(179,71,64,0.12); color: #b34740; }
.priority-medium { background: rgba(196,138,32,0.14); color: #9c6f18; }
.priority-low    { background: rgba(42,113,176,0.12); color: #2a71b0; }

.task-status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.55rem;
}
.tstatus-todo     { background: rgba(42,113,176,0.1); color: #2a71b0; }
.tstatus-inprog   { background: rgba(156,111,24,0.12); color: #9c6f18; }
.tstatus-done     { background: rgba(22,134,91,0.12); color: var(--emerald-dark); }
.tstatus-overdue  { background: rgba(179,71,64,0.1); color: #b34740; }

.task-right { display: flex; gap: 0.4rem; align-items: center; flex-wrap: nowrap; }
.task-right button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.task-right button:hover { color: var(--emerald); border-color: var(--emerald); background: rgba(22,134,91,0.06); }
.task-right .task-delete:hover { color: #b34740; border-color: #c4554d; background: rgba(196,85,77,0.07); }

.task-empty {
  text-align: center;
  color: var(--muted);
  font-size: var(--text-sm);
  padding: var(--space-3);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Footer improvements ---------- */
.footer-location {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.4);
  margin-top: 0.4rem;
}

/* ---------- Responsive adjustments for new sections ---------- */
@media (max-width: 880px) {
  .analytics-charts { grid-template-columns: 1fr; }
  .task-toolbar { flex-direction: column; align-items: stretch; }
  .task-actions { margin-left: 0; }
}

@media (max-width: 600px) {
  .demo-toolbar { flex-direction: column; align-items: stretch; }
  .demo-filter-wrap { width: 100%; }
  .demo-filter-select { width: 100%; }
  .demo-menu-wrap { align-self: flex-end; }
  .quality-metrics { grid-template-columns: 1fr 1fr; }
}

/* ---------- Accessibility: checkbox in table ---------- */
.data-table input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer;
  accent-color: var(--emerald);
}
