/* ==========================================================================
   Rohit Chauhan — rohitchauhan.com.au
   Design tokens
   Palette: ink / slate / line / paper / mute + two encoded accents:
     --signal (cyan)  = data flowing IN   (sources → unified profile)
     --activate (amber) = messages going OUT (orchestration → channels)
   Type: Archivo (display, variable width) / Instrument Sans (body) / JetBrains Mono (data)
   ========================================================================== */

:root {
  --ink:      #0B1015;
  --ink-2:    #0F161D;
  --slate:    #131C25;
  --line:     #1E2C38;
  --line-2:   #293A48;
  --paper:    #E9EFF4;
  --mute:     #8397A8;
  --mute-2:   #5E7183;
  --signal:   #3FB6D9;
  --signal-dim: rgba(63, 182, 217, 0.14);
  --activate: #F0A742;
  --activate-dim: rgba(240, 167, 66, 0.14);

  --shell: min(1180px, 100% - 2.5rem);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: clamp(0.78rem, 0.76rem + 0.12vw, 0.84rem);
  --step-0:  clamp(0.98rem, 0.95rem + 0.16vw, 1.06rem);
  --step-1:  clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.7vw, 1.9rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.4vw, 2.85rem);
  --step-4:  clamp(2.5rem, 1.9rem + 3vw, 4.6rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --ink:      #F2F5F8;
  --ink-2:    #E9EEF3;
  --slate:    #FFFFFF;
  --line:     #D3DDE6;
  --line-2:   #BCCAD6;
  --paper:    #0D1218;
  --mute:     #4A5C6C;
  --mute-2:   #6B7C8B;
  --signal:   #0E7C9B;
  --signal-dim: rgba(14, 124, 155, 0.1);
  --activate: #A9691A;
  --activate-dim: rgba(169, 105, 26, 0.1);
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell { width: var(--shell); margin-inline: auto; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--signal); color: #04121a; padding: 0.7rem 1.1rem; font-weight: 600;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Ambient grid ---------- */
.grid-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.28;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 0%, transparent 78%);
}

/* ---------- Header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  display: flex; align-items: center; gap: 1.5rem;
  height: 66px;
}
.mark {
  display: inline-flex; align-items: baseline; gap: 0.6rem;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 118, "wght" 700;
  letter-spacing: -0.02em; font-size: 1.02rem;
}
.mark__dot { width: 7px; height: 7px; background: var(--activate); border-radius: 50%; display: inline-block; }
.mark__sub {
  font-family: var(--f-mono); font-size: 0.63rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--mute-2); font-weight: 400;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.7rem; }
.nav a {
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mute);
  transition: color 0.2s var(--ease);
}
.nav a:hover, .nav a.is-current { color: var(--paper); }
.nav a.is-current { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--activate); }
.masthead__tools { display: flex; align-items: center; gap: 0.6rem; margin-left: 0.4rem; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--mute);
  transition: color 0.2s, border-color 0.2s;
}
.icon-btn:hover { color: var(--paper); border-color: var(--paper); }
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--signal), var(--activate));
  transition: width 0.1s linear;
}
@media (max-width: 900px) {
  .nav { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.78rem 1.25rem; border-radius: var(--radius);
  font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--paper);
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--paper); }
.btn--solid { background: var(--activate); border-color: var(--activate); color: #1A1206; font-weight: 600; }
.btn--solid:hover { background: color-mix(in srgb, var(--activate) 86%, #fff); border-color: transparent; }
.btn svg { width: 14px; height: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.eyebrow {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mute-2); display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--activate); flex: none;
}
.hero h1 {
  font-family: var(--f-display);
  font-variation-settings: "wdth" 108, "wght" 620;
  font-size: var(--step-4);
  line-height: 0.98; letter-spacing: -0.035em;
  margin: 1.4rem 0 0; text-wrap: balance;
  max-width: 17ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--signal);
}
.hero__lede {
  margin-top: 1.5rem; max-width: 58ch; color: var(--mute);
  font-size: var(--step-1); line-height: 1.55;
}
.hero__lede strong { color: var(--paper); font-weight: 600; }
.hero__cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Schematic (signature element) ---------- */
.schematic {
  position: relative;
  border: 1px solid var(--line); border-radius: 6px;
  background:
    radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--signal) 7%, transparent) 0%, transparent 62%),
    var(--ink-2);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  overflow: hidden;
}
.schematic__cap {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--f-mono); font-size: 0.63rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mute-2); margin-bottom: 0.9rem; border-bottom: 1px solid var(--line); padding-bottom: 0.7rem;
}
.schematic__cap b { color: var(--mute); font-weight: 400; }
.diagram { width: 100%; height: auto; }
.diagram--tall { display: none; }
@media (max-width: 720px) {
  .diagram--wide { display: none; }
  .diagram--tall { display: block; }
}

/* SVG primitives */
.node { fill: var(--slate); stroke: var(--line-2); stroke-width: 1; }
.node--hub { fill: color-mix(in srgb, var(--signal) 8%, var(--slate)); stroke: color-mix(in srgb, var(--signal) 45%, var(--line-2)); }
.node--orch { fill: color-mix(in srgb, var(--activate) 8%, var(--slate)); stroke: color-mix(in srgb, var(--activate) 45%, var(--line-2)); }
.n-label { font-family: var(--f-body); font-size: 13px; font-weight: 600; fill: var(--paper); }
.n-sub { font-family: var(--f-mono); font-size: 9.5px; fill: var(--mute-2); letter-spacing: 0.06em; }
.col-label { font-family: var(--f-mono); font-size: 9.5px; fill: var(--mute-2); letter-spacing: 0.18em; }
.wire { stroke: var(--line-2); stroke-width: 1; fill: none; }
.flow { stroke-width: 1.6; fill: none; stroke-dasharray: 5 9; stroke-linecap: round; }
.flow--in { stroke: var(--signal); animation: dash 1.6s linear infinite; }
.flow--out { stroke: var(--activate); animation: dash 1.6s linear infinite; }
.flow--loop { stroke: var(--mute-2); animation: dash 3.2s linear infinite; opacity: 0.75; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.arrowhead { fill: var(--line-2); }

/* ---------- Metrics ---------- */
.metrics {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.metrics__row {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.metric { padding: 1.6rem 1.4rem 1.7rem; border-left: 1px solid var(--line); }
.metric:first-child { border-left: 0; padding-left: 0; }
.metric__num {
  font-family: var(--f-display); font-variation-settings: "wdth" 100, "wght" 600;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.03em; line-height: 1;
  color: var(--paper);
}
.metric__num span { color: var(--activate); }
.metric__label {
  margin-top: 0.6rem; font-family: var(--f-mono); font-size: 0.68rem;
  letter-spacing: 0.06em; color: var(--mute); line-height: 1.45; text-transform: uppercase;
}
@media (max-width: 780px) {
  .metrics__row { grid-template-columns: 1fr 1fr; }
  .metric { padding: 1.2rem 1rem; border-top: 1px solid var(--line); }
  .metric:nth-child(odd) { border-left: 0; padding-left: 0; }
  .metric:nth-child(-n+2) { border-top: 0; }
}

/* ---------- Sections ---------- */
.section { position: relative; z-index: 1; padding: clamp(4rem, 9vw, 7rem) 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section__head {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem;
  align-items: start; margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section__idx {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--activate);
  padding-top: 0.55rem; text-transform: uppercase;
}
.section__title {
  font-family: var(--f-display); font-variation-settings: "wdth" 104, "wght" 600;
  font-size: var(--step-3); letter-spacing: -0.03em; line-height: 1.05;
}
.section__note { margin-top: 0.8rem; color: var(--mute); max-width: 62ch; }
@media (max-width: 720px) {
  .section__head { grid-template-columns: 1fr; gap: 0.5rem; }
  .section__idx { padding-top: 0; }
}

/* ---------- Profile ---------- */
.profile { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 20rem); gap: clamp(1.5rem, 4vw, 3rem); }
.profile__body p { max-width: 68ch; color: var(--mute); }
.profile__body p + p { margin-top: 1.1rem; }
.profile__body strong { color: var(--paper); font-weight: 600; }
.aside {
  border-left: 1px solid var(--line); padding-left: 1.4rem;
  font-family: var(--f-mono); font-size: 0.74rem; line-height: 1.75;
}
.aside dt { color: var(--mute-2); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.63rem; margin-top: 1.2rem; }
.aside dt:first-child { margin-top: 0; }
.aside dd { color: var(--paper); margin: 0.25rem 0 0; }
.aside dd a:hover { color: var(--signal); }
@media (max-width: 980px) {
  .profile { grid-template-columns: 1fr; }
  .aside { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 1.4rem; }
}

/* ---------- Capability cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--ink); padding: 1.6rem 1.5rem 1.7rem; transition: background 0.25s var(--ease); }
.card:hover { background: var(--ink-2); }
.card__no { font-family: var(--f-mono); font-size: 0.65rem; color: var(--signal); letter-spacing: 0.14em; }
.card h3 {
  font-family: var(--f-display); font-variation-settings: "wdth" 100, "wght" 600;
  font-size: var(--step-1); letter-spacing: -0.02em; margin: 0.7rem 0 0.6rem; line-height: 1.15;
}
.card p { color: var(--mute); font-size: 0.92rem; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 1rem; }
.tag {
  font-family: var(--f-mono); font-size: 0.63rem; letter-spacing: 0.04em;
  color: var(--mute); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.2rem 0.55rem;
}

/* ---------- Experience ---------- */
.roles { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; }
.roles__list { display: grid; }
.role {
  display: grid; grid-template-columns: 11rem 1fr; gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.8rem 0; border-top: 1px solid var(--line);
}
.role:first-child { border-top: 0; padding-top: 0; }
.role__when { font-family: var(--f-mono); font-size: 0.72rem; color: var(--mute-2); letter-spacing: 0.03em; }
.role__when b { display: block; color: var(--activate); font-weight: 500; margin-bottom: 0.3rem; }
.role h3 {
  font-family: var(--f-display); font-variation-settings: "wdth" 102, "wght" 600;
  font-size: var(--step-1); letter-spacing: -0.02em; line-height: 1.2;
}
.role__org { color: var(--mute); font-size: 0.86rem; margin-top: 0.3rem; font-family: var(--f-mono); letter-spacing: 0.02em; }
.role ul { margin: 0.95rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.role li { position: relative; padding-left: 1.1rem; color: var(--mute); font-size: 0.94rem; line-height: 1.58; max-width: 72ch; }
.role li::before {
  content: ""; position: absolute; left: 0; top: 0.66em; width: 5px; height: 1px; background: var(--line-2);
}
.role--now h3::after {
  content: "CURRENT"; font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: 0.14em;
  color: var(--signal); border: 1px solid color-mix(in srgb, var(--signal) 45%, transparent);
  padding: 0.15rem 0.4rem; border-radius: 999px; margin-left: 0.7rem; vertical-align: 0.32em;
}
.earlier { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 0.5rem; }
.earlier summary {
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mute); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.6rem;
}
.earlier summary::-webkit-details-marker { display: none; }
.earlier summary::after { content: "+"; color: var(--activate); font-size: 1rem; }
.earlier[open] summary::after { content: "–"; }
.earlier summary:hover { color: var(--paper); }
.earlier ul { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.9rem; }
.earlier li { color: var(--mute); font-size: 0.9rem; }
.earlier li b { color: var(--paper); font-weight: 600; }
.earlier li span { font-family: var(--f-mono); font-size: 0.7rem; color: var(--mute-2); }
@media (max-width: 860px) {
  .roles { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; gap: 0.7rem; }
}

/* ---------- Clients ---------- */
.clients { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.client {
  background: var(--ink); padding: 1.4rem 1.2rem; text-align: center;
}
.client b {
  display: block; font-family: var(--f-display); font-variation-settings: "wdth" 96, "wght" 600;
  font-size: 1rem; letter-spacing: -0.01em;
}
.client span { font-family: var(--f-mono); font-size: 0.62rem; color: var(--mute-2); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Certifications ---------- */
.certs { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 0.6rem; }
.cert {
  display: flex; gap: 0.8rem; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.95rem 1rem;
  background: var(--ink-2); transition: border-color 0.2s;
}
.cert:hover { border-color: var(--line-2); }
.cert__badge { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-top: 0.5rem; flex: none; }
.cert--braze .cert__badge { background: var(--activate); }
.cert p { font-size: 0.88rem; line-height: 1.4; }
.cert small { font-family: var(--f-mono); font-size: 0.62rem; color: var(--mute-2); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Résumé ---------- */
.resumes { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 1rem; }
.resume {
  border: 1px solid var(--line); border-radius: 6px; background: var(--ink-2);
  padding: 1.6rem 1.5rem; display: flex; flex-direction: column;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.resume:hover { transform: translateY(-4px); border-color: var(--line-2); }
.resume__kind { font-family: var(--f-mono); font-size: 0.63rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--activate); }
.resume h3 {
  font-family: var(--f-display); font-variation-settings: "wdth" 100, "wght" 600;
  font-size: var(--step-1); letter-spacing: -0.02em; margin: 0.7rem 0 0.55rem; line-height: 1.18;
}
.resume p { color: var(--mute); font-size: 0.9rem; line-height: 1.58; }
.resume ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; gap: 0.35rem; }
.resume li { font-family: var(--f-mono); font-size: 0.68rem; color: var(--mute); letter-spacing: 0.02em; }
.resume li::before { content: "› "; color: var(--signal); }
.resume .btn { margin-top: auto; justify-content: center; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; }
.contact__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.contact h2 {
  font-family: var(--f-display); font-variation-settings: "wdth" 106, "wght" 620;
  font-size: var(--step-3); letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance;
}
.contact p { color: var(--mute); margin-top: 1rem; max-width: 46ch; }
.channels { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.channel {
  background: var(--ink-2); padding: 1.05rem 1.2rem; display: flex; align-items: center; gap: 1rem;
  transition: background 0.2s;
}
.channel:hover { background: var(--slate); }
.channel__k { font-family: var(--f-mono); font-size: 0.63rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute-2); width: 5.5rem; flex: none; }
.channel__v { font-size: 0.94rem; word-break: break-word; }
.channel__go { margin-left: auto; color: var(--mute-2); flex: none; }
.channel:hover .channel__go { color: var(--activate); }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  position: relative; z-index: 1; border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--mute-2);
}
.footer a:hover { color: var(--paper); }
.footer__links { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

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

/* ---------- Print ---------- */
@media print {
  .masthead, .grid-field, .schematic, .hero__cta, .footer__links { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 1rem 0; border: 0; }
}
