/* ============================================================
   RAJESH KUMAR — AI-NATIVE PORTFOLIO
   Visual system: terminal/HUD, schematic grid, cyan accent
   ============================================================ */

:root {
  /* Surfaces */
  --bg:            #050507;
  --bg-elev:       #0a0b10;
  --surface:       rgba(255, 255, 255, 0.02);
  --surface-2:     rgba(255, 255, 255, 0.04);
  --border:        rgba(255, 255, 255, 0.06);
  --border-2:      rgba(255, 255, 255, 0.10);
  --border-bright: rgba(34, 211, 238, 0.35);

  /* Type */
  --fg:            #e9eef5;
  --fg-2:          #aab2bf;
  --fg-3:          #6b7280;
  --fg-4:          #3f444d;

  /* Accent */
  --accent:        #22d3ee;
  --accent-2:      #7c3aed;
  --accent-3:      #06b6d4;
  --accent-glow:   rgba(34, 211, 238, 0.35);
  --warn:          #f59e0b;
  --ok:            #22c55e;

  /* Type families */
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Geist", "Inter", ui-sans-serif, system-ui, sans-serif;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html { scroll-behavior: auto; }
body { min-height: 100vh; }

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ============================================================
   GLOBAL BACKGROUND  — dot grid + soft vignette
   ============================================================ */
.bg-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 100%);
}
.bg-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 30% at 50% 0%, rgba(34, 211, 238, 0.06), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(124, 58, 237, 0.05), transparent 70%);
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
}

main { position: relative; z-index: 1; }

section { position: relative; padding: clamp(80px, 12vh, 160px) 0; }
section + section { border-top: 1px solid var(--border); }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(5,5,7,0.9), rgba(5,5,7,0.4));
  border-bottom: 1px solid var(--border);
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg);
  font-weight: 600;
}
.brand-mark {
  width: 24px; height: 24px;
  border: 1px solid var(--border-bright);
  display: grid; place-items: center;
  font-weight: 700;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(34,211,238,0.12), transparent);
  box-shadow: 0 0 12px rgba(34,211,238,0.18) inset;
}
.topbar nav { display: flex; gap: 28px; }
.topbar nav a {
  color: var(--fg-3);
  transition: color .25s var(--ease-out);
}
.topbar nav a:hover { color: var(--fg); }
.topbar nav a::before { content: "// "; color: var(--fg-4); }

.topbar .status {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg-3);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(0.85); }
}

@media (max-width: 860px) {
  .topbar nav { display: none; }
}

/* ============================================================
   HUD LABEL — small monospace eyebrow
   ============================================================ */
.hud-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: inline-flex; align-items: center; gap: 10px;
}
.hud-label::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-size: clamp(48px, 9vw, 132px);
}
.display .em { color: var(--accent); font-style: normal; }
.display .dim { color: var(--fg-3); }

h2.section-title {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.0;
  font-size: clamp(36px, 5vw, 64px);
  max-width: 22ch;
}
h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 22px;
  line-height: 1.2;
}

p.lede {
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.55;
  max-width: 62ch;
  color: var(--fg-2);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(50px, 8vh, 90px);
}
.section-head .meta { display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 0 !important;
}

.hero-blobs {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.blob.b1 {
  width: 60vw; height: 60vw; max-width: 900px; max-height: 900px;
  top: -15%; left: -10%;
  background: radial-gradient(circle, #22d3ee 0%, #0891b2 40%, transparent 70%);
  animation: blobFloat 22s ease-in-out infinite;
}
.blob.b2 {
  width: 50vw; height: 50vw; max-width: 760px; max-height: 760px;
  bottom: -20%; right: -10%;
  background: radial-gradient(circle, #7c3aed 0%, #4c1d95 50%, transparent 75%);
  animation: blobFloat2 28s ease-in-out infinite;
  opacity: 0.5;
}
.blob.b3 {
  width: 35vw; height: 35vw; max-width: 520px; max-height: 520px;
  top: 30%; left: 35%;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  animation: blobFloat3 18s ease-in-out infinite;
  opacity: 0.35;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.08); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-8%, -6%) scale(1.12); }
}
@keyframes blobFloat3 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-10%, 10%) scale(0.85); }
}

.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
  width: 100%;
}
.hero-copy { display: flex; flex-direction: column; gap: 36px; }
.hero-meta {
  display: flex; flex-direction: column; gap: 14px;
  font-family: var(--mono); font-size: 12px;
  color: var(--fg-3); letter-spacing: 0.04em;
}
.hero-meta .row { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-meta .row span { color: var(--fg-2); }
.hero-meta .row strong { color: var(--accent); font-weight: 500; }

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

/* Buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--border-2);
  color: var(--fg);
  background: var(--surface);
  transition: all .35s var(--ease-out);
  overflow: hidden;
}
.btn:hover { border-color: var(--border-bright); color: var(--accent); }
.btn .arrow {
  width: 14px; height: 1px; background: currentColor;
  position: relative; transition: width .35s var(--ease-out);
}
.btn .arrow::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 6px; height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.btn:hover .arrow { width: 22px; }
.btn-primary {
  background: var(--accent);
  color: #001318;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover {
  color: #001318;
  background: #67e8f9;
  border-color: #67e8f9;
  box-shadow: 0 0 30px var(--accent-glow);
}

/* HUD panel — right side of hero */
.hud-panel {
  position: relative;
  border: 1px solid var(--border-2);
  background: linear-gradient(160deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  padding: 22px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.hud-panel::before {
  content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}
.hud-panel .hud-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.hud-panel .hud-head span:last-child {
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.hud-panel .hud-head span:last-child::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.hud-row {
  display: grid; grid-template-columns: 100px 1fr auto;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--border);
}
.hud-row:last-child { border-bottom: 0; }
.hud-row .k { color: var(--fg-3); }
.hud-row .v { color: var(--fg); }
.hud-row .n { color: var(--accent); }

.hud-bar { height: 4px; background: rgba(255,255,255,0.04); position: relative; overflow: hidden; }
.hud-bar i {
  position: absolute; top: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
}

.hud-foot {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex; justify-content: space-between;
  color: var(--fg-3); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 50px; }
  .hud-panel { max-width: 480px; }
}

/* Hero corner brackets — schematic feel */
.brackets {
  position: absolute; inset: 90px var(--gutter) 40px;
  pointer-events: none; z-index: 0;
}
.brackets::before, .brackets::after,
.brackets > i:nth-child(1), .brackets > i:nth-child(2) {
  content: ""; position: absolute; width: 18px; height: 18px;
  border-color: var(--border-2);
  border-style: solid;
}
.brackets::before { top: 0; left: 0; border-width: 1px 0 0 1px; }
.brackets::after  { top: 0; right: 0; border-width: 1px 1px 0 0; }
.brackets > i:nth-child(1) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.brackets > i:nth-child(2) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

/* ============================================================
   CAPABILITIES
   ============================================================ */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.cap-card {
  background: var(--bg);
  padding: 36px 30px 30px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  position: relative;
  min-height: 280px;
  transition: background .4s var(--ease-out);
}
.cap-card:hover { background: rgba(34,211,238,0.025); }

/* Hover bg image — subtle, behind the readable scrim */
.cap-card .bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.08);
  transition: opacity .6s var(--ease-out), transform 1.2s var(--ease-out);
  filter: grayscale(1) contrast(1.05);
}
.cap-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4,4,5,0.72) 0%, rgba(4,4,5,0.88) 60%, rgba(4,4,5,0.96) 100%),
    radial-gradient(120% 80% at 80% 0%, rgba(34,211,238,0.10), transparent 60%);
  opacity: 0; transition: opacity .5s var(--ease-out);
}
.cap-card:hover .bg { opacity: 0.55; transform: scale(1); }
.cap-card:hover::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .cap-card .bg { transition: opacity .2s; transform: none; }
}
.cap-card .idx {
  position: absolute; top: 18px; right: 22px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; color: var(--fg-4);
}
.cap-card .icon {
  width: 56px; height: 56px;
  margin-bottom: 24px;
  display: grid; place-items: center;
  color: var(--accent);
}
.cap-card h3 { color: var(--fg); margin-bottom: 12px; }
.cap-card p { color: var(--fg-3); font-size: 14.5px; line-height: 1.55; }
.cap-card .tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 16px;
}
.cap-card .tags span {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  padding: 4px 8px;
  border: 1px solid var(--border);
}

@media (max-width: 980px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cap-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PROJECTS
   ============================================================ */
.project {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding: clamp(50px, 8vh, 110px) 0;
  border-bottom: 1px solid var(--border);
}
.project:last-child { border-bottom: 0; }
.project.reverse { grid-template-columns: 1.3fr 1fr; }
.project.reverse .project-copy { order: 2; }
.project.reverse .project-vis { order: 1; }

.project-copy { display: flex; flex-direction: column; gap: 22px; }
.project-copy .meta {
  display: flex; gap: 18px; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3);
}
.project-copy .meta .idx { color: var(--accent); }
.project-copy h3 {
  font-family: var(--display); font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 500; letter-spacing: -0.02em; line-height: 1.05;
  color: var(--fg);
}
.project-copy .desc { color: var(--fg-2); font-size: 16px; line-height: 1.6; max-width: 52ch; }
.project-copy .role {
  font-family: var(--mono); font-size: 12px;
  color: var(--fg-3); letter-spacing: 0.06em;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}
.project-copy .role b { color: var(--accent); font-weight: 500; }

.project-vis {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-2);
  background:
    linear-gradient(135deg, rgba(34,211,238,0.04), rgba(124,58,237,0.03)),
    var(--bg-elev);
  overflow: hidden;
}
.project-vis::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 80%);
}
.vis-corner-label {
  position: absolute; top: 12px; left: 14px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3);
  z-index: 5;
}
.vis-corner-id {
  position: absolute; top: 12px; right: 14px;
  font-family: var(--mono); font-size: 10px;
  color: var(--accent); letter-spacing: 0.12em;
  z-index: 5;
}

@media (max-width: 980px) {
  .project, .project.reverse { grid-template-columns: 1fr; }
  .project.reverse .project-copy { order: 1; }
  .project.reverse .project-vis { order: 2; }
}

/* ============================================================
   AI WORKFLOW SECTION
   ============================================================ */
.workflow {
  position: relative;
  margin-top: 30px;
  padding: 50px clamp(20px, 4vw, 60px);
  border: 1px solid var(--border-2);
  background: linear-gradient(180deg, rgba(34,211,238,0.025), rgba(124,58,237,0.02));
}
.workflow::before {
  content: "AI://workflow.runtime";
  position: absolute; top: -10px; left: 30px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-3);
  background: var(--bg); padding: 0 10px;
}
.flow-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: stretch;
}
.flow-node {
  position: relative;
  border: 1px solid var(--border-2);
  background: var(--bg);
  padding: 18px 16px;
  min-height: 120px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: all .35s var(--ease-out);
}
.flow-node:hover {
  border-color: var(--border-bright);
  background: rgba(34,211,238,0.04);
}
.flow-node .num {
  font-family: var(--mono); font-size: 10px;
  color: var(--accent); letter-spacing: 0.16em;
}
.flow-node .label {
  font-size: 13.5px; color: var(--fg);
  font-weight: 500; line-height: 1.25;
  margin-top: 8px;
}
.flow-node .sub {
  font-family: var(--mono); font-size: 10px;
  color: var(--fg-3); letter-spacing: 0.06em;
  margin-top: 4px;
}
.flow-node:not(:last-child)::after {
  content: ""; position: absolute;
  right: -10px; top: 50%; width: 8px; height: 1px;
  background: var(--border-2);
  z-index: 1;
}
@media (max-width: 980px) {
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-node:not(:last-child)::after { display: none; }
}

/* ============================================================
   PHILOSOPHY
   ============================================================ */
.phil-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
}
.phil-card {
  background: var(--bg);
  padding: 44px 38px;
  display: flex; flex-direction: column; gap: 18px;
  min-height: 240px;
  position: relative;
}
.phil-card .num {
  font-family: var(--mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.18em;
}
.phil-card h3 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
}
.phil-card p {
  color: var(--fg-2); font-size: 15.5px; line-height: 1.6;
  max-width: 44ch;
}
@media (max-width: 860px) { .phil-grid { grid-template-columns: 1fr; } }

/* ============================================================
   TECH STACK
   ============================================================ */
.stack-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 36px);
}
.stack-col h4 {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.stack-col ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.stack-col li {
  font-family: var(--mono); font-size: 13px;
  color: var(--fg-2);
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  transition: color .25s var(--ease-out);
}
.stack-col li::before {
  content: ""; width: 4px; height: 4px;
  background: var(--fg-4); border-radius: 1px;
  transition: background .25s var(--ease-out);
}
.stack-col li:hover { color: var(--fg); }
.stack-col li:hover::before { background: var(--accent); }
@media (max-width: 980px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .stack-grid { grid-template-columns: 1fr; } }

/* ============================================================
   INFRASTRUCTURE
   ============================================================ */
.infra {
  display: grid; grid-template-columns: minmax(0,1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
  min-width: 0;
}
.infra > * { min-width: 0; }
.infra-stack .infra-diagram { aspect-ratio: 21 / 9; max-height: 520px; }
.infra-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 14px;
}

/* ============================================================
   CORE SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.svc {
  background: var(--bg);
  padding: 28px 26px 30px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background .35s var(--ease-out);
  min-width: 0;
}
.svc:hover { background: var(--bg-elev); }
.svc header { display: flex; align-items: baseline; gap: 14px; }
.svc-num {
  font-family: var(--mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.16em;
}
.svc h3 {
  font-size: 17px; font-weight: 500;
  line-height: 1.3; color: var(--fg);
  margin: 0;
}
.svc ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.svc li {
  font-size: 13.5px; line-height: 1.55;
  color: var(--fg-2);
  padding-left: 18px; position: relative;
  text-wrap: pretty;
}
.svc li::before {
  content: "—"; position: absolute; left: 0;
  color: var(--accent); font-family: var(--mono);
}
.infra-diagram {
  position: relative;
  border: 1px solid var(--border-2);
  aspect-ratio: 5 / 4;
  background:
    linear-gradient(160deg, rgba(34,211,238,0.04), transparent 60%),
    var(--bg-elev);
  overflow: hidden;
}
.infra-diagram::before {
  content: "INFRA://topology.svg";
  position: absolute; top: 14px; left: 16px;
  font-family: var(--mono); font-size: 10px;
  color: var(--fg-3); letter-spacing: 0.16em; text-transform: uppercase;
  z-index: 5;
}
.infra-list { display: flex; flex-direction: column; gap: 16px; }
.infra-row {
  border: 1px solid var(--border);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 22px;
  transition: all .35s var(--ease-out);
}
.infra-row:hover {
  border-color: var(--border-bright);
  background: rgba(34,211,238,0.03);
}
.infra-row .tag {
  font-family: var(--mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.12em;
}
.infra-row .name { color: var(--fg); font-size: 16px; font-weight: 500; }
.infra-row .desc { color: var(--fg-3); font-size: 13px; margin-top: 4px; }
.infra-row .stat {
  font-family: var(--mono); font-size: 10px;
  color: var(--fg-3); letter-spacing: 0.08em;
}
@media (max-width: 980px) { .infra { grid-template-columns: 1fr; } }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  position: relative;
  text-align: center;
  padding-top: clamp(120px, 18vh, 200px);
  padding-bottom: clamp(120px, 18vh, 200px);
}
.contact-blob {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.contact-blob i {
  position: absolute;
  left: 50%; top: 50%;
  width: 80vw; max-width: 800px; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(34,211,238,0.18) 0%, transparent 60%);
  filter: blur(60px);
}
.contact-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.contact h2 {
  font-family: var(--display);
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
  max-width: 16ch;
}
.contact h2 .em { color: var(--accent); }
.contact .lede { text-align: center; max-width: 56ch; }
.contact .channels {
  display: flex; gap: 14px; flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 32px var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.08em;
  flex-wrap: wrap; gap: 16px;
  position: relative; z-index: 1;
}
footer .brand { color: var(--fg); }
footer a { color: var(--fg-3); transition: color .25s; }
footer a:hover { color: var(--accent); }

/* ============================================================
   ANIMATION HELPERS — set by GSAP
   ============================================================ */
/* .reveal — initial hidden state is applied via JS so text remains visible if scripts fail */
.reveal { will-change: transform, opacity; }
.split-line { display: inline-block; overflow: hidden; }
.split-line > span { display: inline-block; transform: translateY(110%); }

/* ============================================================
   PROJECT-VIS ANIMATIONS
   ============================================================ */

/* PRJ-01 — Terminal typing loop */
.term { position: absolute; inset: 36px 24px 24px; font-family: var(--mono); font-size: 11.5px; line-height: 1.8; color: var(--fg-2); }
.term .ln { opacity: 0; animation: termLine 9s linear infinite; }
.term .ln:nth-child(1) { animation-delay: 0.0s; }
.term .ln:nth-child(2) { animation-delay: 0.8s; }
.term .ln:nth-child(3) { animation-delay: 1.7s; }
.term .ln:nth-child(4) { animation-delay: 2.6s; }
.term .ln:nth-child(5) { animation-delay: 3.5s; }
.term .ln:nth-child(6) { animation-delay: 4.4s; }
.term .ln:nth-child(7) { animation-delay: 5.3s; }
@keyframes termLine {
  0%, 65%, 100% { opacity: 0; transform: translateY(4px); }
  3%, 60% { opacity: 1; transform: translateY(0); }
}
.term .cur {
  display: inline-block; width: 7px; height: 13px;
  background: var(--accent); vertical-align: -1px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* PRJ-02 — Signal panel scanline + bar pulse */
.sig { position: absolute; inset: 36px 24px 24px; display: flex; flex-direction: column; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--fg-2); }
.sig .scan {
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px var(--accent);
  animation: scanY 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scanY {
  0%, 100% { top: 0; opacity: 0.0; }
  10%      { opacity: 0.9; }
  90%      { opacity: 0.9; }
  100%     { top: 100%; }
}
.sig .bars { margin-top: auto; display: flex; gap: 4px; align-items: flex-end; height: 64px; }
.sig .bars i { flex: 1; background: var(--accent); transform-origin: bottom; animation: barPulse 2.4s ease-in-out infinite; }
.sig .bars i:nth-child(1) { animation-delay: 0.0s; opacity: .35; }
.sig .bars i:nth-child(2) { animation-delay: 0.1s; opacity: .45; }
.sig .bars i:nth-child(3) { animation-delay: 0.2s; opacity: .55; }
.sig .bars i:nth-child(4) { animation-delay: 0.3s; opacity: .65; }
.sig .bars i:nth-child(5) { animation-delay: 0.4s; opacity: .75; }
.sig .bars i:nth-child(6) { animation-delay: 0.5s; opacity: .85; }
.sig .bars i:nth-child(7) { animation-delay: 0.6s; opacity: 1.0; }
@keyframes barPulse {
  0%, 100% { transform: scaleY(0.55); }
  50%      { transform: scaleY(1); }
}

/* PRJ-03/05 — SVG traveling pulses + node pulse */
.svg-anim .edge {
  stroke: rgba(34,211,238,0.25);
  stroke-dasharray: 4 8;
  animation: dashFlow 3s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -120; } }
.svg-anim .node { filter: drop-shadow(0 0 6px rgba(34,211,238,0.7)); }
.svg-anim .node-pulse { animation: nodePulse 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes nodePulse { 0%,100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }

/* PRJ-04 — SynergyHub grid pulse */
.synergy-cell { position: relative; overflow: hidden; }
.synergy-cell .dot { display: inline-block; animation: cellPulse 2s ease-in-out infinite; }
@keyframes cellPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; text-shadow: 0 0 8px var(--accent); } }

/* Stack items — rotating highlight to suggest combinations in flight */
.stack-col li.hi { position: relative; animation: stackHighlight 14s linear infinite; }
.stack-col:nth-child(1) li.hi:nth-child(1) { animation-delay:  0.0s; }
.stack-col:nth-child(2) li.hi:nth-child(3) { animation-delay:  1.4s; }
.stack-col:nth-child(3) li.hi:nth-child(2) { animation-delay:  2.8s; }
.stack-col:nth-child(4) li.hi:nth-child(1) { animation-delay:  4.2s; }
.stack-col:nth-child(1) li.hi:nth-child(5) { animation-delay:  5.6s; }
.stack-col:nth-child(2) li.hi:nth-child(6) { animation-delay:  7.0s; }
.stack-col:nth-child(3) li.hi:nth-child(4) { animation-delay:  8.4s; }
.stack-col:nth-child(4) li.hi:nth-child(3) { animation-delay:  9.8s; }
.stack-col:nth-child(1) li.hi:nth-child(7) { animation-delay: 11.2s; }
.stack-col:nth-child(4) li.hi:nth-child(6) { animation-delay: 12.6s; }
@keyframes stackHighlight {
  0%, 92%, 100% { color: var(--fg-2); }
  3%, 9%        { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }
}

/* AUTO-LOOP REEL  — for PRJ-06 cinematic visualization
   Three parallel vertical lanes drifting at different speeds.
   ============================================================ */
.reel {
  position: absolute;
  inset: 36px 24px 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  gap: 10px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.reel-lane {
  position: relative;
  overflow: hidden;
}
.reel-track {
  display: flex; flex-direction: column; gap: 10px;
  will-change: transform;
}
.reel-track.l1 { animation: reelUp 18s linear infinite; }
.reel-track.l2 { animation: reelUp 26s linear infinite; }
.reel-track.l3 { animation: reelUp 22s linear infinite reverse; }
@keyframes reelUp {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
.reel-card {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 12px 12px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}
.reel-card.accent {
  border-color: rgba(34,211,238,0.4);
  background: linear-gradient(160deg, rgba(34,211,238,0.06), transparent);
}
.reel-card .tag {
  font-size: 9px; letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.reel-card .title {
  color: var(--fg);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-weight: 500;
}
.reel-card .bar {
  height: 3px; margin-top: 8px;
  background: rgba(255,255,255,0.06);
  position: relative; overflow: hidden;
}
.reel-card .bar i {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 60%;
}
.reel-card.thumb {
  aspect-ratio: 4/3;
  padding: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(34,211,238,0.25), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(124,58,237,0.25), transparent 55%),
    var(--bg-elev);
  position: relative;
  overflow: hidden;
}
.reel-card.thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 14px 14px;
}
.reel-overlay {
  position: absolute; left: 14px; bottom: 14px;
  z-index: 5;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.reel-overlay::before {
  content: ""; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
.reel-corner-rec {
  position: absolute; right: 14px; bottom: 14px;
  z-index: 5;
  font-family: var(--mono); font-size: 10px;
  color: var(--fg-3); letter-spacing: 0.12em;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blob, .status-dot { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .split-line > span { transform: none; }
}
