/* ==========================================================================
   Kamruzzaman Polash — Backend Engineer & SaaS Architect
   Modern Engineered Blueprint + Glassmorphism + Dual-Theme (Vanilla CSS)
   ========================================================================== */

@font-face {
  font-family: 'Maqin Larisa';
  src: url('/assets/fonts/maqin-larisa.otf') format('opentype'),
       url('/assets/fonts/maqin-larisa.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fafafa;
  --paper-2: #ffffff;
  --paper-3: #f4f4f5;
  --ink: #09090b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --accent: #4f46e5;
  --accent-2: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --accent-glow: rgba(99, 102, 241, 0.25);
  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --serif: var(--sans);
  --font-signature: 'Maqin Larisa', cursive;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 36px -8px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--line);
  --measure: 68ch;
}

.dark {
  --paper: #09090b;
  --paper-2: #121215;
  --paper-3: #18181b;
  --ink: #fafafa;
  --ink-2: #d4d4d8;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.35);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.07);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100%;
}
body {
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 1.025rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
  position: relative;
}

/* Smooth transition ONLY when manually toggling theme, never on initial page load */
.theme-animating,
.theme-animating body,
.theme-animating * {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease !important;
}
h1, h2, h3, h4 {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-wrap: balance;
  overflow-wrap: break-word;
}
p, li, blockquote {
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: transparent; border: 0; padding: 0; }
button.nav__link { background: transparent; border: 0; padding: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
hr { border: 0; border-top: 1px solid var(--line); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 2px solid var(--paper); border-radius: 99px; }

/* ---------- primitives ---------- */
.wrap { width: 100%; max-width: 64rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.section { padding-block: clamp(3.5rem, 6vw, 5rem); }
.rule { height: 1px; background: var(--line); }

.label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--accent { color: var(--accent); }

.lede { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--muted); }

.hidden { display: none !important; }
.ic { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.only-light { display: inline-flex; align-items: center; gap: .4rem; }
.only-dark { display: none; align-items: center; gap: .4rem; }
.dark .only-light { display: none; }
.dark .only-dark { display: inline-flex; }

.skip {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 100; width: auto; height: auto;
  clip: auto; margin: 0; overflow: visible;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: var(--radius); font-family: var(--mono); font-size: .8rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.15rem; border: 1px solid transparent; border-radius: var(--radius);
  font-family: var(--sans); font-size: .88rem; font-weight: 500;
  line-height: 1.2; text-decoration: none;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); color: #fff; }
.dark .btn--solid { background: #fafafa; color: #09090b; }
.dark .btn--solid:hover { background: #e4e4e7; color: #09090b; }
.btn--line { border-color: var(--line); color: var(--ink); background: var(--paper-2); }
.btn--line:hover { border-color: var(--line-2); background: var(--paper-3); }
.btn--text { padding-inline: 0; border: 0; color: var(--muted); font-size: .88rem; }
.btn--text:hover { color: var(--ink); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: transparent; color: var(--muted);
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); background: var(--paper-3); }

.tag {
  display: inline-flex; align-items: center; padding: .2rem .55rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: .7rem; color: var(--ink-2);
  white-space: nowrap; background: var(--paper-2);
}
.tag--accent { border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); background: var(--accent-soft); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color .2s ease, border-color .2s ease;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 3.75rem; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand__mark {
  font-family: var(--mono); font-weight: 700; font-size: .8rem;
  color: var(--paper); background: var(--ink); width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center; border-radius: 6px;
}
.brand__name { font-family: var(--mono); font-size: .9rem; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: .35rem; transition: color .16s ease; }
.brand:hover .brand__name { color: var(--accent); }
.brand__handle { font-family: var(--mono); font-size: .75rem; color: var(--muted); font-weight: 500; transition: color .16s ease; }
.brand__role { display: none; }

.nav { display: none; align-items: center; gap: 1.4rem; }
.nav__link {
  font-family: var(--sans); font-size: .88rem; font-weight: 500;
  color: var(--muted); transition: color .16s ease;
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); }
.nav__group { position: relative; }
.nav__menu {
  position: absolute; right: 0; left: auto; top: 100%;
  width: 17rem; max-width: calc(100vw - 2rem); padding: .5rem; margin-top: .6rem;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity .16s ease, visibility .16s;
}
.nav__group:hover .nav__menu, .nav__group:focus-within .nav__menu { opacity: 1; visibility: visible; }
.nav__menu a { display: block; padding: .55rem .7rem; border-radius: var(--radius-sm); }
.nav__menu a:hover { background: var(--paper-3); }
.nav__menu strong { display: block; font-size: .85rem; color: var(--ink); font-weight: 600; }
.nav__menu span { display: block; font-family: var(--mono); font-size: .68rem; color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.header-actions .btn { display: none; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: var(--paper);
  transform: translateY(-100%); visibility: hidden; opacity: 0;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .3s, visibility .3s;
  display: grid; grid-template-rows: auto 1fr; overflow-y: auto;
}
.mobile-menu.is-open { transform: none; visibility: visible; opacity: 1; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; height: 3.75rem; border-bottom: 1px solid var(--line); }
.mobile-menu__nav { padding-block: 2rem; }
.mobile-menu__nav ul { list-style: none; padding: 0; }
.mobile-menu__link {
  display: block; padding: .75rem 0; font-family: var(--sans);
  font-size: 1.3rem; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line);
}
.mobile-menu__sub { padding: .5rem 0 .5rem 1rem; }
.mobile-menu__sub a { display: block; padding: .4rem 0; font-size: .95rem; color: var(--ink-2); }
.mobile-menu__foot { margin-top: 2rem; display: flex; flex-direction: column; gap: .8rem; }

/* ---------- hero ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.bg-blueprint {
  background-size: 28px 28px;
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.07) 1px, transparent 1px);
}
.dark .bg-blueprint {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
}

.hero__inner {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.hero__grid {
  display: grid;
  gap: 2rem;
  min-width: 0;
  max-width: 100%;
}

.hero__kicker { display: inline-flex; align-items: center; gap: .55rem; white-space: nowrap; letter-spacing: 0.1em; }
.dot { width: .5rem; height: .5rem; border-radius: 99px; background: var(--ok); display: inline-block; flex-shrink: 0; }
.dot--live { animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70%,100% { box-shadow: 0 0 0 8px transparent; } }

.hero__title {
  margin-top: 1.1rem;
  font-size: clamp(2.1rem, 4.5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.hero__title span {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__lede { margin-top: 1.2rem; max-width: 62ch; font-size: 1.05rem; line-height: 1.7; color: var(--ink-2); font-weight: 400; }
.hero__sub { margin-top: .8rem; max-width: 62ch; color: var(--muted); font-size: .95rem; line-height: 1.65; }
.hero__actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

/* ======================================================================
   Hero Portrait — Organic Fluid Blob (Tom Hirst Style)
   ====================================================================== */
.hero__portrait-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero__portrait-ambient {
  position: absolute;
  width: 90%;
  height: 90%;
  background: radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.16) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 72%);
  filter: blur(48px);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.dark .hero__portrait-ambient {
  background: radial-gradient(circle at 50% 50%, rgba(129, 140, 248, 0.28) 0%, rgba(99, 102, 241, 0.14) 50%, transparent 72%);
  filter: blur(52px);
}

.hero__portrait-blob {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  overflow: hidden;
  background: var(--paper-2);
  border: none;
  box-shadow: 
    0 28px 56px -12px rgba(15, 23, 42, 0.16),
    0 12px 24px -8px rgba(15, 23, 42, 0.08);
  transform: none;
  transition: border-radius 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.dark .hero__portrait-blob {
  box-shadow: 
    0 32px 64px -16px rgba(0, 0, 0, 0.8),
    0 12px 28px -8px rgba(0, 0, 0, 0.6);
}

.hero__portrait-blob:hover {
  transform: translateY(-4px) scale(1.02);
  border-radius: 40% 60% 65% 35% / 40% 45% 55% 60%;
  box-shadow: 
    0 36px 72px -16px rgba(79, 70, 229, 0.24),
    0 14px 32px -8px rgba(79, 70, 229, 0.14);
}

.hero__portrait-wrap:hover .hero__portrait-ambient {
  transform: scale(1.08);
  opacity: 1;
}

.hero__portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

/* ======================================================================
   Infinite Auto-Scrolling Tech Stack Marquee (Ticker)
   ====================================================================== */
.tech-marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 1.15rem 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
}

.tech-marquee__track {
  display: flex;
  width: max-content;
  user-select: none;
}

.tech-marquee__group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-right: 1.5rem;
  animation: tech-marquee-scroll 42s linear infinite;
  will-change: transform;
}

.tech-marquee:hover .tech-marquee__group,
.tech-marquee:focus-within .tech-marquee__group {
  animation-play-state: paused;
}

@keyframes tech-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .tech-marquee__group {
    animation-play-state: paused;
  }
}

.tech-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.95rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.tech-marquee__item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--paper-2);
}

.tech-marquee__item svg,
.tech-marquee__item img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 899px) {
  .hero__portrait-wrap {
    margin-top: 1.5rem;
  }
  .hero__portrait-blob {
    max-width: 290px;
    margin-inline: auto;
  }
  .hero__portrait-blob:hover {
    transform: translateY(-2px) scale(1.01);
  }
  .hero__portrait-ambient {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 600px) {
  .tech-marquee {
    padding: 0.85rem 0;
  }
  .tech-marquee__group {
    gap: 1rem;
    padding-right: 1rem;
    animation-duration: 32s;
  }
  .tech-marquee__item {
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
    gap: 0.45rem;
  }
  .tech-marquee__item svg,
  .tech-marquee__item img {
    width: 17px;
    height: 17px;
  }
}

.facts {
  margin-top: 1.8rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.fact__value { font-family: var(--sans); font-size: clamp(1.35rem, 3vw, 2.1rem); color: var(--ink); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; line-height: 1.1; }
.fact__label { font-family: var(--mono); font-size: clamp(0.6rem, 1.8vw, 0.68rem); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; line-height: 1.35; }

/* ---------- section head ---------- */
.section__head { display: grid; gap: .8rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__index { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; color: var(--accent); text-transform: uppercase; font-weight: 600; }
.section__title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); max-width: 24ch; }
.section__lede { max-width: 62ch; color: var(--muted); font-size: 1rem; line-height: 1.6; }

/* ---------- work ---------- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 2rem;
}
.filter-tab {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  cursor: pointer;
  transition: all .16s ease;
}
.filter-tab:hover {
  border-color: var(--line-2);
  color: var(--ink);
}
.filter-tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.work { display: grid; gap: 1.25rem; }
.work__item {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  position: relative;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.work__item:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: var(--shadow);
}
.work__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.work__index { font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .1em; font-weight: 600; }
.work__badge { font-family: var(--mono); font-size: .7rem; color: var(--accent); letter-spacing: .08em; font-weight: 600; text-transform: uppercase; }
.work__title { font-size: 1.25rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.work__meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin-top: .3rem; }
.work__meta span { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.work__summary { margin-top: .4rem; color: var(--ink-2); font-size: .95rem; line-height: 1.6; }
.work__link { font-family: var(--mono); font-size: .74rem; color: var(--accent); letter-spacing: .06em; font-weight: 600; white-space: nowrap; }
.work__link:hover { color: var(--accent-2); text-decoration: underline; }
.work__outcomes {
  display: grid;
  gap: .55rem;
  margin-top: .5rem;
  padding: .85rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.work__outcome {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  font-size: .88rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.work__outcome-bullet {
  color: var(--ok);
  font-size: .85rem;
  font-weight: bold;
  flex-shrink: 0;
}
.work__outcome strong {
  color: var(--ink);
  font-weight: 600;
}
.work__detail { display: grid; gap: .75rem; margin-top: .8rem; }
.work__cell { border-left: 2px solid var(--line); padding-left: .85rem; }
.work__cell b { display: block; font-family: var(--mono); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.work__cell p { font-size: .9rem; color: var(--ink-2); line-height: 1.55; }
.work__cell--result { border-left-color: var(--ok); }
.work__cell--problem { border-left-color: var(--line-2); }
.work__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.work__metrics { display: flex; gap: 1.2rem; }
.work__metric b { font-family: var(--sans); font-size: 1.25rem; color: var(--accent); font-weight: 700; display: block; line-height: 1; }
.work__metric span { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: .2rem; display: block; }

/* ---------- about ---------- */
.about { background: var(--paper-2); border-block: 1px solid var(--line); }
.about__quote {
  font-family: var(--sans); font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.25;
  color: var(--ink); font-weight: 600; letter-spacing: -0.025em;
}
.about__grid { display: grid; gap: 2rem; margin-top: 1.8rem; }
.about__text { display: grid; gap: 1rem; font-size: .98rem; line-height: 1.7; }
.facts-table { border-top: 1px solid var(--line); }
.facts-table__row { display: flex; justify-content: space-between; gap: 1.5rem; padding: .65rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.facts-table__k { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts-table__v { color: var(--ink); text-align: right; }

/* --- About: Proof grid --- */
.about__proof {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.proof-item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.proof-item:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 4px 16px -4px var(--accent-glow);
}
.proof-item__icon { font-size: 1.1rem; line-height: 1; }
.proof-item__val {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.proof-item__label {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}

/* --- About: GitHub stats --- */
.about__github {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.about__github-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.about__github-link {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent);
  text-decoration: none;
  transition: opacity .2s ease;
}
.about__github-link:hover { opacity: .75; }
.about__github-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}
.github-stat-img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  max-width: 100%;
  height: auto;
  display: block;
}
.github-stat-img--light { display: block; }
.github-stat-img--dark  { display: none; }
.dark .github-stat-img--light { display: none; }
.dark .github-stat-img--dark  { display: block; }

/* --- About: OSS package highlight --- */
.oss-highlight {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: 1rem;
  padding: .85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, var(--paper-2));
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.oss-highlight:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--paper-2));
  box-shadow: 0 4px 16px -4px var(--accent-glow);
}
.oss-highlight__icon { font-size: 1.3rem; flex-shrink: 0; }
.oss-highlight__body { display: flex; flex-direction: column; gap: .2rem; flex: 1; min-width: 0; }
.oss-highlight__name {
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
}
.oss-highlight__desc {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--muted);
  line-height: 1.4;
}
.oss-highlight__arrow { font-size: 1rem; color: var(--accent); flex-shrink: 0; }

/* --- GitHub contribution heatmap card --- */
.gh-contrib {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-2);
}
.gh-contrib__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.gh-contrib__identity {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
}
.gh-contrib__link {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent);
  text-decoration: none;
  transition: opacity .15s ease;
}
.gh-contrib__link:hover { opacity: .7; }
.gh-contrib__graph {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.gh-contrib__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.gh-contrib__repos { padding: .75rem 1.25rem 1rem; }

.gh-repo {
  display: block;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}
.gh-repo:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--paper-2); }
.gh-repo__top {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .3rem;
}
.gh-repo__icon { color: var(--muted); flex-shrink: 0; }
.gh-repo__name { font-family: var(--mono); font-size: .78rem; font-weight: 600; color: var(--accent); }
.gh-repo__lang {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: .1rem .4rem;
}
.gh-repo__desc { font-size: .82rem; color: var(--muted); line-height: 1.45; }

/* --- Proof grid & GitHub responsive --- */
@media (max-width: 767px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .gh-contrib__graph { padding: .75rem 1rem; }
}
@media (max-width: 480px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
}

/* ---------- skills ---------- */
.skills { border-top: 1px solid var(--line); }
.skill { padding-block: 1.4rem; border-bottom: 1px solid var(--line); display: grid; gap: .6rem; }
.skill__title { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; }
.skill__blurb { color: var(--muted); font-size: .88rem; line-height: 1.55; }
.skill__items { display: flex; flex-wrap: wrap; gap: .35rem; }
.skill__item { font-family: var(--mono); font-size: .7rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .55rem; background: var(--paper-2); }

/* ---------- experience ---------- */
.xp { border-top: 1px solid var(--line); }
.xp__row { display: grid; gap: .8rem; padding-block: 1.6rem; border-bottom: 1px solid var(--line); }
.xp__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem; }
.xp__role { font-family: var(--sans); font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.xp__company { color: var(--muted); font-size: .95rem; }
.xp__period { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; color: var(--accent); }
.xp__meta { font-family: var(--mono); font-size: .66rem; color: var(--muted); }
.xp__points { display: grid; gap: .5rem; margin-top: .4rem; }
.xp__points li { list-style: none; display: grid; grid-template-columns: 1.2rem 1fr; gap: .2rem; font-size: .9rem; color: var(--ink-2); line-height: 1.6; }
.xp__points li::before { content: "—"; color: var(--line-2); }
.xp__now { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }

.edu-certs { margin-top: 2rem; display: grid; gap: .85rem; }
.edu-card {
  display: flex;
  gap: 1.2rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  align-items: flex-start;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.edu-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.edu-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.edu-card__body { flex: 1; min-width: 0; }
.edu-card__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.cert__tag {
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  display: block;
  margin-bottom: .2rem;
}
.edu-card__title { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 0 0 .25rem 0; line-height: 1.35; }
.edu-card__school { font-size: .9rem; color: var(--muted); margin: 0 0 .4rem 0; }
.edu-card__thesis { font-size: .84rem; color: var(--ink-2); line-height: 1.5; margin: 0; }
.edu-card__thesis strong { color: var(--ink); }

.certs { display: grid; gap: .75rem; margin-top: 0; }
.cert { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); }
.cert:hover { border-color: var(--line-2); }
.cert__title { color: var(--ink); font-weight: 600; font-size: .92rem; }
.cert__meta { font-family: var(--mono); font-size: .66rem; color: var(--muted); }

/* ---------- services ---------- */
.svc { border-top: 1px solid var(--line); display: grid; gap: 1.5rem; }
.svc__panel {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.4rem, 2.5vw, 1.85rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.svc__panel:hover {
  box-shadow: var(--shadow);
  border-color: var(--line-2);
}
.svc__body { display: flex; flex-direction: column; gap: .95rem; }
.svc__tag-row { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.svc__badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 4px;
  padding: .18em .55em;
}
.svc__n { font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.svc__title { font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin: 0; }
.svc__outcome { color: var(--ink-2); font-size: .97rem; line-height: 1.65; margin: 0; }
.svc__tech-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-block: .4rem;
}
.svc__tech-divider::before,
.svc__tech-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.svc__tech-divider span {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.svc__text { color: var(--ink-2); font-size: .95rem; line-height: 1.6; }
.svc__list { display: grid; gap: .55rem; margin: 0; padding: 0; margin-bottom: .25rem; }
.svc__list li { list-style: none; display: grid; grid-template-columns: 1.2rem 1fr; gap: .25rem; font-size: .9rem; color: var(--ink-2); line-height: 1.55; }
.svc__list li::before { content: "→"; color: var(--accent); }
.svc__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .85rem; }
.svc__media { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); padding: 1.25rem 1.35rem; }
.svc__media .label { display: block; margin-bottom: .85rem; }
.svc__deliverables { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.svc__deliverables li { display: flex; align-items: baseline; gap: .65rem; font-size: .88rem; color: var(--ink-2); line-height: 1.5; }
.svc__check { color: var(--ok); font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.svc__engagement {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin-top: 1.1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.45;
  color: var(--muted);
  letter-spacing: .01em;
}
.svc__engagement .dot {
  margin-top: 0.28rem;
}

/* Service Page Deliverables & Pricing Rows */
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.price-row span {
  color: var(--ink-2);
  font-size: .88rem;
  line-height: 1.4;
  flex: 1 1 auto;
  min-width: 0;
}
.price-row .cap-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: 1.1rem 0; cursor: pointer; list-style: none; min-width: 0;
  font-family: var(--sans); font-size: 1.05rem; font-weight: 500; color: var(--ink);
  overflow-wrap: anywhere;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__icon { font-family: var(--mono); color: var(--accent); font-size: 1.1rem; flex-shrink: 0; transition: transform .2s ease; }
details[open] .faq__icon { transform: rotate(45deg); }
.faq__a { padding-bottom: 1.2rem; color: var(--muted); font-size: .95rem; line-height: 1.65; }

/* ---------- contact ---------- */
.contact { border-top: 1px solid var(--line); background: var(--paper-2); }
.contact__title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); max-width: 24ch; }
.contact__grid { display: grid; gap: 2rem; margin-top: 1.8rem; }
.contact__pitch { font-size: 1rem; line-height: 1.6; color: var(--ink-2); margin-bottom: 1.25rem; }
.contact__links { display: grid; gap: .6rem; }
.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}
.contact__link:hover {
  border-color: var(--accent);
  transform: translateX(3px);
}
.contact__link span:first-child { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact__link span:last-child { color: var(--ink); font-size: .92rem; font-weight: 500; }
.contact__link:hover span:last-child { color: var(--accent); }
.form { display: grid; gap: .9rem; }
.form__row { display: grid; gap: .9rem; }
.field-label { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field {
  width: 100%; margin-top: .3rem; padding: .65rem .85rem;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: .92rem;
}
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
textarea.field { resize: vertical; min-height: 7rem; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 3rem 2rem; }
.footer__wordmark {
  font-family: var(--font-signature);
  font-weight: 400;
  color: var(--ink);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  display: inline-block;
  user-select: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.footer__wordmark:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
.footer__grid { display: grid; gap: 1.5rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer__col h2 { margin-bottom: .9rem; }
.footer__col ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.footer__col a, .footer__col p { font-size: .9rem; color: var(--muted); }
.footer__col a:hover { color: var(--ink); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer__bottom p { font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.social { display: flex; gap: .5rem; }

/* ---------- breadcrumbs ---------- */
.crumbs { border-bottom: 1px solid var(--line); }
.crumbs__inner { display: flex; align-items: center; gap: .6rem; padding-block: .8rem; font-family: var(--mono); font-size: .7rem; color: var(--muted); min-width: 0; }
.crumbs a { flex-shrink: 0; }
.crumbs a:hover { color: var(--ink); }
.crumbs span:not(.crumbs__current) { flex-shrink: 0; }
.crumbs__current { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- blog index ---------- */
.blog-hero { border-bottom: 1px solid var(--line); padding-block: clamp(1.75rem, 3.5vw, 2.75rem); }
.blog-hero__title { font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 22ch; }
.blog-hero__lede { max-width: 58ch; margin-top: 1rem; color: var(--muted); }
.blog-hero__meta { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.4rem; }
.blog-hero__meta span, .blog-hero__meta a { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.blog-hero__meta a:hover { color: var(--accent); }
.feature {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature__title { font-size: clamp(1.7rem, 3.6vw, 2.8rem); max-width: 24ch; }
.feature__title a:hover { color: var(--accent); }
.feature__side { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.feature__side ol { list-style: none; padding: 0; display: grid; gap: .6rem; counter-reset: t; }
.feature__side li { counter-increment: t; display: grid; grid-template-columns: 1.6rem 1fr; gap: .3rem; font-size: .88rem; color: var(--muted); }
.feature__side li::before { content: counter(t, decimal-leading-zero); font-family: var(--mono); font-size: .7rem; color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .42rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  cursor: pointer;
  transition: all .18s ease;
}
.filter:hover {
  border-color: var(--line-2);
  color: var(--ink);
  transform: translateY(-1px);
}
.filter.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.32);
  font-weight: 600;
  transform: translateY(-1px);
}
.dark .filter.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.42);
}
.post-grid { display: grid; gap: 0; border-top: 1px solid var(--line); }
.post-row {
  position: relative;
  display: grid;
  gap: .55rem;
  padding-block: 1.5rem;
  padding-inline: 1.15rem;
  margin-inline: -1.15rem;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.post-row:hover {
  background: color-mix(in srgb, var(--paper-2) 80%, transparent);
}
.dark .post-row:hover {
  background: rgba(255, 255, 255, 0.035);
}
.post-row__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  pointer-events: none;
}
.post-row__cat {
  font-family: var(--mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
}
.post-row__time {
  font-family: var(--mono);
  font-size: .66rem;
  color: var(--muted);
}
.post-row__title {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  transition: color .18s ease;
}
.post-row__title a {
  color: inherit;
  text-decoration: none;
}
/* Accessible full-card clickable area (Stretched Link) */
.post-row__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
/* Visual Affordance: subtle interactive arrow */
.post-row__title::after {
  content: "→";
  display: inline-block;
  margin-left: .5rem;
  color: var(--accent);
  font-weight: 500;
  font-size: 1.1rem;
  opacity: 0.65;
  transform: translateX(0);
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), opacity .2s ease;
  pointer-events: none;
}
.post-row:hover .post-row__title {
  color: var(--accent);
}
.post-row:hover .post-row__title::after {
  opacity: 1;
  transform: translateX(6px);
}
.post-row__desc {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
  max-width: 70ch;
  pointer-events: none;
}

/* ---------- selected writing list ---------- */
.writing-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.writing-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding-block: 1.25rem;
  padding-inline: 1.15rem;
  margin-inline: -1.15rem;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.writing-item:hover {
  background: color-mix(in srgb, var(--paper-2) 80%, transparent);
}
.dark .writing-item:hover {
  background: rgba(255, 255, 255, 0.035);
}
.writing-item:hover .writing-title {
  color: var(--accent);
}
.writing-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  transition: color .16s ease;
}
.writing-title::after {
  content: "→";
  display: inline-block;
  margin-left: .5rem;
  color: var(--accent);
  font-weight: 500;
  font-size: 1rem;
  opacity: 0.65;
  transform: translateX(0);
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), opacity .2s ease;
}
.writing-item:hover .writing-title::after {
  opacity: 1;
  transform: translateX(6px);
}
.writing-desc {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
  margin-top: .3rem;
  max-width: 62ch;
}
.writing-meta {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .6rem;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .writing-item {
    grid-template-columns: 1fr;
    gap: .6rem;
  }
}

/* ---------- article ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); z-index: 70; }
.article-head { border-bottom: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.article-head__cat { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.article-head__title { font-size: clamp(2rem, 5vw, 3.8rem); max-width: 22ch; margin-top: 1.2rem; }
.article-head__desc { max-width: 60ch; margin-top: 1.2rem; color: var(--muted); font-size: 1.05rem; }
.article-head__by { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.byline { display: flex; align-items: center; gap: .8rem; }
.byline__mark { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--ink); color: var(--paper); border-radius: var(--radius); font-family: var(--serif); font-weight: 700; font-size: .9rem; }
.byline__name { color: var(--ink); font-weight: 600; font-size: .9rem; }
.byline__date { font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.article-body { padding-block: clamp(2.5rem, 5vw, 4rem); min-width: 0; max-width: 100%; }
.article-grid { display: grid; gap: clamp(2rem, 4vw, 4rem); min-width: 0; max-width: 100%; }
.article-grid > div { min-width: 0; max-width: 100%; }
.toc { display: none; }
.toc__title { margin-bottom: 1rem; }
.toc a { display: block; padding: .3rem 0 .3rem .9rem; border-left: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.toc a:hover, .toc a.is-active { color: var(--ink); border-color: var(--accent); }
.toc a.is-sub { padding-left: 1.6rem; font-size: .78rem; }

.article { max-width: var(--measure); font-size: 1.03rem; min-width: 0; width: 100%; }
.article h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.6em; margin-bottom: .6em; scroll-margin-top: 6rem; overflow-wrap: break-word; }
.article h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin-top: 1.9em; margin-bottom: .4em; scroll-margin-top: 6rem; overflow-wrap: break-word; }
.article p { margin-block: 1.1em; line-height: 1.78; overflow-wrap: break-word; }
.article ul, .article ol { margin-block: 1.1em; padding-left: 1.3em; display: grid; gap: .5em; }
.article li { overflow-wrap: break-word; }
.article li::marker { color: var(--accent); }
.article a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: break-word; }
.article a:hover { color: var(--accent-2); }
.article strong { color: var(--ink); font-weight: 600; }
.article blockquote { border-left: 2px solid var(--accent); padding-left: 1.1rem; margin-block: 1.5em; color: var(--ink); font-family: var(--serif); font-size: 1.15em; overflow-wrap: break-word; }
.article code { font-family: var(--mono); font-size: .85em; overflow-wrap: anywhere; word-break: break-word; }
.article :not(pre) > code { background: var(--paper-2); border: 1px solid var(--line); border-radius: 3px; padding: .12em .38em; color: var(--accent-2); overflow-wrap: anywhere; word-break: break-word; }
.dark .article :not(pre) > code { color: var(--accent); }

/* code blocks */
.code-block { margin-block: 2rem; border: 1px solid #27272a; border-radius: var(--radius); background: #0a0a0b; overflow: hidden; max-width: 100%; min-width: 0; }
.code-block__bar { display: flex; align-items: center; gap: .6rem; padding: .55rem .85rem; background: #141416; border-bottom: 1px solid #27272a; min-width: 0; }
.code-block__dots { display: flex; gap: .35rem; flex-shrink: 0; }
.code-block__dots i { width: .6rem; height: .6rem; border-radius: 99px; display: block; }
.code-block__dots i:nth-child(1) { background: #ff5f56; }
.code-block__dots i:nth-child(2) { background: #ffbd2e; }
.code-block__dots i:nth-child(3) { background: #27c93f; }
.code-block__title { font-family: var(--mono); font-size: .7rem; color: #a1a1aa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.code-block__spacer { flex: 1; min-width: .4rem; }
.code-block__lang { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: #71717a; flex-shrink: 0; }
.copy-code-btn { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .5rem; border: 1px solid #2e2e33; border-radius: 4px; background: #1b1b1f; color: #d4d4d8; font-family: var(--mono); font-size: .66rem; flex-shrink: 0; }
.copy-code-btn:hover { background: #26262b; color: #fff; }
.code-block pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; max-width: 100%; font-size: .84rem; line-height: 1.7; font-family: var(--mono); -webkit-overflow-scrolling: touch; }
.code-block code { background: none; border: 0; padding: 0; }

.hljs { color: #c8c1b4; background: transparent; }
.hljs-comment, .hljs-quote { color: #6b6459; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-subst { color: #e08c6a; }
.hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable { color: #d8a657; }
.hljs-string, .hljs-doctag, .hljs-regexp { color: #a8c37f; }
.hljs-title, .hljs-section, .hljs-selector-id { color: #7fb8d6; }
.hljs-type, .hljs-class .hljs-title, .hljs-title.class_ { color: #e6c07b; }
.hljs-tag, .hljs-name, .hljs-attribute, .hljs-selector-class { color: #d98b8b; }
.hljs-built_in, .hljs-symbol, .hljs-bullet { color: #83c5bd; }
.hljs-meta { color: #8a8275; }

/* tables */
.table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-block: 2rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
.table-scroll table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: .88rem; }
.table-scroll th, .table-scroll td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.table-scroll thead th { background: var(--paper-2); font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); white-space: nowrap; }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
.table-scroll tbody tr:hover { background: color-mix(in srgb, var(--paper-2) 60%, transparent); }

/* table status indicators — clean typography, no pill boxes */
.badge {
  display: inline;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  background: transparent;
  border: none;
  padding: 0;
  line-height: inherit;
}
.badge--yes {
  color: var(--ok);
}
.badge--no {
  color: var(--muted);
}
.badge--warn {
  color: var(--ink);
  font-weight: 600;
}

/* callouts */
.callout { display: grid; grid-template-columns: 1.4rem 1fr; gap: .8rem; margin-block: 1.7rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--paper-2); }
.callout__icon { color: var(--accent); }
.callout__label { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .2rem; }
.callout__body p { margin: 0; font-size: .92rem; }
.callout--warn { border-left-color: #b45309; }
.callout--warn .callout__icon, .callout--warn .callout__label { color: #b45309; }
.callout--danger { border-left-color: #b91c1c; }
.callout--danger .callout__icon, .callout--danger .callout__label { color: #b91c1c; }
.dark .callout--warn, .dark .callout--warn .callout__icon, .dark .callout--warn .callout__label { color: #fbbf24; border-left-color: #fbbf24; }
.dark .callout--danger, .dark .callout--danger .callout__icon, .dark .callout--danger .callout__label { color: #f87171; border-left-color: #f87171; }

/* article cta / author / pager / related */
.cta-band { margin-top: 3.5rem; padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--paper-2); border-radius: var(--radius); }
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: .4rem 0 .6rem; }
.cta-band p { max-width: 56ch; color: var(--muted); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.author-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager { display: grid; gap: 1rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.pager a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); }
.pager a:hover { border-color: var(--ink); }
.pager span { display: block; font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .4rem; }
.pager b { color: var(--ink); font-weight: 600; font-size: .95rem; }
.related { border-top: 1px solid var(--line); background: var(--paper-2); }

/* ---------- 404 ---------- */
.nf { min-height: 66vh; display: grid; place-content: center; text-align: center; padding-block: 5rem; }
.nf__title { font-size: clamp(2.5rem, 8vw, 5rem); margin-top: 1rem; }
.nf__text { max-width: 44ch; margin: 1rem auto 0; color: var(--muted); }
.nf__actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 2rem; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius);
  font-family: var(--mono); font-size: .72rem; }

/* ---------- back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.75rem;
  bottom: 1.75rem;
  z-index: 85;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, color .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 24px -4px var(--accent-glow);
  transform: translateY(-3px);
}
.back-to-top:active {
  transform: translateY(-1px);
}
.back-to-top svg {
  transition: transform .2s ease;
}
.back-to-top:hover svg {
  transform: translateY(-2px);
}
@media (max-width: 579px) {
  .back-to-top {
    right: 1rem;
    bottom: 1.25rem;
    width: 2.6rem;
    height: 2.6rem;
  }
}

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.16,1,.3,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
/* ---------- Mobile enhancements (< 768px) ---------- */
@media (max-width: 767px) {
  .feature__side {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 1.2rem;
  }
  .price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    padding: .65rem 0;
  }
  .price-row span {
    width: 100%;
    font-size: .88rem;
    color: var(--ink);
    font-weight: 500;
  }
  .price-row .cap-badge {
    align-self: flex-start;
  }
}

/* ---------- Mobile enhancements (< 580px) ---------- */
@media (max-width: 579px) {
  .work__top {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }
  .work__item {
    padding: 1.15rem;
  }
  .work__outcomes {
    padding: .75rem .9rem;
  }
  .xp__row {
    padding-block: 1.25rem;
    gap: .6rem;
  }
  .xp__top {
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
  }
  .svc__panel {
    padding: 1.25rem;
  }
  .svc__media {
    padding: 1rem 1.1rem;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.25rem;
  }
  .footer__col {
    min-width: 0;
  }
  .footer__col:first-child {
    grid-column: 1 / -1;
  }
  .footer__col ul {
    gap: .65rem;
  }
  .footer__col a {
    display: inline-block;
    padding-block: .15rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

/* ---------- Small Mobile enhancements (< 480px) ---------- */
@media (max-width: 480px) {
  .hero__inner {
    padding-block: 2rem;
  }
  .hero__actions .btn,
  .svc__actions .btn {
    width: 100%;
  }
  .hero__kicker {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
  }
  .facts {
    gap: .5rem;
  }
  .facts-table__row {
    flex-direction: column;
    gap: .2rem;
  }
  .facts-table__v {
    text-align: left;
  }
  .edu-card {
    flex-direction: column;
    gap: .85rem;
  }
  .cert {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }
  .cert .label {
    align-self: flex-end;
  }
  .article-head__by {
    flex-direction: column;
    align-items: flex-start;
    gap: .8rem;
  }
  .article-head__by .btn {
    width: 100%;
  }
  .post-row,
  .writing-item {
    margin-inline: 0;
    padding-inline: 0;
  }
  .contact .wrap[style*="justify-content:space-between"] > div:last-child {
    width: 100%;
  }
  .contact .wrap[style*="justify-content:space-between"] > div:last-child .btn {
    width: 100%;
  }
  .arch-widget__foot {
    flex-direction: column;
    gap: .35rem;
    align-items: flex-start;
  }
  .arch-widget__head {
    padding: .55rem .75rem;
  }
  .arch-widget__panel {
    padding: .75rem;
  }
  .price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    padding: .65rem 0;
  }
  .price-row span {
    width: 100%;
    font-size: .88rem;
    color: var(--ink);
    font-weight: 500;
  }
  .price-row .cap-badge {
    align-self: flex-start;
  }
}

@media (min-width: 580px) {
  .nav { display: flex; }
  .menu-btn { display: none !important; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .certs { grid-template-columns: 1fr 1fr; }
  .pager { grid-template-columns: 1fr 1fr; }
  .xp__row { grid-template-columns: 10.5rem 1fr; gap: 1.5rem; }
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 768px) {
  .brand__role { display: none; }
  .header-actions .btn { display: inline-flex; }
  .work__detail { grid-template-columns: repeat(3, 1fr); }
  .work__detail--2 { grid-template-columns: repeat(2, 1fr); }
  .work__outcomes { grid-template-columns: repeat(2, 1fr); gap: .75rem 1.5rem; }
  .svc__panel { grid-template-columns: 1.25fr 1fr; gap: 2.2rem; align-items: start; }
  .svc__body { gap: 1rem; }
  .contact__grid { grid-template-columns: 1fr 1.25fr; gap: 3rem; align-items: start; }
  .feature { grid-template-columns: 1.35fr 1fr; gap: 2.5rem; align-items: center; }
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
  .arch-widget { margin-top: 0; }
}

/* Capability Badges & Highlights */
.cap-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: .25rem .65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn--wa {
  background: #10b981;
  color: #fff;
  border-color: #059669;
}
.btn--wa:hover {
  background: #059669;
  color: #fff;
}
