/* ============================================================
   Naren Anandan — portfolio
   Hand-authored. No framework, no third-party CSS, no trackers.
   Visual system: an engineering drafting sheet.
   ============================================================ */

/* ---------- fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Azeret Mono';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/azeret-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Azeret Mono';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/azeret-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  --film:      #e9ece7;   /* the sheet itself */
  --film-2:    #f3f5f1;   /* raised panel */
  --ink:       #16211f;
  --ink-2:     #4a5852;   /* secondary text — 6.3:1 on film */
  --ink-3:     #606c66;   /* faint annotations — 4.6:1 on film */
  --hairline:  #c6cdc5;
  --hairline-2:#d8ded5;
  --op:        #14684a;   /* operational green */
  --op-soft:   #14684a1f;

  --measure: 62ch;
  --sheet-max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);

  --step--1: clamp(0.75rem, 0.72rem + 0.15vw, 0.82rem);
  --step-0:  clamp(0.95rem, 0.91rem + 0.2vw, 1.05rem);
  --step-1:  clamp(1.1rem, 1.02rem + 0.4vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.25rem + 1vw, 2.1rem);
  --step-3:  clamp(2.1rem, 1.5rem + 3vw, 4.4rem);

  --ease: cubic-bezier(0.22, 0.68, 0.36, 1);
  --dur: 520ms;
}

/* dark mode is a "negative print" of the same sheet, not a second theme */
:root[data-sheet='negative'] {
  color-scheme: dark;
  --film:      #0f1513;
  --film-2:    #161f1c;
  --ink:       #e5ebe6;
  --ink-2:     #a7b5af;
  --ink-3:     #7d8c86;
  --hairline:  #2b3833;
  --hairline-2:#222d29;
  --op:        #45c78f;
  --op-soft:   #45c78f24;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-sheet='positive']) {
    color-scheme: dark;
    --film:      #0f1513;
    --film-2:    #161f1c;
    --ink:       #e5ebe6;
    --ink-2:     #a7b5af;
    --ink-3:     #7d8c86;
    --hairline:  #2b3833;
    --hairline-2:#222d29;
    --op:        #45c78f;
    --op-soft:   #45c78f24;
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--film);
  color: var(--ink);
  font-family: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--step-0);
  font-variation-settings: 'wdth' 100;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--op);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--op); color: var(--film); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 0.7rem 1.1rem; background: var(--ink); color: var(--film);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- shared type roles ---------- */
/* Archivo's width axis carries the whole hierarchy: 116 for display, 74 for keys. */
.display {
  font-variation-settings: 'wdth' 116;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.key {
  font-variation-settings: 'wdth' 74;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.data { font-family: 'Azeret Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose { max-width: var(--measure); color: var(--ink-2); }
.prose + .prose { margin-top: 0.9em; }

/* ---------- sheet frame ---------- */
.sheet {
  max-width: var(--sheet-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  border-inline: 1px solid var(--hairline);
}

/* ---------- masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--film) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  border-inline: 1px solid var(--hairline);
  max-width: var(--sheet-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.masthead__mark {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  margin-right: auto;
}
.masthead__mark b { font-variation-settings: 'wdth' 92; font-weight: 700; letter-spacing: -0.01em; }
.masthead__mark span { font-size: var(--step--1); }

.nav { display: flex; gap: clamp(0.75rem, 2vw, 1.75rem); align-items: center; }
.nav a {
  position: relative;
  text-decoration: none;
  padding-block: 0.35rem;
  font-variation-settings: 'wdth' 80;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 200ms var(--ease);
}
.nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--op);
  transform: scaleX(0); transform-origin: left;
  transition: transform 300ms var(--ease);
}
.nav a:hover, .nav a[aria-current='true'] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current='true']::after { transform: scaleX(1); }
@media (max-width: 46rem) {
  .masthead__inner { flex-wrap: wrap; padding-block: 0.5rem; gap: 0.5rem 1rem; min-height: 0; }
  .masthead__mark span { display: none; }
  .nav {
    order: 3; width: 100%;
    overflow-x: auto; overscroll-behavior-x: contain;
    gap: 1.15rem; padding-bottom: 0.3rem;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
}

.sheet-toggle {
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--ink-2);
  cursor: pointer;
  color: var(--ink-2);
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.sheet-toggle:hover { border-color: var(--op); color: var(--op); }
.sheet-toggle svg { width: 0.95rem; height: 0.95rem; }
.sheet-toggle .icon-neg { display: none; }
:root[data-sheet='negative'] .sheet-toggle .icon-pos { display: none; }
:root[data-sheet='negative'] .sheet-toggle .icon-neg { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-sheet='positive']) .sheet-toggle .icon-pos { display: none; }
  :root:not([data-sheet='positive']) .sheet-toggle .icon-neg { display: block; }
}

/* ---------- section scaffolding ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 7rem); border-top: 1px solid var(--hairline); }
.section:first-of-type { border-top: 0; }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.section__head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline);
}
.section__title { font-size: var(--step-1); font-variation-settings: 'wdth' 96; font-weight: 700; }
.section__note { font-size: var(--step--1); color: var(--ink-3); }

/* ---------- hero / title block ---------- */
.hero { padding-block: clamp(3rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; margin-bottom: 1.5rem; }
.hero__name { font-size: var(--step-3); margin-bottom: 1.25rem; }
.hero__name em { font-style: normal; color: var(--op); }
.hero__lede { font-size: var(--step-1); max-width: 46ch; color: var(--ink-2); line-height: 1.45; }

.status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--step--1); color: var(--op);
  font-variation-settings: 'wdth' 78; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.status__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--op);
  box-shadow: 0 0 0 0 var(--op-soft);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--op-soft); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.btn {
  --btn-fg: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--ink-2);
  color: var(--btn-fg);
  text-decoration: none;
  font-variation-settings: 'wdth' 82;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  transition: color 260ms var(--ease), border-color 260ms var(--ease);
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform 360ms var(--ease);
  z-index: -1;
}
.btn > * { position: relative; }
.btn:hover { color: var(--film); border-color: var(--ink); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn svg { width: 0.85rem; height: 0.85rem; }
.btn--primary { border-color: var(--ink); }
.btn--primary::before { transform: scaleX(1); transform-origin: left; }
.btn--primary { color: var(--film); }
.btn--primary:hover::before { transform: scaleX(0); transform-origin: right; }
.btn--primary:hover { color: var(--ink); }

/* ---------- service history bar (the sheet's one loud element) ---------- */
.history { margin-top: clamp(3rem, 7vw, 5rem); }
.history__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.75rem; }
.history__bar {
  display: flex;
  gap: 2px;
  height: 3.25rem;
  align-items: flex-end;
}
.tick {
  flex: 1 1 0;
  min-width: 0;
  background: var(--ink-3);
  transition: height 300ms var(--ease), background-color 300ms var(--ease);
  transform-origin: bottom;
}
.tick { height: 100%; }
.tick[data-role='eastlink'] { background: color-mix(in srgb, var(--ink) 26%, var(--film)); }
.tick[data-role='pythian']  { background: color-mix(in srgb, var(--ink) 52%, var(--film)); }
.tick[data-role='shopliftr']{ background: var(--op); }
.tick[data-year-start='true'] { margin-left: 6px; }
.history__bar:hover .tick { opacity: 0.35; }
.history__bar .tick:hover { opacity: 1; }

.history__axis {
  display: flex; justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hairline);
  font-size: var(--step--1);
  color: var(--ink-3);
}
.legend { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; }
.legend li { display: flex; align-items: center; gap: 0.5rem; font-size: var(--step--1); color: var(--ink-2); }
.legend i { width: 10px; height: 10px; display: block; }
.legend i[data-role='eastlink'] { background: color-mix(in srgb, var(--ink) 34%, var(--film)); }
.legend i[data-role='pythian']  { background: color-mix(in srgb, var(--ink) 58%, var(--film)); }
.legend i[data-role='shopliftr']{ background: var(--op); }

/* ---------- tally ---------- */
.tally {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  border-top: 1px solid var(--hairline);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.tally > div { padding: 1.25rem 0 0.25rem; border-right: 1px solid var(--hairline); padding-right: 1rem; }
.tally > div:last-child { border-right: 0; }
.tally dd { font-size: var(--step-2); font-variation-settings: 'wdth' 108; font-weight: 700; line-height: 1.1; }
.tally dt { margin-top: 0.35rem; }

/* ---------- dot-leader index rows (drafting convention) ---------- */
.index { border-top: 1px solid var(--hairline); }
.index__row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hairline-2);
  text-decoration: none;
}
.index__row .leader {
  flex: 1;
  min-width: 1.5rem;
  height: 1px;
  align-self: center;
  background-image: radial-gradient(circle, var(--hairline) 1px, transparent 1px);
  background-size: 5px 1px;
  background-repeat: repeat-x;
}
.index__key { font-variation-settings: 'wdth' 92; font-weight: 600; }
.index__val { color: var(--ink-2); font-size: var(--step--1); white-space: nowrap; }
.index__sub {
  display: block;
  margin-top: 0.15rem;
  font-variation-settings: 'wdth' 88;
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--ink-3);
}
a.index__row { transition: color 200ms var(--ease); }
a.index__row:hover { color: var(--op); }
a.index__row:hover .index__val { color: var(--op); }

/* ---------- experience ---------- */
.roles { border-top: 1px solid var(--hairline); }
.role {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--hairline);
}
@media (max-width: 46rem) { .role { grid-template-columns: 1fr; gap: 0.85rem; } }
.role__when { font-size: var(--step--1); color: var(--ink-2); }
.role__org { display: block; margin-top: 0.35rem; font-variation-settings: 'wdth' 88; font-weight: 700; color: var(--ink); letter-spacing: 0.01em; }
.role__title { font-size: var(--step-1); font-variation-settings: 'wdth' 102; font-weight: 700; margin-bottom: 0.75rem; }
.role__points li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--ink-2);
  max-width: var(--measure);
}
.role__points li + li { margin-top: 0.6rem; }
.role__points li::before {
  content: '';
  position: absolute; left: 0; top: 0.68em;
  width: 0.7rem; height: 1px;
  background: var(--op);
}
.role--current .role__org::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 0.5rem;
  vertical-align: 0.15em;
  background: var(--op);
  border-radius: 50%;
}

/* ---------- capability gauges ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
.gauges { display: grid; gap: 1.1rem; }
.gauge__label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.4rem; }
.gauge__name { font-variation-settings: 'wdth' 90; font-weight: 600; font-size: var(--step--1); }
.gauge__num { font-size: var(--step--1); color: var(--ink-3); }
.gauge__track {
  position: relative;
  height: 6px;
  background: var(--hairline-2);
  overflow: hidden;
}
/* instrument tick marks across the track */
.gauge__track::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(90deg, var(--film) 0 1px, transparent 1px);
  background-size: 10% 100%;
  pointer-events: none;
}
.gauge__fill {
  height: 100%;
  width: 0;
  background: var(--op);
  transition: width 900ms var(--ease);
}
[data-level='90'] .gauge__fill { width: 90%; }
[data-level='80'] .gauge__fill { width: 80%; }
[data-level='75'] .gauge__fill { width: 75%; }
[data-level='70'] .gauge__fill { width: 70%; }
.js .gauges:not(.is-in) .gauge__fill { width: 0; }

/* ---------- toolbox ---------- */
.toolbox { display: grid; gap: 1.5rem; }
.toolgroup__name { margin-bottom: 0.5rem; }
.tools { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; }
.tools li { font-size: var(--step--1); color: var(--ink-2); }
.tools li[data-daily='true'] { color: var(--op); font-weight: 600; }

/* ---------- contact title block ---------- */
.titleblock {
  border: 1px solid var(--hairline);
  border-bottom: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}
.titleblock > div { padding: 1.5rem; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.titleblock > div:last-child { border-right: 0; }
.titleblock dd { margin-top: 0.4rem; font-variation-settings: 'wdth' 92; font-weight: 600; }
.titleblock a { text-decoration: none; border-bottom: 1px solid var(--hairline); transition: border-color 200ms var(--ease), color 200ms var(--ease); }
.titleblock a:hover { color: var(--op); border-color: var(--op); }

.copy {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0; margin-left: 0.5rem;
  background: none; border: 0; cursor: pointer;
  color: var(--ink-3);
  font-size: var(--step--1);
}
.copy:hover { color: var(--op); }
.copy svg { width: 0.8rem; height: 0.8rem; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2rem 3rem;
}
.footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.footer__meta { font-size: var(--step--1); color: var(--ink-3); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--op); }

/* ---------- entrance motion (progressive enhancement only) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

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

/* ---------- print: it is a drafting sheet, so let it print like one ---------- */
@media print {
  .masthead, .sheet-toggle, .actions, .copy { display: none !important; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .sheet { border: 0; max-width: none; }
  .section { padding-block: 1rem; break-inside: avoid; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 8pt; color: #555; }
}
