/* ============================================================
   alireza.engineer — design system
   Deep navy / electric blue / Inter. Dark-mode first.
   ============================================================ */

:root {
  /* ---- core palette ---- */
  --bg:            #07111F;
  --bg-2:          #0A1726;
  --bg-3:          #0E1E31;
  --accent:        #2563EB;
  --accent-soft:   #3B82F6;
  --accent-glow:   rgba(37, 99, 235, 0.55);

  /* ---- text ---- */
  --ink:           #EAF1FB;
  --ink-2:         #A7B6CC;
  --ink-3:         #6B7C96;
  --ink-faint:     #44566F;

  /* ---- lines / glass ---- */
  --line:          rgba(148, 175, 214, 0.10);
  --line-strong:   rgba(148, 175, 214, 0.18);
  --glass-bg:      rgba(14, 30, 49, 0.55);
  --glass-blur:    18px;

  /* ---- motion ---- */
  --motion:        0.5;

  /* ---- type ---- */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", monospace;

  /* ---- rhythm ---- */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 72px);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   Layout
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

section { position: relative; }

.section-pad { padding: clamp(96px, 13vh, 180px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.section-title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.section-lead {
  margin-top: 22px;
  max-width: 56ch;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: var(--ink-2);
}

/* ============================================================
   Background field (fixed gradient + canvas)
   ============================================================ */
.bg-field {
  position: fixed; inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 78% -8%, rgba(37,99,235,0.18), transparent 55%),
    radial-gradient(90% 70% at 8% 8%, rgba(37,99,235,0.10), transparent 50%),
    radial-gradient(140% 120% at 50% 120%, rgba(8,20,38,0.9), transparent 60%),
    var(--bg);
}
.bg-grid {
  position: fixed; inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.5;
}
#particles {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ============================================================
   Floating nav
   ============================================================ */
.nav {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 1080px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 12px 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 18, 32, 0.62);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
          backdrop-filter: blur(16px) saturate(140%);
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease, transform .5s cubic-bezier(.16,1,.3,1);
}
.nav.scrolled {
  background: rgba(8, 18, 32, 0.82);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  border-color: var(--line-strong);
}
.nav.hidden { transform: translateX(-50%) translateY(-140%); }

.brand {
  display: flex; align-items: center; gap: 11px;
  font-weight: 600; letter-spacing: -0.02em;
  font-size: 0.97rem;
  margin-right: auto;
  white-space: nowrap;
}
.brand .mark {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #1E40AF);
  box-shadow: 0 0 18px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.25);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  position: relative; overflow: hidden;
}
.brand .mark::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 5s ease-in-out infinite;
}
@keyframes sheen { 0%,60%{transform:translateX(-120%)} 80%,100%{transform:translateX(120%)} }
.brand small { color: var(--ink-3); font-weight: 500; font-size: 0.78rem; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--ink-2);
  border-radius: 999px;
  transition: color .25s ease, background .25s ease;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content:""; position:absolute; left:14px; right:14px; bottom:3px; height:2px;
  background: var(--accent); border-radius:2px; box-shadow: 0 0 10px var(--accent-glow);
}

.nav-cta {
  padding: 9px 18px;
  font-size: 0.86rem; font-weight: 500;
  color: #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 8px 22px -8px var(--accent-glow);
  transition: transform .2s ease, box-shadow .3s ease, background .3s ease;
  white-space: nowrap;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset, 0 14px 30px -8px var(--accent-glow); }

.nav-burger { display: none; }
.nav-social {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.03);
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .2s ease;
  flex-shrink: 0;
}
.nav-social:hover { color: var(--ink); border-color: var(--accent); background: rgba(37,99,235,0.1); transform: translateY(-1px); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 0.95rem; font-weight: 500;
  cursor: pointer; border: none;
  transition: transform .2s ease, box-shadow .3s ease, background .3s ease, border-color .3s ease;
}
.btn .arr { transition: transform .25s ease; }
.btn:hover .arr { transform: translateX(4px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 14px 34px -12px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 22px 46px -14px var(--accent-glow); }

.btn-ghost {
  color: var(--ink);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(148,175,214,0.34); background: rgba(255,255,255,0.06); }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: 128px; padding-bottom: clamp(70px, 11vh, 130px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: pulse 2.4s infinite; display: inline-block; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,0.5)} 70%{box-shadow:0 0 0 9px rgba(52,211,153,0)} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0)} }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero h1 .grad {
  background: linear-gradient(110deg, var(--ink) 10%, var(--accent-soft) 55%, var(--ink) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textshine calc(8s / max(var(--motion), 0.15)) linear infinite;
}
@keyframes textshine { to { background-position: 220% center; } }

.rotator {
  margin-top: 26px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.rotator .label { color: var(--ink-3); font-size: 0.95rem; font-weight: 400; }
.rotator-track { position: relative; height: 1.5em; overflow: hidden; }
.rotator-track span {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  background: linear-gradient(100deg, var(--accent-soft), #93C5FD);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0; transform: translateY(110%);
}
.rotator-track span.in  { animation: rotIn .6s cubic-bezier(.16,1,.3,1) forwards; }
.rotator-track span.out { animation: rotOut .6s cubic-bezier(.7,0,.84,0) forwards; }
@keyframes rotIn  { from{opacity:0;transform:translateY(110%)} to{opacity:1;transform:translateY(0)} }
@keyframes rotOut { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(-110%)} }

.hero-lead {
  margin-top: 30px; max-width: 48ch;
  font-size: 1.08rem; color: var(--ink-2);
}

.hero-cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }

.badges {
  margin-top: 46px;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
  font-size: 0.82rem; color: var(--ink-2);
  transition: border-color .3s ease, background .3s ease, color .3s ease, transform .3s ease;
}
.badge:hover { color: var(--ink); border-color: var(--accent); background: rgba(37,99,235,0.08); transform: translateY(-2px); }
.badge i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
  display: inline-block;
}

/* portrait */
.portrait-wrap { position: relative; justify-self: center; }
.portrait-ring {
  position: relative;
  width: clamp(280px, 32vw, 420px);
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  padding: 1px;
  background: linear-gradient(160deg, rgba(148,175,214,0.4), transparent 40%, rgba(37,99,235,0.5));
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.8);
}
.portrait-ring::before {
  content:""; position:absolute; inset:-30%;
  background: conic-gradient(from 0deg, transparent, var(--accent-glow), transparent 40%);
  animation: spin calc(14s / max(var(--motion),0.15)) linear infinite;
  z-index:-1; filter: blur(30px); opacity: calc(var(--motion) * 0.9);
}
@keyframes spin { to { transform: rotate(360deg); } }
.portrait-ring img.portrait,
.portrait-placeholder {
  display: block; width: 100%; height: 100%;
  border-radius: calc(var(--r-xl) - 1px);
  overflow: hidden;
  object-fit: cover;
}
.portrait-placeholder {
  background: linear-gradient(160deg, rgba(20,40,65,0.9) 0%, rgba(14,30,50,0.95) 60%, rgba(10,20,38,1) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--ink-3);
}
.portrait-placeholder svg { opacity: 0.3; }
.portrait-placeholder span { font-size: 0.78rem; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }

.portrait-float {
  position: absolute;
  padding: 11px 15px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.7);
  display: flex; align-items: center; gap: 11px;
  animation: floaty calc(6s / max(var(--motion),0.2)) ease-in-out infinite;
}
.portrait-float .big { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.portrait-float .lbl { font-size: 0.7rem; color: var(--ink-3); line-height: 1.2; }
.pf-1 { top: 8%; left: -14%; }
.pf-2 { bottom: 10%; right: -12%; animation-delay: -2s; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* ============================================================
   Stat strip
   ============================================================ */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line);
}
.stat-strip .cell {
  background: linear-gradient(180deg, rgba(14,30,49,0.7), rgba(8,18,32,0.7));
  padding: 30px 26px;
}
.stat-strip .num { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.stat-strip .num b { color: var(--accent-soft); font-weight: 700; }
.stat-strip .lbl { margin-top: 6px; font-size: 0.84rem; color: var(--ink-3); }

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  * { animation-duration: .001ms !important; }
}

/* ============================================================
   About
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.about-copy p { color: var(--ink-2); font-size: 1.1rem; margin-top: 22px; }
.about-copy p strong { color: var(--ink); font-weight: 600; }
.about-pillars { display: grid; gap: 14px; }
.pillar {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(14,30,49,0.5), rgba(10,23,38,0.3));
  transition: border-color .35s ease, transform .35s ease, background .35s ease;
}
.pillar:hover { border-color: var(--line-strong); transform: translateX(4px); background: linear-gradient(180deg, rgba(18,38,62,0.6), rgba(10,23,38,0.4)); }
.pillar .ix { font-family: var(--mono); font-size: 0.78rem; color: var(--accent-soft); padding-top: 3px; }
.pillar h4 { font-size: 1.06rem; }
.pillar p { margin-top: 7px; color: var(--ink-3); font-size: 0.95rem; }

/* ============================================================
   Expertise — architecture map
   ============================================================ */
.exp-map { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.layer-label {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 16px;
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 22px;
}
.layer-label:first-child { margin-top: 0; }
.layer-label .lx { color: var(--accent-soft); }
.layer-label .ln { color: var(--ink-2); font-weight: 500; }
.layer-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.node {
  position: relative;
  grid-column: span 3;
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(14,30,49,0.55), rgba(9,21,35,0.4));
  cursor: default;
  overflow: hidden;
  transition: border-color .4s ease, transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease;
}
.node::before {
  content:""; position:absolute; inset:0;
  background: radial-gradient(130% 120% at var(--mx,50%) var(--my,0%), rgba(37,99,235,0.16), transparent 55%);
  opacity: 0; transition: opacity .4s ease;
}
.node:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 24px 50px -28px var(--accent-glow); }
.node:hover::before { opacity: 1; }
.node .n-ix { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-faint); letter-spacing: 0.16em; }
.node h4 { margin-top: 14px; font-size: 1.04rem; position: relative; }
.node .n-desc {
  position: relative;
  margin-top: 0; max-height: 0; opacity: 0;
  color: var(--ink-3); font-size: 0.9rem; line-height: 1.5;
  transition: max-height .5s cubic-bezier(.16,1,.3,1), opacity .4s ease, margin-top .4s ease;
}
.node:hover .n-desc { max-height: 120px; opacity: 1; margin-top: 12px; }
.node .n-dot { position:absolute; top:20px; right:20px; width:7px; height:7px; border-radius:50%; background: var(--ink-faint); transition: background .4s ease, box-shadow .4s ease; }
.node:hover .n-dot { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.node.wide { grid-column: span 4; }
.node.big { grid-column: span 6; }

/* ============================================================
   Writing & research
   ============================================================ */
.writing-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 52px; }
.pub-stats { display: flex; gap: 34px; }
.pub-stats .ps .n { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; }
.pub-stats .ps .n b { color: var(--accent-soft); }
.pub-stats .ps .l { font-size: 0.78rem; color: var(--ink-3); }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.article {
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px;
  min-height: 290px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(14,30,49,0.6), rgba(9,21,35,0.45));
  overflow: hidden;
  transition: border-color .4s ease, transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease;
}
.article::after {
  content:""; position:absolute; left:0; right:0; top:0; height:2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .5s ease;
}
.article:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7); }
.article:hover::after { transform: scaleX(1); }
.article .src { display: inline-flex; align-items:center; gap:8px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-soft); }
.article h3 { margin-top: 18px; font-size: 1.22rem; letter-spacing: -0.02em; line-height: 1.22; }
.article p { margin-top: 12px; color: var(--ink-3); font-size: 0.92rem; }
.article .foot { margin-top: auto; padding-top: 20px; display:flex; align-items:center; justify-content: space-between; color: var(--ink-faint); font-size: 0.8rem; }
.article .read { color: var(--ink-2); display:inline-flex; gap:7px; align-items:center; transition: gap .25s ease, color .25s; }
.article:hover .read { color: var(--accent-soft); gap: 11px; }

/* ============================================================
   Social proof
   ============================================================ */
.proof-grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 16px; }
.proof {
  grid-column: span 4;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(14,30,49,0.55), rgba(9,21,35,0.4));
  transition: border-color .4s ease, transform .4s ease, background .4s ease;
}
.proof:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.proof.tall { grid-row: span 2; }
.proof .pq { font-size: 1.12rem; line-height: 1.5; color: var(--ink); letter-spacing: -0.01em; }
.proof .pq b { color: var(--accent-soft); font-weight: 600; }
.proof .meta { margin-top: 22px; display:flex; align-items:center; gap: 12px; }
.proof .av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--bg-3), var(--accent)); border:1px solid var(--line-strong); }
.proof .who { font-size: 0.86rem; font-weight: 600; }
.proof .role { font-size: 0.76rem; color: var(--ink-3); }
.proof.metric { display:flex; flex-direction:column; justify-content:center; }
.proof.metric .big { font-size: clamp(2.4rem,5vw,3.4rem); font-weight: 700; letter-spacing:-0.04em; }
.proof.metric .big b { color: var(--accent-soft); }
.proof.metric .lbl { color: var(--ink-3); font-size: 0.9rem; margin-top:4px; }
.proof-verify {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px;
  font-size: 0.82rem; color: var(--accent-soft);
  transition: gap .25s ease, color .25s ease;
}
.proof-verify:hover { gap: 10px; color: var(--ink); }
.proof .av.av-sf { background: #fff; display: grid; place-items: center; border-color: rgba(255,255,255,0.4); }
.proof .av.av-icon {
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(14,30,49,0.6));
  border-color: var(--line-strong);
  color: var(--accent-soft);
}
.proof .av.av-icon svg { width: 20px; height: 20px; }

/* ============================================================
   Projects / case studies
   ============================================================ */
.case-list { display: grid; gap: 18px; }
.case {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 28px; align-items: center;
  padding: 34px 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(120deg, rgba(14,30,49,0.6), rgba(9,21,35,0.4));
  cursor: pointer;
  overflow: hidden;
  transition: border-color .45s ease, transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s ease;
}
.case::before {
  content:""; position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 40%, rgba(37,99,235,0.10));
  opacity:0; transition: opacity .45s ease;
}
.case:hover { border-color: var(--accent); transform: translateX(6px); box-shadow: 0 30px 70px -36px var(--accent-glow); }
.case:hover::before { opacity:1; }
.case .c-ix { font-family: var(--mono); font-size: 0.95rem; color: var(--accent-soft); }
.case .c-body { position: relative; }
.case h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); letter-spacing: -0.03em; }
.case .c-sub { margin-top: 10px; color: var(--ink-2); max-width: 60ch; font-size: 1rem; }
.case .c-tags { margin-top: 18px; display:flex; flex-wrap:wrap; gap: 8px; }
.case .c-tag { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; }
.case .c-open {
  position: relative;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--ink-2);
  transition: background .35s ease, color .35s ease, transform .35s ease, border-color .35s;
  flex-shrink: 0;
}
.case:hover .c-open { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(45deg); }

/* case modal */
.modal-back {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 10, 20, 0.7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
  display: grid; place-items: center;
  padding: 24px;
}
.modal-back.open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(880px, 100%);
  max-height: 88vh; overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, #0C1A2C, #081320);
  box-shadow: 0 50px 120px -30px rgba(0,0,0,0.8);
  transform: translateY(24px) scale(0.98);
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.modal-back.open .modal { transform: none; }
.modal-hero { position: relative; padding: 40px 44px 30px; border-bottom: 1px solid var(--line); overflow:hidden; }
.modal-hero::before { content:""; position:absolute; inset:0; background: radial-gradient(100% 120% at 100% 0%, rgba(37,99,235,0.22), transparent 60%); }
.modal-hero .mono { position: relative; }
.modal-hero h2 { position: relative; margin-top: 14px; font-size: clamp(1.7rem,4vw,2.4rem); letter-spacing: -0.035em; }
.modal-hero p { position: relative; margin-top: 16px; color: var(--ink-2); max-width: 60ch; }
.modal-close { position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.04); color: var(--ink-2); cursor: pointer; font-size: 18px; display:grid; place-items:center; transition: background .25s, color .25s, transform .25s; z-index: 2; }
.modal-close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }
.modal-body { padding: 34px 44px 44px; }
.modal-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 34px; }
.modal-metrics .m { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255,255,255,0.02); }
.modal-metrics .m .n { font-size: 1.7rem; font-weight: 700; letter-spacing:-0.03em; color: var(--ink); }
.modal-metrics .m .n b { color: var(--accent-soft); }
.modal-metrics .m .l { font-size: 0.78rem; color: var(--ink-3); margin-top: 4px; }
.modal-body h4 { font-size: 0.78rem; font-family: var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-soft); margin: 28px 0 12px; }
.modal-body p { color: var(--ink-2); margin-bottom: 14px; }
.modal-body ul { color: var(--ink-2); padding-left: 20px; margin: 0; }
.modal-body li { margin-bottom: 9px; }
.modal-body li::marker { color: var(--accent); }

/* ============================================================
   Contact
   ============================================================ */
.contact { position: relative; text-align: center; }
.contact-card {
  position: relative;
  padding: clamp(50px, 8vw, 96px) clamp(28px, 6vw, 80px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(14,30,49,0.7), rgba(9,21,35,0.5));
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  overflow: hidden;
}
.contact-card::before { content:""; position:absolute; inset:0; background: radial-gradient(80% 120% at 50% -10%, rgba(37,99,235,0.22), transparent 55%); }
.contact-card > * { position: relative; }
.contact h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.04em; }
.contact p { margin: 22px auto 0; max-width: 50ch; color: var(--ink-2); font-size: 1.1rem; }
.contact-cta { margin-top: 40px; display:flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.social-row { margin-top: 44px; display:flex; gap: 12px; justify-content:center; flex-wrap: wrap; }
.social-row a {
  display:inline-flex; align-items:center; gap:9px;
  padding: 11px 18px; border-radius: 999px;
  border:1px solid var(--line-strong); background: rgba(255,255,255,0.03);
  color: var(--ink-2); font-size: 0.88rem;
  transition: border-color .3s, color .3s, background .3s, transform .3s;
}
.social-row a:hover { color: var(--ink); border-color: var(--accent); background: rgba(37,99,235,0.08); transform: translateY(-2px); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer .wrap { display:flex; justify-content: space-between; align-items:center; gap: 20px; flex-wrap: wrap; color: var(--ink-3); font-size: 0.86rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
  .node { grid-column: span 6 !important; }
  .article-grid { grid-template-columns: 1fr 1fr; }
  .proof { grid-column: span 6; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .portrait-wrap { order: -1; }
  .portrait-ring { width: clamp(240px, 56vw, 320px); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; place-items:center; width: 40px; height: 40px; border-radius: 999px; border:1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
  .nav { padding: 9px 9px 9px 18px; }
  .node { grid-column: span 12 !important; }
  .article-grid { grid-template-columns: 1fr; }
  .proof { grid-column: span 12 !important; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .case { grid-template-columns: 1fr; gap: 18px; padding: 28px 24px; }
  .case .c-open { display: none; }
  .pf-1 { left: -4%; } .pf-2 { right: -2%; }
  .portrait-float .lbl { display:none; }
}
