/* ===========================================================
   Suhas Goravale Siddaramu — ML infrastructure
   An instrument console. Cockpit palette: cyan is nominal,
   amber is active. The thermal ramp (cyan → violet → magenta
   → amber) encodes recency everywhere it appears.
   =========================================================== */

:root {
  --void:    #070B14;
  --chassis: #0A101C;
  --panel:   #0D1422;
  --raised:  #121B2D;
  --grid:    #1B2537;
  --edge:    #26334A;

  --text:    #DCE6F7;
  --dim:     #8B9BB8;
  --faint:   #7C8AA4;

  --cyan:    #2EE6D6;
  --violet:  #7B5CFF;
  --magenta: #FF3D8B;
  --amber:   #FFB020;

  --run:  var(--cyan);
  --idle: var(--amber);
  --done: #7C8AA4;

  --shell: min(1320px, 100% - 2.5rem);
  --gap: 14px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: Saira, ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "wdth" 100, "wght" 400;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* faint chassis grid, so the background reads as equipment */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .28;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.skip {
  position: absolute; left: -9999px;
  padding: .6rem 1rem; background: var(--cyan); color: var(--void);
  font-weight: 600; z-index: 99;
}
.skip:focus { left: 1rem; top: 1rem; }

.mono, .status, .panel__meta, .panel__title {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* ─────────────  status bar  ───────────── */

.status {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  height: 42px; padding-inline: 1.25rem;
  background: color-mix(in srgb, var(--chassis) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge);
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim);
}

.status__group { display: flex; align-items: center; gap: .7rem; }
.status__group--end { gap: .55rem; }

.led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.status__state { color: var(--cyan); }
.status__sep { width: 1px; height: 12px; background: var(--edge); }
.status__host { color: var(--faint); }
.status__tz { color: var(--faint); }
.status__clock { color: var(--text); font-variant-numeric: tabular-nums; }

.status__nav { display: flex; gap: 1.35rem; }
.status__nav a { padding: .3rem 0; border-bottom: 1px solid transparent; transition: color .18s, border-color .18s; }
.status__nav a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

@media (max-width: 860px) {
  .status__nav { display: none; }
}
@media (max-width: 520px) {
  .status { font-size: .64rem; padding-inline: .9rem; }
  .status__host { display: none; }
}

/* ─────────────  console + panels  ───────────── */

.console {
  position: relative; z-index: 1;
  width: var(--shell); margin-inline: auto;
  padding-block: var(--gap) 3rem;
  display: grid; gap: var(--gap);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 4px;
  overflow: hidden;
}

.panel__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .5rem .9rem;
  background: var(--raised);
  border-bottom: 1px solid var(--edge);
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
}

.panel__title { color: var(--text); font-weight: 700; }
.panel__title::before { content: "▸ "; color: var(--cyan); }
.panel__meta { color: var(--faint); text-align: right; }

.panel__body { padding: 1.35rem; }

/* ─────────────  hero  ───────────── */

.ident__name {
  font-family: "JetBrains Mono", monospace;
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan);
}

.ident__thesis {
  margin-top: 1.1rem;
  font-size: clamp(1.9rem, 3.9vw, 3.1rem);
  font-variation-settings: "wdth" 88, "wght" 700;
  line-height: 1.02; letter-spacing: -.015em;
  text-wrap: balance;
}

.ident__thesis em {
  font-style: normal;
  color: var(--amber);
  font-variation-settings: "wdth" 70, "wght" 800;
}

.ident__lede {
  margin-top: 1.15rem; max-width: 52ch;
  color: var(--dim); font-size: .97rem;
}

.readout {
  margin-top: 1.7rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--edge);
  border: 1px solid var(--edge);
}

.readout__cell { padding: .8rem .9rem; background: var(--panel); }

.readout__cell dt {
  font-family: "JetBrains Mono", monospace;
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin-bottom: .3rem;
}
.readout__cell dd { font-size: .92rem; color: var(--text); line-height: 1.4; }

@media (min-width: 1040px) {
  .readout { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .readout { grid-template-columns: 1fr; }
}

/* ─────────────  signal path  ─────────────
   Colour carries meaning here: amber = something I built,
   violet = LLM work, cyan = the cluster, magenta = optimization. */

.pathwrap { overflow-x: auto; overscroll-behavior-x: contain; }

.path {
  width: 100%;
  min-width: 940px;          /* below this it stops being legible, so scroll instead */
  height: auto; display: block;
}

.path__divide { stroke: var(--edge); stroke-width: 1; stroke-dasharray: 2 4; }

.path__phase {
  fill: var(--faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
}

.path__wire { stroke: var(--edge); stroke-width: 1.5; fill: none; }
.path__tip  { fill: var(--edge); }

.path__box { fill: var(--raised); stroke: var(--edge); stroke-width: 1; }

.path__lbl {
  fill: var(--dim);
  font-family: Saira, ui-sans-serif, sans-serif;
  font-variation-settings: "wdth" 95, "wght" 500;
  font-size: 13px;
}

.path__sub {
  fill: var(--faint);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8.5px; letter-spacing: .08em;
  font-variation-settings: normal; font-weight: 400;
}

/* amber — tools I wrote */
.path__box.path__stage--mine,
.path__box.path__stage--obs  { fill: color-mix(in srgb, var(--amber) 14%, var(--raised)); stroke: var(--amber); }
.path__lbl.path__stage--mine,
.path__lbl.path__stage--obs  { fill: var(--amber); font-variation-settings: "wdth" 95, "wght" 700; }
.path__sub.path__stage--mine,
.path__sub.path__stage--obs  { fill: #FFC97A; }

/* violet — LLM work */
.path__box.path__stage--tune,
.path__box.path__stage--rag  { fill: color-mix(in srgb, var(--violet) 20%, var(--raised)); stroke: var(--violet); }
.path__lbl.path__stage--tune,
.path__lbl.path__stage--rag  { fill: #B9A8FF; font-variation-settings: "wdth" 95, "wght" 650; }
.path__sub.path__stage--tune,
.path__sub.path__stage--rag  { fill: #A899E8; }

/* cyan — the cluster */
.path__box.path__stage--live { fill: color-mix(in srgb, var(--cyan) 12%, var(--raised)); stroke: var(--cyan); }
.path__lbl.path__stage--live { fill: var(--cyan); font-variation-settings: "wdth" 95, "wght" 600; }
.path__sub.path__stage--live { fill: #7FD8D0; }

/* magenta — optimization */
.path__box.path__stage--opt  { fill: color-mix(in srgb, var(--magenta) 16%, var(--raised)); stroke: var(--magenta); }
.path__lbl.path__stage--opt  { fill: #FF8FB8; font-variation-settings: "wdth" 95, "wght" 650; }
.path__sub.path__stage--opt  { fill: #E88BAC; }

/* interactive diagram links & micro-interactions */
.path a {
  cursor: pointer;
  outline: none;
}
.path a .path__box {
  transition: transform .18s var(--ease), stroke .18s var(--ease), filter .18s var(--ease);
}
.path a:hover .path__box {
  filter: brightness(1.3);
  stroke-width: 1.5px;
}
.path a:hover .path__lbl {
  text-shadow: 0 0 10px currentColor;
}
.path a:focus-visible .path__box {
  stroke: var(--cyan);
  stroke-width: 2px;
}
.path__wire--dash {
  stroke-dasharray: 2 3;
}

/* ─────────────  job history  ───────────── */

.axis { position: relative; height: 1.3rem; border-bottom: 1px solid var(--edge); }

.axis__tick {
  position: absolute; bottom: .22rem; transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: .62rem; color: var(--faint);
}
.axis__tick::after {
  content: ""; position: absolute; left: 50%; bottom: -.28rem;
  width: 1px; height: .25rem; background: var(--edge);
}

.role { padding: 1.3rem 0; border-bottom: 1px solid var(--grid); }
.role:last-child { border-bottom: 0; padding-bottom: .3rem; }

.role__head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .8rem; align-items: baseline;
}

.role__led {
  width: 8px; height: 8px; border-radius: 50%;
  transform: translateY(-1px);
}
.role--live .role__led { box-shadow: 0 0 10px currentColor; }

.role__title {
  font-size: 1.08rem;
  font-variation-settings: "wdth" 92, "wght" 650;
  letter-spacing: -.005em; line-height: 1.25;
}

.role__org { margin-top: .1rem; font-size: .88rem; color: var(--dim); }
.role__where { color: var(--faint); }

.role__time { text-align: right; display: flex; flex-direction: column; }

.role__dates, .role__elapsed {
  font-family: "JetBrains Mono", monospace;
  font-size: .68rem; color: var(--faint); white-space: nowrap;
}

.role__track {
  position: relative; height: 5px; margin: .95rem 0 1rem;
  background: var(--grid); border-radius: 1px;
}

.role__span {
  position: absolute; top: 0; bottom: 0; border-radius: 1px;
  transform-origin: left center;
  animation: grow .75s var(--ease) both;
  box-shadow: 0 0 10px -1px currentColor;
}
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.role__notes { display: grid; gap: .42rem; max-width: 90ch; }

.role__notes li {
  position: relative; padding-left: 1.05rem;
  font-size: .89rem; color: var(--dim);
}
.role__notes li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 1px; background: var(--faint);
}

/* student entry: present and dated, but never competing */
.role--minor { padding: .95rem 0; opacity: .72; }
.role--minor .role__title {
  font-size: .95rem;
  font-variation-settings: "wdth" 92, "wght" 500;
  color: var(--dim);
}
.role--minor .role__org { font-size: .82rem; color: var(--faint); }
.role--minor .role__track { height: 3px; margin: .75rem 0 .2rem; }
.role--minor .role__span { box-shadow: none; }
.role--minor:hover { opacity: 1; }

@media (max-width: 700px) {
  .role__head { grid-template-columns: auto minmax(0, 1fr); }
  .role__time { grid-column: 2; text-align: left; flex-direction: row; gap: .6rem; }
}

/* ─────────────  job queue  ───────────── */

.qhead, .job {
  display: grid;
  grid-template-columns: 3.4rem 10.5rem minmax(0, 1fr) 6rem 7rem 5.5rem;
  gap: 1rem; align-items: baseline;
}

.qhead {
  padding: 0 0 .6rem;
  border-bottom: 1px solid var(--edge);
  font-family: "JetBrains Mono", monospace;
  font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint);
}

.job {
  padding: .85rem 0;
  border-bottom: 1px solid var(--grid);
  position: relative; isolation: isolate;
}

.job::before {
  content: ""; position: absolute; left: -.7rem; right: -.7rem; top: 0; bottom: 0;
  background: var(--raised); opacity: 0; z-index: -1;
  transition: opacity .16s var(--ease);
}
.job:hover::before, .job:focus-visible::before, .job.is-hot::before { opacity: 1; }

.job__id {
  font-family: "JetBrains Mono", monospace;
  font-size: .7rem; color: var(--faint);
  display: flex; align-items: center; gap: .45rem;
}
.job__swatch { width: 7px; height: 7px; border-radius: 1px; flex: none; }

.job__name {
  font-variation-settings: "wdth" 95, "wght" 650;
  font-size: 1rem; line-height: 1.3;
}
.job:hover .job__name { color: var(--cyan); }

.job__what { font-size: .87rem; color: var(--dim); line-height: 1.5; }

.job__lang, .job__when {
  font-family: "JetBrains Mono", monospace;
  font-size: .68rem; color: var(--faint);
}
.job__when { text-align: right; }

.job__state {
  font-family: "JetBrains Mono", monospace;
  font-size: .62rem; letter-spacing: .1em;
  display: inline-flex; align-items: center; gap: .4rem;
}

.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.dot--run  { background: var(--run);  box-shadow: 0 0 7px var(--run); }
.dot--idle { background: var(--idle); }
.dot--done { background: var(--done); }

.state--run  { color: var(--run); }
.state--idle { color: var(--idle); }
.state--done { color: var(--done); }

.qlegend {
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem;
  margin-top: 1.1rem; padding-top: .9rem;
  border-top: 1px solid var(--grid);
  font-family: "JetBrains Mono", monospace;
  font-size: .64rem; color: var(--faint);
}
.qlegend span { display: inline-flex; align-items: center; gap: .45rem; }

@media (max-width: 1080px) {
  .qhead { display: none; }
  .job {
    grid-template-columns: 2.8rem minmax(0, 1fr) 7rem;
    gap: .4rem .9rem;
  }
  .job__id { grid-row: 1; }
  .job__name { grid-row: 1; }
  .job__state { grid-row: 1; justify-content: flex-end; }
  .job__what { grid-column: 2 / -1; }
  .job__lang { grid-column: 2 / -1; }
  .job__when { grid-column: 2 / -1; text-align: left; }
}
@media (max-width: 520px) {
  .job { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .job__state { grid-column: 2 / -1; grid-row: auto; justify-content: flex-start; }
}

/* ─────────────  archive  ───────────── */

.archive {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1px; background: var(--edge); border: 1px solid var(--edge);
}

.arch {
  display: flex; justify-content: space-between; align-items: baseline; gap: .8rem;
  padding: .75rem .9rem; background: var(--panel);
  font-family: "JetBrains Mono", monospace; font-size: .74rem;
  color: var(--dim); transition: background .16s, color .16s;
}
.arch:hover { background: var(--raised); color: var(--cyan); }
.arch__year { color: var(--faint); font-size: .68rem; }

/* ─────────────  stack  ───────────── */

.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 1.8rem 1.6rem; }

.stack__name {
  font-family: "JetBrains Mono", monospace;
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan);
  padding-bottom: .55rem; margin-bottom: .8rem;
  border-bottom: 1px solid var(--edge);
}

.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chips li {
  padding: .24rem .55rem;
  background: var(--raised); border: 1px solid var(--edge); border-radius: 2px;
  font-size: .8rem; color: var(--dim);
}

/* ─────────────  education  ───────────── */

.edu { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }

.edu__list { display: grid; gap: 1px; background: var(--edge); border: 1px solid var(--edge); }

.degree {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1rem;
  padding: .9rem 1rem; background: var(--panel);
}
.degree__title { font-variation-settings: "wdth" 95, "wght" 600; font-size: .97rem; }
.degree__where { grid-column: 1; font-size: .84rem; color: var(--dim); }
.degree__when {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font-family: "JetBrains Mono", monospace; font-size: .68rem; color: var(--faint);
  white-space: nowrap;
}

.langs { display: grid; gap: .5rem; }
.langs li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--grid);
  font-size: .88rem; color: var(--dim);
}
.langs b {
  font-family: "JetBrains Mono", monospace; font-size: .68rem;
  font-weight: 500; color: var(--faint);
}

@media (max-width: 760px) { .edu { grid-template-columns: 1fr; } }

/* ─────────────  contact  ───────────── */

.panel--contact { border-color: var(--edge); }

/* copy on the left, actions on the right, vertically centred
   against the whole block rather than trailing under the text */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 3rem;
  align-items: center;
}

.contact__head {
  grid-column: 1; grid-row: 1;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  font-variation-settings: "wdth" 90, "wght" 700;
  line-height: 1.08; letter-spacing: -.015em; max-width: 20ch;
}

.contact__note {
  grid-column: 1; grid-row: 2;
  margin-top: .9rem; max-width: 46ch; color: var(--dim); font-size: .95rem;
}

.links {
  grid-column: 2; grid-row: 1 / span 2;
  display: flex; flex-wrap: wrap; gap: .6rem;
  justify-content: flex-end;
}

.links a {
  display: inline-block; padding: .58rem 1.2rem;
  border: 1px solid var(--cyan); color: var(--cyan); border-radius: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  transition: background .16s, color .16s, box-shadow .16s;
}
.links a:hover {
  background: var(--cyan); color: var(--void);
  box-shadow: 0 0 18px -4px var(--cyan);
}

@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
  .links { grid-column: 1; grid-row: auto; margin-top: 1.6rem; justify-content: flex-start; }
}

/* ─────────────  footer  ───────────── */

.foot {
  position: relative; z-index: 1;
  width: var(--shell); margin: 0 auto; padding-block: 1.4rem 2.2rem;
  border-top: 1px solid var(--grid);
  font-family: "JetBrains Mono", monospace;
  font-size: .66rem; color: var(--faint);
}

/* ─────────────  motion  ───────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .cell { opacity: 1; transform: none; }
}
