/* ==========================================================================
   diwasstha.com.np — Diwas Shrestha
   .NET Developer & Dynamics 365 Business Central Technical Consultant
   ========================================================================== */

:root {
  --bg: #05070f;
  --bg-2: #090d1b;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecff;
  --muted: #9aa3bd;
  --dim: #626b85;
  --cyan: #22e4ff;
  --violet: #8b5cff;
  --pink: #ff4ecd;
  --green: #35f29a;
  --amber: #ffc857;
  --grad: linear-gradient(100deg, var(--cyan) 0%, #5aa8ff 45%, var(--violet) 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1200px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(34, 228, 255, .3); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 1000; background: var(--cyan); color: #000; padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 16px; }

.container { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.mono { font-family: var(--font-mono); }
code, pre, kbd, .mono { font-variant-ligatures: none; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Ambient background ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.bg-fx .grid {
  position: absolute; inset: -50% -50% 0 -50%;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 30%, transparent 75%);
}
.bg-fx .orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.bg-fx .orb-1 { width: 520px; height: 520px; background: var(--violet); top: -160px; right: -120px; animation: float 18s ease-in-out infinite; }
.bg-fx .orb-2 { width: 460px; height: 460px; background: #0aa5c2; bottom: -200px; left: -160px; opacity: .25; animation: float 22s ease-in-out infinite reverse; }
.bg-fx .noise { position: absolute; inset: 0; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes float { 0%,100% { transform: translate(0,0) } 50% { transform: translate(-40px, 50px) } }

.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); z-index: 200; box-shadow: 0 0 12px var(--cyan); }

/* ---------- Header ---------- */
.site-header { position: fixed; top: 14px; left: 0; right: 0; z-index: 100; }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 20px;
  background: rgba(8, 11, 24, .62);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: border-color .3s, background .3s;
}
.site-header.scrolled .nav { border-color: var(--border-strong); background: rgba(8, 11, 24, .82); }
.logo { font-family: var(--font-mono); font-weight: 700; font-size: 17px; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.logo .br { color: var(--cyan); }
.logo .sl { color: var(--violet); }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.kbd-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 13px; cursor: pointer; transition: border-color .2s, color .2s; }
.kbd-btn:hover { color: var(--text); border-color: var(--border-strong); }
kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border-strong); background: rgba(255,255,255,.05); color: var(--text); }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: transform .3s var(--ease), background .3s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--border-strong);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid var(--b); background: var(--surface); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, background .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: var(--cyan); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { border: 0; color: #031018; background: var(--grad); box-shadow: 0 10px 30px -10px rgba(34, 228, 255, .6), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(139, 92, 255, .7), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 130px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.hero-grid > *, .about-grid > *, .contact-grid > *, .work-grid > *, .stack-grid > *, .services-grid > *, .posts > *, .quotes > * { min-width: 0; }
.status-chip { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px; border: 1px solid rgba(53, 242, 154, .3); background: rgba(53, 242, 154, .07); font-family: var(--font-mono); font-size: 12.5px; color: #b9ffe0; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(53, 242, 154, .7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(53,242,154,.6) } 70% { box-shadow: 0 0 0 10px rgba(53,242,154,0) } 100% { box-shadow: 0 0 0 0 rgba(53,242,154,0) } }
.hero h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; margin: 26px 0 0; font-size: clamp(44px, 7vw, 86px); }
.hero h1 .name { display: block; }
.hero h1 .role { display: block; font-size: .44em; line-height: 1.2; letter-spacing: -.02em; margin-top: 18px; font-weight: 600; }
.typed-line { margin-top: 22px; font-family: var(--font-mono); font-size: 15px; color: var(--muted); min-height: 1.6em; }
.typed-line .prompt { color: var(--green); }
.typed-line .typed { color: var(--cyan); }
.caret { display: inline-block; width: 9px; height: 1.1em; vertical-align: -3px; background: var(--cyan); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0 } }
.hero .lead { font-size: clamp(16px, 1.6vw, 18.5px); color: var(--muted); max-width: 600px; margin: 22px 0 0; }
.hero .lead strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 38px; padding-top: 26px; border-top: 1px dashed var(--border); font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); }
.hero-meta b { color: var(--text); font-weight: 500; }

/* IDE window */
.ide {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 19, 38, .92), rgba(8, 11, 24, .92));
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(34, 228, 255, .05), 0 0 80px -20px rgba(139, 92, 255, .35);
  transform: perspective(1400px) rotateY(-7deg) rotateX(4deg);
  transition: transform .6s var(--ease);
}
.ide:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.ide::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 50%, rgba(255,255,255,.015) 50%); background-size: 100% 4px; z-index: 2; }
.ide-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.ide-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ide-tab { padding: 6px 12px; border-radius: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); background: transparent; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.ide-tab[aria-selected="true"] { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.ide-tab .ext-cs { color: #a179ff; } .ide-tab .ext-al { color: var(--cyan); }
.ide-body { position: relative; min-height: 340px; }
.ide pre { margin: 0; padding: 18px 18px 18px 0; font-family: var(--font-mono); font-size: 12.8px; line-height: 1.75; overflow-x: auto; counter-reset: ln; }
.ide pre[hidden] { display: none; }
.ide pre .l { display: block; padding-left: 52px; position: relative; white-space: pre; }
.ide pre .l::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 36px; text-align: right; color: #3a4260; }
.ide.animating pre:not([hidden]) .l { opacity: 0; animation: lineIn .4s var(--ease) forwards; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-8px); filter: blur(4px) } to { opacity: 1; transform: none; filter: none } }
.ide-status { display: flex; justify-content: space-between; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 11px; color: var(--dim); background: rgba(34, 228, 255, .04); }
.ide-status .ok { color: var(--green); }
/* syntax */
.k { color: #c792ea; } .t { color: #ffcb6b; } .s { color: #c3e88d; } .c { color: #546189; font-style: italic; } .n { color: #f78c6c; } .f { color: #82aaff; } .p { color: #89ddff; }

.hero-floaters { position: relative; }
.float-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(10, 14, 30, .85); border: 1px solid var(--border-strong); backdrop-filter: blur(10px); font-family: var(--font-mono); font-size: 12px; box-shadow: 0 20px 40px -20px #000; animation: bob 6s ease-in-out infinite; }
.float-card .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 11px; color: #041018; }
.fc-1 { top: -26px; right: -14px; } .fc-1 .ic { background: var(--grad); }
.fc-2 { bottom: -24px; left: -22px; animation-delay: -3s; } .fc-2 .ic { background: var(--green); }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }

.scroll-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: .2em; text-transform: uppercase; }
.scroll-hint .mouse { width: 22px; height: 34px; border: 1.5px solid var(--dim); border-radius: 12px; position: relative; }
.scroll-hint .mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0) } 30% { opacity: 1 } 100% { opacity: 0; transform: translateY(10px) } }

/* ---------- Marquee ---------- */
.marquee { position: relative; border-block: 1px solid var(--border); background: rgba(255,255,255,.015); overflow: hidden; padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after { content: "✦"; color: var(--violet); font-size: 12px; }
@keyframes marquee { to { transform: translateX(-50%) } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; color: var(--cyan); letter-spacing: .04em; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.section h2 { font-family: var(--font-display); font-size: clamp(32px, 4.6vw, 56px); line-height: 1.07; letter-spacing: -.03em; margin: 16px 0 0; font-weight: 700; }
.section-head p { color: var(--muted); font-size: 17.5px; margin: 18px 0 0; }

/* Glass card with cursor spotlight */
.card {
  position: relative; border-radius: var(--radius); padding: 28px;
  background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), border-color .35s;
}
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 228, 255, .12), transparent 45%); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .35s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 228, 255, .7), rgba(139, 92, 255, .4) 40%, transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.card:hover { transform: translateY(-4px); }
.card:hover::before, .card:hover::after { opacity: 1; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: center; }
.holo { position: relative; max-width: 440px; margin-inline: auto; }
.holo-frame { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid var(--border-strong); aspect-ratio: 3 / 4; background: var(--bg-2); }
.holo-frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.05); }
.holo-frame::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 55%, rgba(5, 7, 15, .9)), linear-gradient(120deg, rgba(34,228,255,.12), transparent 40%, rgba(139,92,255,.18)); }
.holo-frame::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; z-index: 2; background: linear-gradient(180deg, transparent, rgba(34, 228, 255, .14), transparent); animation: scan 5s linear infinite; }
@keyframes scan { from { top: -30% } to { top: 100% } }
.holo-ring { position: absolute; inset: -18px; border-radius: 40px; border: 1px dashed rgba(34, 228, 255, .25); pointer-events: none; }
.corner { position: absolute; width: 22px; height: 22px; border: 2px solid var(--cyan); z-index: 3; }
.corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.holo-id { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 3; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.holo-id strong { display: block; font-family: var(--font-display); font-size: 22px; color: var(--text); letter-spacing: -.01em; }
.holo-id .tag { color: var(--cyan); }
.about-copy p { color: var(--muted); font-size: 17px; margin: 0 0 18px; }
.about-copy p strong { color: var(--text); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 34px; }
.stat { padding: 18px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.stat .num { font-family: var(--font-display); font-size: clamp(24px, 2.3vw, 32px); white-space: nowrap; font-weight: 700; line-height: 1; }
.stat .lbl { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px; background: linear-gradient(135deg, rgba(34,228,255,.16), rgba(139,92,255,.16)); border: 1px solid rgba(34, 228, 255, .25); color: var(--cyan); }
.svc-icon svg { width: 26px; height: 26px; }
.card h3 { font-family: var(--font-display); font-size: 21px; letter-spacing: -.01em; margin: 0 0 10px; line-height: 1.25; }
.card p { color: var(--muted); margin: 0; font-size: 15.5px; }
.card .idx { position: absolute; top: 22px; right: 24px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding: 0; list-style: none; }
.chips li { font-family: var(--font-mono); font-size: 11.5px; padding: 4px 9px; border-radius: 6px; background: rgba(255,255,255,.04); border: 1px solid var(--border); color: #bfc7e0; }

/* ---------- Stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.stack-card h3 { display: flex; align-items: center; gap: 12px; }
.stack-card h3 .mono { font-size: 12px; color: var(--cyan); font-weight: 400; }
.tech-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.tech-list li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid var(--border); font-size: 14.5px; transition: border-color .25s, background .25s; }
.tech-list li:hover { border-color: rgba(34, 228, 255, .4); background: rgba(34, 228, 255, .05); }
.tech-list li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 10px rgba(34, 228, 255, .6); flex: none; }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.work-card { padding: 0; display: flex; flex-direction: column; }
.work-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.client-logo { width: 132px; height: 74px; border-radius: 12px; overflow: hidden; background: #fff; flex: none; box-shadow: 0 10px 30px -12px #000; }
.client-logo img { width: 100%; height: 100%; object-fit: contain; }
.case-id { text-align: right; font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); line-height: 1.6; }
.case-id .ok { color: var(--green); }
.work-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.work-body .client { font-family: var(--font-mono); font-size: 12.5px; color: var(--cyan); margin-bottom: 8px; }
.work-body h3 { font-size: 23px; }
.work-body p { margin-top: 4px; }
.migrate { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-family: var(--font-mono); font-size: 12.5px; }
.migrate .from, .migrate .to { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border-strong); }
.migrate .to { border-color: rgba(34, 228, 255, .5); color: var(--cyan); box-shadow: 0 0 18px -6px rgba(34, 228, 255, .7); }
.migrate .arrow { flex: 1; max-width: 90px; height: 1px; background: linear-gradient(90deg, var(--border-strong), var(--cyan)); position: relative; overflow: hidden; }
.migrate .arrow::after { content: ""; position: absolute; top: -1px; left: -30%; width: 30%; height: 3px; background: var(--cyan); filter: blur(1px); animation: dataflow 1.8s linear infinite; }
@keyframes dataflow { to { left: 100% } }
.work-body .chips { margin-top: auto; padding-top: 20px; }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; list-style: none; padding: 0; margin: 0; position: relative; }
.process::before { content: ""; position: absolute; top: 27px; left: 8%; right: 8%; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent); opacity: .5; }
.process li { position: relative; text-align: center; padding: 0 6px; }
.process .node { position: relative; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); border: 1px solid rgba(34, 228, 255, .4); font-family: var(--font-mono); font-size: 14px; color: var(--cyan); box-shadow: 0 0 0 6px var(--bg), 0 0 30px -6px rgba(34, 228, 255, .6); }
.process h3 { font-family: var(--font-display); font-size: 18px; margin: 0 0 6px; }
.process p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote { display: flex; flex-direction: column; margin: 0; }
.quote .qmark { font-family: var(--font-display); font-size: 64px; line-height: .6; height: 30px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quote blockquote { margin: 0 0 24px; color: #c9d0e8; font-size: 15.5px; }
.quote figcaption { margin-top: auto; display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.quote figcaption img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); }
.quote figcaption b { display: block; font-size: 15px; }
.quote figcaption span { font-size: 12.5px; color: var(--muted); }

/* ---------- Journal ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card { display: flex; flex-direction: column; }
.post-card .meta { display: flex; gap: 10px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; color: var(--dim); margin-bottom: 14px; }
.post-card .meta .cat { color: var(--cyan); }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card .more { margin-top: auto; padding-top: 20px; font-family: var(--font-mono); font-size: 13px; color: var(--cyan); display: inline-flex; align-items: center; gap: 8px; }
.post-card:hover .more .ar { transform: translateX(4px); }
.more .ar { transition: transform .25s var(--ease); }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border-radius: 14px; border: 1px solid var(--border); background: var(--surface); transition: border-color .25s, background .25s; }
.faq details[open] { border-color: rgba(34, 228, 255, .35); background: rgba(34, 228, 255, .03); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; position: relative; font-family: var(--font-display); font-weight: 600; font-size: 17.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 22px; color: var(--cyan); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 22px 20px; color: var(--muted); }
.faq details > div p { margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: start; }
.contact-list { display: grid; gap: 12px; margin-top: 32px; }
.contact-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); transition: border-color .25s, transform .25s var(--ease); }
a.contact-item:hover { border-color: rgba(34, 228, 255, .45); transform: translateX(4px); }
.contact-item .ci { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(34, 228, 255, .08); border: 1px solid rgba(34, 228, 255, .25); color: var(--cyan); flex: none; }
.contact-item .ci svg { width: 20px; height: 20px; }
.contact-item small { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.contact-item span { font-size: 15.5px; word-break: break-word; }
.terminal { padding: 0; }
.terminal .ide-bar { padding: 14px 18px; }
.terminal .ide-bar .title { font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); }
.form { padding: 26px; display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.field label .p { color: var(--green); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: rgba(3, 5, 12, .6); color: var(--text); font: inherit; font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #4f5875; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 228, 255, .12); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form-status { font-family: var(--font-mono); font-size: 13px; color: var(--muted); min-height: 1.4em; }
.form-status.ok { color: var(--green); } .form-status.err { color: #ff7a90; }
.hp { position: absolute; left: -9999px; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(40px, 6vw, 72px); text-align: center; border: 1px solid var(--border-strong); background: radial-gradient(600px 300px at 20% 0%, rgba(34,228,255,.18), transparent 60%), radial-gradient(600px 300px at 80% 100%, rgba(139,92,255,.25), transparent 60%), var(--bg-2); }
.cta-band h2 { margin: 0 auto; max-width: 820px; }
.cta-band p { color: var(--muted); max-width: 620px; margin: 18px auto 30px; font-size: 17.5px; }
.cta-band .hero-cta { justify-content: center; margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid p { color: var(--muted); font-size: 14.5px; max-width: 340px; }
.footer-grid h3 { font-family: var(--font-mono); font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 14px; font-weight: 500; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid ul a { color: var(--muted); font-size: 14.5px; transition: color .2s; }
.footer-grid ul a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: color .2s, border-color .2s, transform .2s; }
.socials a:hover { color: var(--cyan); border-color: rgba(34, 228, 255, .45); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

/* ---------- Command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 500; display: none; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; background: rgba(2, 3, 8, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.palette.open { display: flex; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0 } }
.palette-box { width: min(600px, 100%); border-radius: 18px; overflow: hidden; background: rgba(10, 14, 30, .96); border: 1px solid var(--border-strong); box-shadow: 0 40px 120px -20px #000, 0 0 60px -20px rgba(34, 228, 255, .4); animation: popIn .22s var(--ease); }
@keyframes popIn { from { transform: translateY(-10px) scale(.98); opacity: 0 } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.palette-input span { color: var(--cyan); font-family: var(--font-mono); }
.palette-input input { flex: 1; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.palette li button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 11px 14px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-size: 15px; color: var(--muted); }
.palette li button small { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.palette li button.sel { background: var(--surface-2); color: var(--text); }
.palette li button.sel small { color: var(--cyan); }
.palette-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 11px; color: var(--dim); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 600; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 999px; background: rgba(10, 14, 30, .95); border: 1px solid rgba(53, 242, 154, .4); color: #b9ffe0; font-family: var(--font-mono); font-size: 13px; transition: opacity .25s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Article / blog pages ---------- */
.page-hero { padding: 150px 0 50px; }
.breadcrumbs { font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); margin-bottom: 22px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: #3a4260; }
.breadcrumbs a:hover { color: var(--cyan); }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(34px, 5.2vw, 62px); line-height: 1.06; letter-spacing: -.03em; margin: 0; max-width: 960px; }
.page-hero .lead { color: var(--muted); font-size: 18.5px; max-width: 760px; margin: 22px 0 0; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 28px; font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); }
.article-meta .author { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.article-meta .author img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; padding-bottom: 60px; }
.toc { position: sticky; top: 110px; padding: 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.toc h2 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin: 0 0 12px; font-weight: 500; }
.toc ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.toc a:hover { color: var(--cyan); }
.prose { min-width: 0; font-size: 17.5px; line-height: 1.8; color: #c9d0e8; max-width: 760px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 32px); line-height: 1.2; letter-spacing: -.02em; color: var(--text); margin-top: 2.2em; }
.prose h3 { font-family: var(--font-display); font-size: 21px; color: var(--text); margin-top: 1.8em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose a { color: var(--cyan); text-decoration: underline; text-decoration-color: rgba(34, 228, 255, .35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--cyan); }
.prose strong { color: var(--text); }
.prose li + li { margin-top: .4em; }
.prose code { font-family: var(--font-mono); font-size: .86em; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: #e6e9ff; overflow-wrap: anywhere; }
.prose pre { position: relative; margin: 1.6em 0; padding: 18px 20px; border-radius: 14px; background: #070a16; border: 1px solid var(--border-strong); overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; color: #d6dcf5; overflow-wrap: normal; }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 12px; font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.copy-btn { position: absolute; top: 8px; right: 60px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--border); background: rgba(255,255,255,.04); font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .2s; }
.prose pre:hover .copy-btn, .copy-btn:focus { opacity: 1; }
.callout { padding: 18px 20px; border-radius: 14px; border: 1px solid rgba(34, 228, 255, .3); background: rgba(34, 228, 255, .05); }
.callout strong { color: var(--cyan); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.prose th { color: var(--text); font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.author-box { display: flex; gap: 20px; align-items: center; margin-top: 56px; padding: 24px; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--surface); }
.author-box img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: none; }
.author-box p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.author-box b { font-family: var(--font-display); font-size: 18px; }

.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 120px 0 60px; }
.error-page .code { font-family: var(--font-display); font-size: clamp(110px, 22vw, 220px); font-weight: 700; line-height: .9; letter-spacing: -.05em; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 64px; }
  .ide { transform: none; max-width: 680px; }
  .services-grid, .quotes, .posts { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .process::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .nav-links { position: fixed; top: 84px; left: 16px; right: 16px; flex-direction: column; gap: 2px; padding: 12px; border-radius: 20px; background: rgba(8, 11, 24, .97); border: 1px solid var(--border-strong); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
  .nav-links a { padding: 14px 16px; font-size: 16px; }
  .menu-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .menu-btn { display: inline-flex; }
  .kbd-btn .lbl { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stack-grid, .work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-actions .btn { display: none; }
  .services-grid, .quotes, .posts { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .tech-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .float-card { display: none; }
  .ide pre { font-size: 11.5px; }
  .ide-body { min-height: 0; }
  .card { padding: 22px; }
  .work-top { padding: 18px 20px; }
  .work-body { padding: 20px 20px 24px; }
  .client-logo { width: 110px; height: 62px; }
  .scroll-hint { display: none; }
  .hero { padding-top: 120px; }
  .prose { font-size: 16.5px; }
  .prose pre { font-size: 12.5px; margin-inline: -4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .bg-fx canvas { display: none; }
}

/* Hero entrance: transform only, so above-the-fold text is painted immediately (good for LCP) */
.rise { animation: rise .9s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { transform: translateY(18px) } to { transform: none } }
