/* =========================================================================
   Sampada Nepal — portfolio
   High-contrast dark mode, engineering/robotics flavored.
   ========================================================================= */

:root {
  --bg: #08090c;
  --bg-2: #0d0f14;
  --panel: #101319;
  --panel-2: #141821;
  --ink: #f4f6fb;
  --muted: #9aa3b2;
  --faint: #5c6472;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --accent: #ff2e88;         /* refined neon magenta-pink */
  --accent-soft: #ff5ba3;
  --accent-ink: #08090c;
  --accent-glow: rgba(255, 46, 136, 0.55);
  --accent-dim: rgba(255, 46, 136, 0.14);
  --grid-line: rgba(255, 255, 255, 0.035);

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f3ef;
  --bg-2: #ecebe4;
  --panel: #ffffff;
  --panel-2: #f7f6f2;
  --ink: #14161c;
  --muted: #565d6b;
  --faint: #8b93a1;
  --line: rgba(10, 12, 18, 0.10);
  --line-strong: rgba(10, 12, 18, 0.18);
  --accent: #d6116a;
  --accent-soft: #e23d86;
  --accent-ink: #ffffff;
  --accent-glow: rgba(214, 17, 106, 0.32);
  --accent-dim: rgba(214, 17, 106, 0.12);
  --grid-line: rgba(10, 12, 18, 0.045);
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 8px;
  font: 600 13px/1 var(--font-mono);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- animated background ---------- */
.bg-grid {
  position: fixed;
  inset: -2px;
  z-index: -3;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- shared layout ---------- */
main { position: relative; z-index: 1; }

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6rem 24px;
}
@media (min-width: 900px) {
  .section { padding: 8rem 40px; }
}

.section-head { margin-bottom: 3rem; max-width: 720px; }
.section-index {
  font: 600 13px/1 var(--font-mono);
  letter-spacing: 0.24em;
  color: var(--accent);
  margin: 0 0 14px;
}
.section-index::before { content: "// "; color: var(--faint); }
.section-title {
  font: 700 clamp(1.9rem, 4vw, 3rem)/1.05 var(--font-sans);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-wrap: balance;
}
.section-sub {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
  max-width: 60ch;
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 12.5px/1.4 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-dim); }
  50% { box-shadow: 0 0 0 7px transparent; }
}

/* ---------- buttons ---------- */
.btn {
  --sh: 0 1px 0 rgba(255,255,255,0.08) inset, 0 6px 18px rgba(0,0,0,0.35);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 600 14px/1 var(--font-mono);
  letter-spacing: 0.04em;
  padding: 13px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease, color 0.18s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { transition: transform 0.18s ease; }
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 9px 14px; font-size: 12.5px; }
.btn-lg { padding: 16px 26px; font-size: 15px; }

.btn-accent {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px var(--accent-glow), var(--sh);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--accent), 0 12px 34px var(--accent-glow); }
.btn-accent:hover svg { transform: translate(2px, -2px); }
.btn-accent[data-scroll]:hover svg { transform: translateY(3px); }

.btn-outline {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--sh);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-outline:hover svg { transform: translate(2px, -2px); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--line-strong); background: var(--panel); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: max(14px, env(safe-area-inset-top));
}
@media (min-width: 900px) { .nav-inner { padding-left: 40px; padding-right: 40px; } }

.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark {
  width: 22px; height: 22px;
  border: 2px solid var(--accent);
  border-radius: 5px;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.brand-mark::before {
  content: "";
  position: absolute; inset: 4px;
  background: var(--accent);
  border-radius: 1px;
}
.brand:hover .brand-mark { transform: rotate(90deg); }
.brand-name { font: 700 15px/1 var(--font-mono); letter-spacing: 0.06em; }
.brand-dot { color: var(--accent); }

.nav-links { display: none; gap: 4px; }
@media (min-width: 780px) { .nav-links { display: flex; } }
.nav-links a {
  position: relative;
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.03em;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}
.nav-tools { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--line-strong); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5rem 24px 4rem;
}
@media (min-width: 900px) { .hero { padding: 7rem 40px 5rem; } }

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.35fr 1fr; gap: 64px; }
}

.hero-name {
  font: 700 clamp(3rem, 11vw, 7.2rem)/0.92 var(--font-sans);
  letter-spacing: -0.045em;
  margin: 0 0 24px;
  text-transform: uppercase;
}
.hero-name .line { display: block; }
.hero-name .accent {
  color: var(--accent);
  text-shadow: 0 0 34px var(--accent-glow);
}

.hero-typed {
  font: 500 clamp(0.95rem, 1.8vw, 1.15rem)/1.4 var(--font-mono);
  color: var(--ink);
  margin: 0 0 26px;
  min-height: 1.6em;
}
.typed-prefix { color: var(--accent); }
.caret {
  display: inline-block;
  width: 9px; height: 1.05em;
  background: var(--accent);
  margin-left: 3px;
  transform: translateY(2px);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-bio {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.65;
  max-width: 56ch;
  margin: 0 0 30px;
  text-wrap: pretty;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  list-style: none;
  padding: 22px 0 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.hero-stats li { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font: 700 2rem/1 var(--font-mono);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font: 500 11.5px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* portrait */
.hero-portrait { display: flex; justify-content: center; }
.portrait-frame {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    repeating-linear-gradient(135deg, var(--panel) 0 12px, var(--panel-2) 12px 24px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px var(--line);
}
.portrait-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.05);
}
.portrait-frame img.img-missing { opacity: 0; }
.portrait-frame .img-missing + .portrait-scan { }
.portrait-scan {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent, var(--accent-dim), transparent);
  height: 40%;
  mix-blend-mode: screen;
  animation: scan 4.5s linear infinite;
  pointer-events: none;
}
@keyframes scan { 0% { transform: translateY(-120%);} 100% { transform: translateY(320%);} }
.corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid var(--accent);
}
.corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.portrait-tag {
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  display: flex; justify-content: space-between;
  font: 500 9.5px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
@media (prefers-reduced-motion: reduce) {
  .portrait-scan, .status-dot { animation: none; }
}

/* ---------- projects ---------- */
.project-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45), 0 0 0 1px var(--accent-dim);
}
.pc-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--panel-2), var(--panel)),
    repeating-linear-gradient(45deg, transparent 0 18px, var(--grid-line) 18px 19px);
  border-bottom: 1px solid var(--line);
}
.pc-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.project-card:hover .pc-media img { transform: scale(1.06); }
.pc-media .ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--faint);
}
.pc-media .ph svg { opacity: 0.5; }
.pc-num {
  position: absolute;
  top: 10px; left: 10px;
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--accent);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.pc-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pc-title { font: 600 1.08rem/1.25 var(--font-sans); letter-spacing: -0.01em; margin: 0; }
.pc-short { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin: 0; flex: 1; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 6px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.project-card:hover .tag { border-color: var(--line-strong); }
.tag.more { color: var(--accent); border-color: var(--accent-dim); }
.pc-open {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-top: 2px;
}
.pc-open svg { transition: transform 0.2s ease; }
.project-card:hover .pc-open svg { transform: translateX(3px); }

/* ---------- coursework ---------- */
.course-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .course-grid { grid-template-columns: repeat(3, 1fr); } }
.course {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.course:hover { border-color: var(--line-strong); transform: translateX(4px); }
.course-name { font-weight: 500; font-size: 0.98rem; }
.course-code {
  font: 600 13px/1 var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---------- art ---------- */
.art-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .art-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .art-grid { grid-template-columns: repeat(4, 1fr); } }
.art-card {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.art-thumb {
  aspect-ratio: 1;
  display: grid; place-items: center;
  color: var(--faint);
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, var(--grid-line) 14px 15px);
  border-bottom: 1px dashed var(--line-strong);
}
.art-body { padding: 14px 16px 16px; }
.art-title { font-weight: 600; font-size: 0.98rem; margin: 0 0 4px; }
.art-meta { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---------- contact ---------- */
.contact-body { display: flex; flex-direction: column; gap: 34px; max-width: 640px; }
.contact-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.contact-links li { border-top: 1px solid var(--line); }
.contact-links li:last-child { border-bottom: 1px solid var(--line); }
.contact-links a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  transition: padding 0.2s ease, color 0.2s ease;
}
.contact-links a:hover { padding-left: 14px; color: var(--accent); }
.cl-label {
  font: 600 11.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--faint);
  width: 96px;
  flex-shrink: 0;
}
.contact-links a:hover .cl-label { color: var(--accent); }
.cl-value { font-weight: 500; font-size: 1.02rem; flex: 1; min-width: 0; }
.contact-links a svg { color: var(--faint); transition: transform 0.2s ease, color 0.2s ease; flex-shrink: 0; }
.contact-links a:hover svg { color: var(--accent); transform: translate(2px, -2px); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font: 500 12.5px/1.5 var(--font-mono);
  letter-spacing: 0.03em;
  color: var(--faint);
}
@media (min-width: 900px) { .footer { padding-left: 40px; padding-right: 40px; } }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 700px) { .modal { align-items: center; } }
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 3, 6, 0.72);
  backdrop-filter: blur(6px);
  animation: fade 0.25s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: 92dvh;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  box-shadow: 0 -20px 80px rgba(0,0,0,0.6);
  animation: sheet 0.3s cubic-bezier(0.22,1,0.36,1);
  overscroll-behavior: contain;
}
@media (min-width: 700px) {
  .modal-panel { border-radius: 18px; animation: pop 0.28s cubic-bezier(0.22,1,0.36,1); }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.modal-close:hover { color: var(--accent); border-color: var(--accent); }
.modal-close:active { transform: scale(0.92); }
.modal-scroll { max-height: 92dvh; overflow-y: auto; }

.m-hero {
  position: relative;
  aspect-ratio: 16 / 8;
  background:
    linear-gradient(135deg, var(--panel-2), var(--panel)),
    repeating-linear-gradient(45deg, transparent 0 18px, var(--grid-line) 18px 19px);
  border-bottom: 1px solid var(--line);
}
.m-hero img { width: 100%; height: 100%; object-fit: cover; }
.m-hero .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.m-body { padding: 26px 26px 34px; }
@media (min-width: 700px) { .m-body { padding: 32px 36px 40px; } }
.m-index { font: 600 12px/1 var(--font-mono); letter-spacing: 0.14em; color: var(--accent); margin: 0 0 10px; }
.m-title { font: 700 clamp(1.5rem, 3.5vw, 2.2rem)/1.1 var(--font-sans); letter-spacing: -0.02em; margin: 0 0 14px; }
.m-meta {
  font: 500 12.5px/1.5 var(--font-mono);
  color: var(--muted);
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 22px;
}
.m-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.m-tags .tag { font-size: 11px; padding: 6px 10px; }
.m-para { color: var(--muted); font-size: 1rem; line-height: 1.7; margin: 0 0 18px; text-wrap: pretty; }
.m-impact {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.55;
  margin: 6px 0 20px;
}
.m-impact svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.m-impact strong { color: var(--accent); font-weight: 700; }
.m-link {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--font-mono);
  color: var(--accent-ink);
  background: var(--accent);
  padding: 11px 16px;
  border-radius: 10px;
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: transform 0.12s ease, box-shadow 0.18s ease;
  margin-top: 4px;
}
.m-link:hover { transform: translateY(-2px); box-shadow: 0 10px 28px var(--accent-glow); }
.m-link:active { transform: scale(0.97); }
.m-gallery { display: grid; gap: 12px; margin: 22px 0 0; }
@media (min-width: 560px) { .m-gallery.two { grid-template-columns: repeat(2, 1fr); } }
.m-gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, transparent 0 16px, var(--grid-line) 16px 17px);
}
.m-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.m-gallery .ph { aspect-ratio: 4/3; display: grid; place-items: center; color: var(--faint); }
.m-sub { font: 600 11.5px/1 var(--font-mono); letter-spacing: 0.14em; color: var(--faint); margin: 24px 0 12px; text-transform: uppercase; }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
