/* Rahul Manchanda — portfolio
   Palette: harbour ink + container yellow, drawn from the logistics and shipping work */
:root {
  --ink: #10303A;        /* deep harbour teal-navy: text, dark sections */
  --paper: #F4F6F5;      /* cool off-white page */
  --tint: #E6ECEB;       /* alternate section */
  --steel: #5B6F76;      /* secondary text */
  --line: #CCD6D5;       /* rules and borders */
  --signal: #F2B705;     /* container yellow: the one accent */
  --signal-ink: #3A2C00;

  --font: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--signal); color: var(--signal-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 24px;
  background: rgba(244, 246, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-name { font-weight: 700; text-decoration: none; font-size: 18px; }
.nav nav { display: flex; gap: 22px; }
.nav nav a { text-decoration: none; color: var(--steel); font-size: 15px; }
.nav nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav nav { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; }
.hero-role { color: var(--steel); margin: 0 0 18px; font-size: 16px; }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 19ch;
  margin: 0 0 28px;
}
.hero-lede { font-size: 20px; max-width: 58ch; color: #2C4A53; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 12px 20px; border-radius: var(--radius); font-size: 16px;
  border: 2px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #1B4652; border-color: #1B4652; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Process map: the signature moment */
.flow { position: relative; margin-top: 80px; }
.flow-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  position: relative;
}
.flow-steps li { display: flex; flex-direction: column; gap: 4px; position: relative; }
.flow-steps li:not(:last-child)::before {
  content: ""; position: absolute; top: 12px; left: 28px; height: 4px;
  width: calc(100% + 24px - 28px); background: var(--signal); transform-origin: left;
}
.flow-steps .dot { position: relative; z-index: 1; }
.flow-steps .dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--ink);
  margin-bottom: 14px;
}
.flow-steps li:last-child .dot { background: var(--signal); }
.flow-steps strong { font-size: 22px; letter-spacing: -0.01em; }
.flow-steps span:not(.dot) { color: var(--steel); font-size: 15px; line-height: 1.45; }

@media (prefers-reduced-motion: no-preference) {
  .js .flow-steps li::before { transform: scaleX(0); animation: draw .45s ease-in-out forwards; }
  .js .flow-steps li:nth-child(1)::before { animation-delay: .5s; }
  .js .flow-steps li:nth-child(2)::before { animation-delay: .95s; }
  .js .flow-steps li:nth-child(3)::before { animation-delay: 1.4s; }
  .js .flow-steps .dot { transform: scale(.4); opacity: 0; animation: pop .35s ease-out forwards; }
  .js .flow-steps li:nth-child(1) .dot { animation-delay: .3s; }
  .js .flow-steps li:nth-child(2) .dot { animation-delay: .75s; }
  .js .flow-steps li:nth-child(3) .dot { animation-delay: 1.2s; }
  .js .flow-steps li:nth-child(4) .dot { animation-delay: 1.65s; }
}
@keyframes draw { to { transform: scaleX(1); } }
@keyframes pop { to { transform: scale(1); opacity: 1; } }

@media (max-width: 760px) {
  .flow { margin-top: 56px; }
  .flow-steps li::before { display: none; }
  .flow-steps { grid-template-columns: 1fr; gap: 0; border-left: 4px solid var(--signal); margin-left: 12px; }
  .flow-steps li { padding: 0 0 22px 24px; position: relative; }
  .flow-steps .dot { position: absolute; left: -16px; top: 0; width: 28px; height: 28px; margin: 0; }
  .flow-steps strong { line-height: 28px; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-tint { background: var(--tint); }
.section h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.1; letter-spacing: -0.02em; font-weight: 700;
  margin: 0;
}
.section-head { margin-bottom: 40px; max-width: 64ch; }
.section-head p { color: var(--steel); margin: 12px 0 0; }

.two-col { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }
.prose p { margin: 0 0 18px; max-width: 62ch; }

.facts { margin: 36px 0 0; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: #2C4A53; }
@media (max-width: 520px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Work manifest ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  font: inherit; font-size: 15px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink);
}
.chip:hover { background: rgba(16,48,58,.06); }
.chip.is-active { background: var(--ink); color: var(--paper); }

.manifest { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.item {
  display: grid; grid-template-columns: 190px 1fr 130px; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.item[hidden] { display: none; }
.item-domain { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.item h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.01em; }
.item p { margin: 0; color: #2C4A53; max-width: 68ch; }
.status { justify-self: end; font-size: 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.status.live::before { background: var(--ink); }
.status.uat::before { background: var(--signal); }
.status.eval::before { background: transparent; border: 2px solid var(--ink); width: 7px; height: 7px; }
@media (max-width: 760px) {
  .item { grid-template-columns: 1fr; gap: 6px; }
  .status { justify-self: start; order: -1; }
}
.footnote { color: var(--steel); font-size: 15px; margin: 24px 0 0; max-width: 70ch; }

/* ---------- AI ---------- */
.ai { background: var(--ink); color: var(--paper); border-top: none; }
.ai h2 { color: var(--paper); }
.ai-lede { font-size: 19px; color: #C9D6D8; margin: 18px 0 0; max-width: 40ch; }
.ai-list { list-style: none; margin: 0; padding: 0; }
.ai-list li { padding: 20px 0 20px 24px; border-left: 3px solid var(--signal); }
.ai-list li + li { margin-top: 8px; }
.ai-list strong { font-size: 19px; }
.ai-list p { margin: 4px 0 0; color: #C9D6D8; max-width: 60ch; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.timeline > li:first-child { border-top: 2px solid var(--ink); }
.when { color: var(--steel); font-weight: 500; }
.what h3 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.org { margin: 2px 0 0; color: var(--steel); }
.what ul { margin: 14px 0 0; padding-left: 20px; max-width: 70ch; }
.what li { margin-bottom: 8px; }
.what li::marker { color: var(--steel); }
@media (max-width: 700px) { .timeline > li { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 28px; }
.skills h3 { margin: 0 0 6px; font-size: 17px; }
.skills p { margin: 0; color: #2C4A53; font-size: 15.5px; }
@media (max-width: 900px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .skills { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { background: var(--signal); color: var(--signal-ink); padding: 96px 0; }
.contact h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 12px; max-width: 18ch; color: var(--ink); }
.contact p { margin: 0 0 28px; font-size: 19px; color: var(--ink); }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 36px; font-size: 19px; font-weight: 600; color: var(--ink); }
.contact-list a { text-decoration-thickness: 2px; text-underline-offset: 4px; }

.foot { padding: 24px 0; color: var(--steel); font-size: 14px; }

/* ---------- Area dots (filter + rows) ---------- */
.fam-logistics { --fam: #2B7BBF; }
.fam-it        { --fam: #6A55B8; }
.fam-mfg       { --fam: #C2602E; }
.fam-bizops    { --fam: #3C8A50; }
.fam-internal  { --fam: #7A8A8F; }
.fam-personal  { --fam: #C23A4E; }

.tag {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  padding: 2px 9px; border-radius: 999px;
  background: var(--signal); color: var(--signal-ink);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

.swatch {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--fam); flex: none;
}
.area { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.sub { color: var(--steel); font-size: 14px; padding-left: 17px; }

.chip .swatch { margin-right: 8px; }
.chip .n { opacity: .6; font-weight: 500; margin-left: 2px; }

/* ---------- POC / AI version additions ---------- */
.nav-tag { font-weight: 500; color: var(--steel); margin-left: 6px; font-size: 15px; }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.offers > div { border-top: 2px solid var(--ink); padding-top: 20px; }
.offers h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.01em; }
.offers p { margin: 0 0 14px; color: #2C4A53; }
.offers ul { margin: 0; padding-left: 18px; color: #2C4A53; font-size: 15.5px; }
.offers li { margin-bottom: 6px; }
.offers li::marker { color: var(--signal); }
.facts-wide { margin-top: 56px; }
.contact .contact-resume { margin: 28px 0 0; font-size: 16px; }
.contact-resume a { font-weight: 600; text-underline-offset: 4px; }
@media (max-width: 860px) { .offers { grid-template-columns: 1fr; gap: 28px; } }

/* Tighter hero spacing on phones and small screens */
@media (max-width: 760px) {
  .hero { padding: 28px 0 56px; }
  .hero-role { margin-bottom: 12px; }
}
