/* =========================================================
   Hamza Khan Portfolio - Architectural White + Blue
   Pipeline / NY-building / LangChain-adjacent language
   ========================================================= */

:root {
  --bg: #f7f9fc;
  --bg-elevated: #ffffff;
  --ink: #0a1628;
  --ink-muted: #4a5d78;
  --blue: #1565ff;
  --blue-deep: #0b3db8;
  --blue-soft: #e8f0ff;
  --blue-mid: #9bb8ff;
  --line: #c8d6ef;
  --line-strong: #1565ff;
  --shadow: 0 1px 0 rgba(11, 61, 184, 0.06), 0 12px 40px rgba(11, 61, 184, 0.06);
  --radius: 2px;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --max: 1320px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--blue-deep);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--blue);
}

img {
  max-width: 100%;
  display: block;
}

/* ---- Atmosphere ---- */
.blueprint-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(21, 101, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 101, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%);
  pointer-events: none;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(21, 101, 255, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 200%;
  animation: scan 12s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  from { background-position: 0 0; }
  to { background-position: 0 200%; }
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 1.5rem;
  background: rgba(247, 249, 252, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-weight: 600;
  position: relative;
  z-index: 102;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue-deep);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.nav a:hover {
  color: var(--blue);
}

.nav-cta {
  padding: 0.4rem 0.85rem;
  color: #fff !important;
  background: var(--blue);
  border: 1px solid var(--blue-deep);
}

.nav-cta:hover {
  background: var(--blue-deep);
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 102;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-right: -0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

/* ---- Boxed headings + click signs ---- */
.boxed-heading {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  border: 1.5px solid var(--ink);
  background: var(--bg-elevated);
  box-shadow: 4px 4px 0 var(--blue);
}

.boxed-heading-wrap {
  margin-bottom: 1.75rem;
}

.boxed-heading .box-sign,
.exp-header .box-sign {
  flex-shrink: 0;
}

.box-sign {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 100%;
  min-height: 2.75rem;
  border: none;
  border-right: 1.5px solid var(--ink);
  background: var(--blue-soft);
  color: var(--blue-deep);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  align-self: stretch;
}

.box-sign:hover {
  background: var(--blue);
  color: #fff;
}

.box-sign.small {
  width: 2rem;
  min-height: 2rem;
  border: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--blue);
}

.boxed-heading {
  padding-right: 1.25rem;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

.hero-brand .boxed-heading {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  padding-right: 1.5rem;
}

.hero-brand .box-sign {
  width: clamp(2.75rem, 6vw, 4rem);
  min-height: clamp(3.5rem, 8vw, 5.5rem);
  font-size: 1.75rem;
}

.sign-icon {
  display: block;
  line-height: 1;
  transition: transform 0.25s ease;
}

.box-sign[aria-expanded="true"] .sign-icon,
.box-sign.is-open .sign-icon {
  /* icon text swapped in JS */
}

/* ---- Collapsible ---- */
.collapsible {
  display: grid;
  grid-template-rows: 0fr;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.collapsible > * {
  min-height: 0;
  overflow: hidden;
}

.collapsible.open {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, color 0.2s;
}

.btn-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue-deep);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-primary:hover {
  color: #fff;
  background: var(--blue-deep);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-ghost {
  color: var(--ink);
  background: var(--bg-elevated);
  box-shadow: 3px 3px 0 var(--blue-mid);
}

.btn-ghost:hover {
  color: var(--blue-deep);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--blue);
}

.btn-arrow {
  font-family: var(--font-mono);
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 3rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-portrait {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(50vw, 620px);
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  mask-image:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(0, 0, 0, 0.25) 15%,
      rgba(0, 0, 0, 0.7) 38%,
      black 62%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      black 18%,
      black 100%
    );
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(0, 0, 0, 0.25) 15%,
      rgba(0, 0, 0, 0.7) 38%,
      black 62%
    ),
    linear-gradient(
      180deg,
      transparent 0%,
      black 18%,
      black 100%
    );
  -webkit-mask-composite: source-in;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.05) contrast(1.02);
  animation: portraitIn 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes portraitIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-skyline {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 42%;
  padding-right: 4%;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.tower {
  background:
    repeating-linear-gradient(
      180deg,
      var(--blue-soft) 0 10px,
      transparent 10px 14px
    ),
    linear-gradient(180deg, var(--blue-mid) 0%, var(--blue) 100%);
  border: 1px solid var(--blue);
  position: relative;
  animation: rise 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tower::before {
  content: "";
  position: absolute;
  inset: 8px 6px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 12px,
      rgba(255, 255, 255, 0.45) 12px 13px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 10px,
      rgba(255, 255, 255, 0.35) 10px 11px
    );
}

.t1 { width: 28px; height: 45%; animation-delay: 0.1s; }
.t2 { width: 42px; height: 72%; animation-delay: 0.2s; }
.t3 { width: 34px; height: 55%; animation-delay: 0.15s; }
.t4 { width: 56px; height: 90%; animation-delay: 0.25s; }
.t5 { width: 38px; height: 62%; animation-delay: 0.18s; }
.t6 { width: 48px; height: 78%; animation-delay: 0.3s; }
.t7 { width: 30px; height: 48%; animation-delay: 0.22s; }

@keyframes rise {
  from { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
  to { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
}

.hero-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(var(--max), 560px);
  margin: 0 auto 0 max(1.5rem, calc((100vw - var(--max)) / 2));
}

@media (max-width: 1099px) {
  .hero-frame {
    margin-left: 0;
    margin-right: auto;
    max-width: min(100%, 36rem);
  }
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.pipe-node {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid var(--blue);
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 600;
}

.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 101, 255, 0.25);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(21, 101, 255, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(21, 101, 255, 0.08); }
}

.hero-role {
  margin-top: 1.5rem;
  max-width: 40rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--ink-muted);
  font-weight: 500;
}

.hero-detail {
  margin-top: 1.25rem;
  max-width: 38rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--blue);
  background: linear-gradient(90deg, var(--blue-soft), transparent);
  color: var(--ink-muted);
  font-size: 0.975rem;
  display: none;
}

.hero-detail.is-visible {
  display: block;
  animation: fadeUp 0.35s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.hero-contact-strip .sep {
  opacity: 0.4;
}

/* ---- Pipeline ribbon ---- */
.pipeline-ribbon {
  border-block: 1.5px solid var(--line);
  background: var(--bg-elevated);
  overflow: hidden;
}

.pipe-track {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.85rem 0;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.pipe-seg {
  width: 48px;
  height: 2px;
  background: var(--blue);
  position: relative;
}

.pipe-seg::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--blue);
  background: #fff;
  transform: translateY(-50%) rotate(45deg);
}

.pipe-box {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--ink);
  background: var(--blue-soft);
  color: var(--blue-deep);
  white-space: nowrap;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Duplicate content for seamless marquee. JS clones; CSS assumes long track */

/* ---- Sections ---- */
.section {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0;
  max-width: calc(var(--max) + 64px);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.section-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.35rem;
}

.rail-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--blue);
  writing-mode: horizontal-tb;
}

.rail-line {
  flex: 1;
  width: 1.5px;
  min-height: 40px;
  background: linear-gradient(180deg, var(--blue), transparent);
}

.section-body {
  min-width: 0;
}

/* ---- About ---- */
.about-grid {
  display: grid;
  gap: 1.5rem;
}

.about-lead {
  font-size: 1.15rem;
  font-weight: 500;
  max-width: 48rem;
  color: var(--ink);
}

.about-body {
  max-width: 44rem;
  color: var(--ink-muted);
}

.stat-windows {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1.5px solid var(--ink);
  background: var(--bg-elevated);
  box-shadow: 6px 6px 0 var(--blue);
  margin-top: 0.5rem;
}

.window-pane {
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background:
    linear-gradient(180deg, rgba(232, 240, 255, 0.6) 0%, transparent 40%);
  transition: background 0.25s;
}

.window-pane:last-child {
  border-right: none;
}

.window-pane:hover {
  background: var(--blue-soft);
}

.pane-val {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--blue-deep);
  letter-spacing: -0.03em;
}

.pane-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Experience pipeline ---- */
.exp-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.exp-node {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 1rem;
}

.exp-node.is-hidden {
  display: none !important;
}

.exp-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.4rem;
}

.conn-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px var(--blue-soft);
  flex-shrink: 0;
  z-index: 1;
}

.conn-line {
  flex: 1;
  width: 2px;
  background: repeating-linear-gradient(
    180deg,
    var(--blue) 0 4px,
    transparent 4px 8px
  );
  min-height: 24px;
}

.exp-node.last .conn-line {
  display: none;
}

.exp-panel {
  margin-bottom: 1.25rem;
  border: 1.5px solid var(--line);
  background: var(--bg-elevated);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.exp-panel:focus-within,
.exp-panel:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.exp-header {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.logo-slot {
  width: 72px;
  height: 72px;
  border: 1.5px dashed var(--blue-mid);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 6px,
      rgba(21, 101, 255, 0.06) 6px 7px
    ),
    var(--blue-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.logo-placeholder {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.05em;
}

.logo-slot::after {
  content: "logo";
  position: absolute;
  bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--blue-mid);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.logo-slot:has(img)::after {
  display: none;
}

.exp-titles h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.exp-company {
  font-weight: 600;
  color: var(--blue-deep);
  font-size: 0.9rem;
}

.exp-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

.platform-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(90deg, var(--blue-soft), transparent 70%);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

.plat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--line);
  background: #fff;
}

.platform-bar > a {
  font-weight: 600;
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.stack-chips span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-muted);
}

.bullet-pipeline {
  list-style: none;
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bullet-pipeline li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--ink-muted);
  font-size: 0.925rem;
}

.bullet-pipeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--blue);
  background: var(--blue-soft);
}

.bullet-pipeline strong {
  color: var(--blue-deep);
}

.bullet-pipeline a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--blue-mid);
  text-underline-offset: 2px;
}

.bullet-pipeline a:hover {
  text-decoration-color: var(--blue);
}

.mini-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0 1.25rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.mini-pipeline > span:not(.arrow) {
  padding: 0.3rem 0.55rem;
  border: 1.5px solid var(--ink);
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 600;
}

.mini-pipeline .arrow {
  color: var(--blue);
}

/* ---- Projects ---- */
.project-window {
  border: 1.5px solid var(--ink);
  background: var(--bg-elevated);
  box-shadow: 6px 6px 0 var(--blue);
  max-width: 36rem;
  overflow: hidden;
}

.window-chrome {
  display: flex;
  gap: 6px;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: var(--blue-soft);
}

.window-chrome span {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--blue);
  background: #fff;
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.stack-line {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.project-content p {
  color: var(--ink-muted);
  font-size: 0.925rem;
  margin-bottom: 1rem;
}

.coming-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border: 1.5px dashed var(--blue);
  color: var(--blue-deep);
  background: var(--blue-soft);
}

/* ---- Talks grid ---- */
.tri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1.5px solid var(--ink);
  background: var(--line);
  box-shadow: 6px 6px 0 var(--blue);
}

.info-block {
  background: var(--bg-elevated);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.2s;
}

.info-block:hover {
  background: var(--blue-soft);
}

.block-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  font-weight: 600;
}

.info-block h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.block-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.info-block p:not(.block-meta) {
  font-size: 0.875rem;
  color: var(--ink-muted);
  flex: 1;
}

.block-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* ---- Testimonials ---- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1.5px solid var(--ink);
  background: var(--line);
  box-shadow: 6px 6px 0 var(--blue);
}

.testimonial-card {
  margin: 0;
  background: var(--bg-elevated);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.2s;
}

.testimonial-card:hover {
  background: var(--blue-soft);
}

.testimonial-quote {
  font-size: 0.975rem;
  color: var(--ink-muted);
  line-height: 1.65;
  flex: 1;
  position: relative;
  padding-left: 1rem;
  border-left: 3px solid var(--blue);
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.5rem;
}

.author-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.author-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--blue-deep);
}

/* ---- Skills building (floors) ---- */
.skills-building {
  border: 1.5px solid var(--ink);
  background: var(--bg-elevated);
  box-shadow: 6px 6px 0 var(--blue);
}

.skill-floor {
  display: grid;
  grid-template-columns: 140px 1fr;
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}

.skill-floor:last-child {
  border-bottom: none;
}

.floor-label {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-deep);
  background: var(--blue-soft);
  border-right: 1px solid var(--line);
}

.floor-cells {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
}

.floor-cells span {
  font-size: 0.8rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.floor-cells span:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

/* ---- Remote setup ---- */
.setup-intro {
  max-width: 40rem;
  margin-bottom: 1.25rem;
  color: var(--ink-muted);
  font-size: 1rem;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1.5px solid var(--ink);
  background: var(--bg-elevated);
  box-shadow: 6px 6px 0 var(--blue);
}

.setup-tile {
  padding: 1.1rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: linear-gradient(180deg, rgba(232, 240, 255, 0.45) 0%, transparent 55%);
  transition: background 0.2s;
}

.setup-tile:nth-child(5n) {
  border-right: none;
}

.setup-tile:nth-last-child(-n + 5) {
  border-bottom: none;
}

.setup-tile:hover {
  background: var(--blue-soft);
}

.setup-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  font-weight: 600;
}

.setup-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* ---- Research discovery + Collaborate ---- */
.discover-panel {
  padding: 1.75rem;
  border: 1.5px solid var(--ink);
  background:
    linear-gradient(135deg, var(--blue-soft) 0%, transparent 55%),
    var(--bg-elevated);
  box-shadow: 6px 6px 0 var(--blue);
  max-width: 44rem;
}

.discover-lead {
  color: var(--ink-muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  max-width: 38rem;
}

.discover-pipeline {
  justify-content: flex-start;
  padding: 0 0 1.5rem;
}

.discover-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.collaborate-intro {
  max-width: 40rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border: 1.5px solid var(--ink);
  background: var(--line);
  box-shadow: 6px 6px 0 var(--blue);
  margin-bottom: 1.5rem;
}

.topic-card {
  background: var(--bg-elevated);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: background 0.2s;
}

.topic-card:hover {
  background: var(--blue-soft);
}

.topic-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.topic-card p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  flex: 1;
}

.collaborate-contact {
  padding: 1.5rem 1.75rem;
  border: 1.5px solid var(--ink);
  background: var(--bg-elevated);
  box-shadow: 6px 6px 0 var(--blue);
}

.collaborate-contact h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.collaborate-contact > p {
  color: var(--ink-muted);
  margin-bottom: 1.15rem;
  max-width: 36rem;
}

/* ---- Education ---- */
.edu-block {
  padding: 1.5rem;
  border: 1.5px solid var(--ink);
  background: var(--bg-elevated);
  box-shadow: 6px 6px 0 var(--blue);
  max-width: 44rem;
}

.edu-block h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.edu-timeline {
  display: grid;
  gap: 1.25rem;
}

.edu-detail {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.cert-link-row {
  margin-top: 1.25rem;
}

.cert-list {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cert-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.cert-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--blue);
  font-family: var(--font-mono);
}

/* ---- Contact ---- */
.contact-panel {
  padding: 2rem;
  border: 1.5px solid var(--ink);
  background:
    linear-gradient(135deg, var(--blue-soft) 0%, transparent 50%),
    var(--bg-elevated);
  box-shadow: 8px 8px 0 var(--blue);
}

.contact-panel p {
  max-width: 36rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---- Back to top ---- */
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  z-index: 90;
  width: 28px;
  height: 72px;
  padding: 0;
  border: 1.5px solid var(--blue);
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 3px 3px 0 var(--blue);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding-bottom: 0.55rem;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s, box-shadow 0.2s;
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover {
  background: var(--blue-soft);
  box-shadow: 4px 4px 0 var(--ink);
}

.to-top-rail {
  position: absolute;
  inset: 8px 9px 28px;
  overflow: hidden;
  border-left: 1px solid rgba(21, 101, 255, 0.25);
  border-right: 1px solid rgba(21, 101, 255, 0.25);
}

.to-top-beam {
  position: absolute;
  left: 50%;
  width: 2px;
  height: 18px;
  margin-left: -1px;
  border-radius: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--blue-mid) 35%,
    #fff 55%,
    var(--blue) 100%
  );
  box-shadow: 0 0 8px rgba(21, 101, 255, 0.85), 0 0 2px #fff;
  animation: riseBeam 1.6s linear infinite;
  opacity: 0.85;
}

.to-top-beam:nth-child(1) {
  animation-delay: 0s;
  left: 30%;
  height: 14px;
}

.to-top-beam:nth-child(2) {
  animation-delay: 0.55s;
  left: 50%;
  height: 20px;
}

.to-top-beam:nth-child(3) {
  animation-delay: 1.1s;
  left: 70%;
  height: 12px;
}

@keyframes riseBeam {
  0% {
    top: 100%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  80% {
    opacity: 0.85;
  }
  100% {
    top: -20%;
    opacity: 0;
  }
}

.to-top-chevron {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--blue-deep);
  border-right: 2px solid var(--blue-deep);
  transform: rotate(-45deg);
  margin-bottom: 2px;
  filter: drop-shadow(0 0 4px rgba(21, 101, 255, 0.55));
}

.to-top:hover .to-top-beam {
  animation-duration: 0.95s;
}

@media (max-width: 720px) {
  .to-top {
    right: 0.7rem;
    bottom: 0.85rem;
    width: 18px;
    height: 48px;
    box-shadow: 2px 2px 0 var(--blue);
    padding-bottom: 0.4rem;
    gap: 0.2rem;
  }

  .to-top-rail {
    inset: 6px 5px 20px;
  }

  .to-top-beam {
    width: 1.5px;
    height: 12px;
  }

  .to-top-beam:nth-child(1) { height: 10px; }
  .to-top-beam:nth-child(2) { height: 14px; }
  .to-top-beam:nth-child(3) { height: 9px; }

  .to-top-chevron {
    width: 7px;
    height: 7px;
    border-top-width: 1.5px;
    border-right-width: 1.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-top-beam {
    animation: none;
    top: 35%;
    opacity: 0.7;
  }
}

/* ---- Nav current state ---- */
.nav a.is-current {
  color: var(--blue);
}

.nav a.is-current::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--blue);
  margin-top: 2px;
}

/* ---- Blogs page ---- */
.blogs-hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  overflow: hidden;
}

.blogs-skyline {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 38%;
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}

.blogs-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 46rem;
}

.blogs-frame .hero-meta {
  justify-content: center;
  text-align: center;
}

.blogs-card {
  border: 1.5px solid var(--ink);
  background: var(--bg-elevated);
  box-shadow: 10px 10px 0 var(--blue);
  overflow: hidden;
}

.blogs-card-body {
  padding: clamp(1.75rem, 5vw, 3.25rem);
  text-align: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, var(--blue-soft), transparent 70%);
}

.blogs-heading {
  margin: 0 auto 1.75rem;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  padding-right: 1.25rem;
}

.box-sign.static {
  cursor: default;
  background: var(--blue);
  color: #fff;
}

.blogs-lead {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.blogs-copy {
  max-width: 34rem;
  margin: 0 auto 2rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.blogs-pipeline {
  justify-content: center;
  padding: 0 0 2rem;
}

.blogs-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1.5px solid var(--line);
  padding: 1.5rem;
  background: var(--bg-elevated);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.footer-pipe {
  color: var(--blue);
}

/* ---- Reveal animations ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .stat-windows {
    grid-template-columns: repeat(2, 1fr);
  }

  .window-pane:nth-child(2) {
    border-right: none;
  }

  .window-pane:nth-child(1),
  .window-pane:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .tri-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .setup-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .setup-tile {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .setup-tile:nth-child(5n) {
    border-right: 1px solid var(--line);
  }

  .setup-tile:nth-child(2n) {
    border-right: none;
  }

  .setup-tile:nth-last-child(-n + 5) {
    border-bottom: 1px solid var(--line);
  }

  .setup-tile:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .hero-skyline {
    opacity: 0.12;
    height: 36%;
  }

  .hero-portrait {
    width: min(58vw, 420px);
    opacity: 0.85;
  }

  .hero-frame {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0 1rem;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: auto;
    z-index: 101;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-elevated);
    border-bottom: 1.5px solid var(--line);
    box-shadow: 0 16px 40px rgba(10, 22, 40, 0.12);
    transform: translateY(-0.5rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }

  .nav-cta {
    margin: 0.75rem 0.5rem 0.5rem;
    text-align: center;
    border-bottom: none !important;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    grid-template-columns: 28px 1fr;
    padding: 2.5rem 1rem;
    gap: 0.5rem;
  }

  .rail-num {
    font-size: 0.65rem;
  }

  .exp-header {
    grid-template-columns: 56px 1fr auto;
    gap: 0.75rem;
    padding: 1rem;
  }

  .exp-titles h3 {
    font-size: 1rem;
  }

  .logo-slot {
    width: 56px;
    height: 56px;
  }

  .skill-floor {
    grid-template-columns: 1fr;
  }

  .floor-label {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: auto;
    padding: 2rem 1rem 3rem;
    align-items: flex-start;
  }

  .hero-frame {
    max-width: 100%;
    margin: 0;
    position: relative;
    z-index: 1;
  }

  .hero-brand .boxed-heading {
    font-size: clamp(2rem, 11vw, 2.75rem);
  }

  .hero-cta {
    gap: 0.6rem;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-width: calc(50% - 0.4rem);
    padding: 0.7rem 0.9rem;
    font-size: 0.875rem;
  }

  .hero-contact-strip {
    font-size: 0.72rem;
  }

  .hero-portrait {
    display: none;
  }

  .hero-skyline {
    display: none;
  }

  .stat-windows {
    grid-template-columns: 1fr 1fr;
  }

  .platform-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-links .btn {
    width: 100%;
    justify-content: center;
  }

  .blogs-hero {
    padding: 2.5rem 1rem;
    min-height: calc(100dvh - var(--header-h));
  }

  .blogs-card {
    box-shadow: 6px 6px 0 var(--blue);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) and (min-width: 721px) {
  .nav {
    gap: 0.85rem;
  }

  .nav a {
    font-size: 0.8rem;
  }

  .brand-name {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
