/*
 * Arshdeep Singh — Architectural Monochrome
 * One 768px column between vertical hairlines, full-bleed horizontal rules,
 * diagonal hatched band separators, and pure zinc OKLCH tokens.
 */

:root {
  color-scheme: light dark;
  --bg: light-dark(oklch(1 0 0), oklch(0.085 0 0));
  --fg: light-dark(oklch(0.14 0 0), oklch(0.97 0 0));
  --muted-bg: light-dark(oklch(0.968 0 0), oklch(0.14 0 0));
  --muted-fg: light-dark(oklch(0.49 0 0), oklch(0.67 0 0));
  --faint: light-dark(oklch(0.84 0 0), oklch(0.32 0 0));
  --edge: light-dark(oklch(0.90 0 0), oklch(0.22 0 0));
  --hover: light-dark(oklch(0.985 0 0), oklch(0.115 0 0));
  --plate-bg: light-dark(oklch(0.99 0 0), oklch(0.10 0 0));
  --dot: light-dark(oklch(0.14 0 0 / 0.075), oklch(0.97 0 0 / 0.08));
  --hatch: light-dark(oklch(0.89 0 0 / 0.78), oklch(0.24 0 0 / 0.85));

  --lv0: light-dark(oklch(0.955 0 0), oklch(0.16 0 0));
  --lv1: light-dark(oklch(0.85 0 0), oklch(0.30 0 0));
  --lv2: light-dark(oklch(0.68 0 0), oklch(0.48 0 0));
  --lv3: light-dark(oklch(0.48 0 0), oklch(0.68 0 0));
  --lv4: light-dark(oklch(0.22 0 0), oklch(0.90 0 0));

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --col: 768px;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
:root:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }

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

html {
  scroll-padding-top: 64px;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.sprite { position: absolute; width: 0; height: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon-fill { fill: currentColor; stroke: none; }

/* Theme icon visibility */
.icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .icon-moon { display: none; }
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .icon-sun { display: block; }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .icon-moon { display: none; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .icon-sun { display: block; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--edge);
}
.header-bar {
  max-width: var(--col);
  margin-inline: auto;
  border-inline: 1px solid var(--edge);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  text-decoration: none;
}
.brand:hover { background: var(--muted-bg); }
.brand-mark {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-right: auto;
  margin-left: 8px;
}
.site-nav a {
  font-size: 13.5px;
  color: var(--muted-fg);
  text-decoration: none;
  transition: color 120ms ease;
}
.site-nav a:hover { color: var(--fg); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--muted-bg);
  color: var(--muted-fg);
  font: 400 12.5px/1 var(--font-sans);
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.search-trigger:hover { color: var(--fg); border-color: var(--faint); }
.search-kbd {
  font: 500 11px/1 var(--font-mono);
  color: var(--muted-fg);
}
.v-sep {
  width: 1px;
  height: 16px;
  background: var(--edge);
  margin-inline: 2px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-fg);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.icon-btn:hover { background: var(--muted-bg); color: var(--fg); }

/* Column + Full-Bleed Architectural Hairlines */
.shell { padding-inline: 16px; }
.container {
  max-width: var(--col);
  margin-inline: auto;
  border-inline: 1px solid var(--edge);
}

.profile,
.overview,
.social,
.panel,
.separator,
.site-footer {
  position: relative;
}
.profile::after,
.overview::after,
.social::after,
.panel::after,
.separator::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100vw;
  transform: translateX(-50%);
  border-bottom: 1px solid var(--edge);
  pointer-events: none;
}

/* Hatched Band Separator */
.separator {
  height: 30px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--hatch) 0,
    var(--hatch) 1px,
    transparent 1px,
    transparent 8px
  );
}

/* Profile Block */
.profile {
  display: grid;
  grid-template-columns: 144px 1fr;
}
.profile-avatar {
  padding: 6px;
  border-right: 1px solid var(--edge);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar {
  display: block;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--edge);
  filter: grayscale(15%);
}
.profile-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.profile-plate {
  flex: 1;
  min-height: 54px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--edge);
  background:
    radial-gradient(var(--dot) 1px, transparent 1px) 0 0 / 12px 12px,
    var(--plate-bg);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.profile-name {
  margin: 0;
  padding: 6px 18px 2px;
  font-size: clamp(1.75rem, 3.2vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.profile-role {
  margin: 0;
  padding: 4px 18px 14px;
  font-size: 14px;
  color: var(--muted-fg);
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mono-dim { font: 400 12px/1 var(--font-mono); color: var(--muted-fg); }
.mono-meta { font: 400 12px/1.4 var(--font-mono); color: var(--muted-fg); }
.muted { color: var(--muted-fg); }
.at { color: var(--muted-fg); margin-inline: 2px; }

/* Overview */
.overview-lead {
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.overview-grid {
  padding: 0 18px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
.intro-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.intro-item p {
  margin: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: var(--muted-bg);
  color: var(--muted-fg);
  flex: none;
}
.copy-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
}
.copy-link:hover { text-decoration-color: var(--fg); }

/* Elsewhere Grid */
.social-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.social-grid li { border-right: 1px solid var(--edge); }
.social-grid li:last-child { border-right: 0; }
.social-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  text-decoration: none;
  transition: background 120ms ease;
}
.social-item:hover { background: var(--hover); }
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--muted-bg);
  flex: none;
}
.social-text { display: flex; flex-direction: column; min-width: 0; }
.social-title { font-size: 14px; font-weight: 500; line-height: 1.25; }
.social-handle { font: 400 12px/1.3 var(--font-mono); color: var(--muted-fg); }
.social-arrow { margin-left: auto; color: var(--muted-fg); }

/* Panels */
.panel-header {
  padding: 10px 18px;
  border-bottom: 1px solid var(--edge);
}
.panel-header-split {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.panel-title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 1.875rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.panel-title sup {
  margin-left: 4px;
  font: 400 13.5px/1 var(--font-mono);
  letter-spacing: 0;
  color: var(--muted-fg);
  vertical-align: super;
}
.count {
  font: 400 13.5px/1 var(--font-mono);
  letter-spacing: 0;
  color: var(--muted-fg);
}
.header-link {
  font: 400 12.5px/1 var(--font-mono);
  color: var(--muted-fg);
  text-decoration: none;
}
.header-link:hover { color: var(--fg); text-decoration: underline; }

.panel-content { padding: 18px; }
.prose p {
  margin: 0;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg);
  text-wrap: pretty;
}
.prose p + p { margin-top: 12px; color: var(--muted-fg); }
.prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 1px 5px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: var(--muted-bg);
  color: var(--fg);
}

/* Contributions Plate */
.plate-dot {
  background:
    radial-gradient(var(--dot) 1px, transparent 1px) 0 0 / 14px 14px,
    var(--plate-bg);
}
.hm-scroll { overflow-x: auto; padding-bottom: 4px; }
.hm-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  width: max-content;
}
.hm-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  cursor: crosshair;
}
.hm-cell:hover { outline: 1px solid var(--fg); outline-offset: 1px; }
.lv0 { background: var(--lv0); }
.lv1 { background: var(--lv1); }
.lv2 { background: var(--lv2); }
.lv3 { background: var(--lv3); }
.lv4 { background: var(--lv4); }
.hm-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font: 400 12px/1 var(--font-mono);
  color: var(--muted-fg);
}
.hm-legend { display: inline-flex; align-items: center; gap: 4px; }
.hm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }

/* Shipped Product Telemetry Plate (CUIMS Clear) */
.telem-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--edge);
}
.telem-kpi {
  padding: 13px 16px;
  border-right: 1px solid var(--edge);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.telem-kpi:last-child { border-right: 0; }
.telem-val {
  font: 600 18px/1.15 var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.telem-key {
  font-size: 12.5px;
  color: var(--fg);
}
.telem-sub {
  font: 400 11px/1.3 var(--font-mono);
  color: var(--muted-fg);
}

.telem-body {
  display: grid;
  grid-template-columns: 1.48fr 1fr;
}
.telem-chart-col {
  padding: 14px 16px 12px;
  border-right: 1px solid var(--edge);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.telem-chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
}
.telem-svg {
  width: 100%;
  height: 132px;
  display: block;
  overflow: visible;
}
.telem-break-col {
  display: flex;
  flex-direction: column;
}
.break-block {
  padding: 11px 16px;
  border-bottom: 1px solid var(--edge);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.break-block:last-child { border-bottom: 0; }
.break-title {
  display: flex;
  justify-content: space-between;
  font: 500 11.5px/1 var(--font-mono);
  color: var(--muted-fg);
  margin-bottom: 2px;
}
.bar-row {
  display: grid;
  grid-template-columns: 78px 1fr 34px;
  align-items: center;
  gap: 8px;
  font: 400 11.5px/1 var(--font-mono);
}
.bar-lbl { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track {
  height: 5px;
  background: var(--muted-bg);
  border: 1px solid var(--edge);
  border-radius: 999px;
  overflow: hidden;
  display: block;
}
.bar-track i {
  display: block;
  height: 100%;
  background: var(--fg);
}
.bar-val { text-align: right; color: var(--muted-fg); font-variant-numeric: tabular-nums; }

/* Flush Expandable Entries (OSS + Projects) */
.entries { display: flex; flex-direction: column; }
details.entry { border-bottom: 1px solid var(--edge); }
details.entry:last-child { border-bottom: 0; }
details.entry summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: background 120ms ease;
}
details.entry summary::-webkit-details-marker { display: none; }
details.entry summary:hover { background: var(--hover); }
.entry-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.entry-title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.entry-title { font-weight: 500; font-size: 15px; }
.entry-meta { font: 400 12px/1.3 var(--font-mono); color: var(--muted-fg); }
.entry-sub { font-size: 13.5px; color: var(--muted-fg); }
.entry-right { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.entry-chev { color: var(--muted-fg); transition: transform 160ms ease; }
details.entry[open] .entry-chev { transform: rotate(180deg); }

.entry-body {
  padding: 0 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entry-bullets {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  color: var(--muted-fg);
}
.entry-bullets li strong { color: var(--fg); font-weight: 500; }
.pr-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pr-links a {
  font: 400 12.5px/1.45 var(--font-mono);
  color: var(--muted-fg);
  text-decoration: none;
}
.pr-links a:hover { color: var(--fg); text-decoration: underline; }
.pr-links .pr-id { color: var(--fg); margin-right: 6px; }

.entry-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font: 400 11.5px/1 var(--font-mono);
  padding: 4px 8px;
  border: 1px solid var(--edge);
  border-radius: 5px;
  background: var(--muted-bg);
  color: var(--muted-fg);
}
.ext-links { display: flex; gap: 12px; font: 400 12px/1 var(--font-mono); }
.ext-links a { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.ext-links a:hover { text-decoration-color: var(--fg); }

/* Stack */
.stack-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.stack-group h3 {
  margin: 0 0 8px;
  font: 500 12px/1 var(--font-mono);
  color: var(--muted-fg);
}

/* Honors */
.honors-list { list-style: none; margin: 0; padding: 0; }
.honors-list li {
  padding: 13px 18px;
  border-bottom: 1px solid var(--edge);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
}
.honors-list li:last-child { border-bottom: 0; }
.honor-title { font-weight: 500; font-size: 14.5px; }
.honor-detail { width: 100%; font-size: 13.5px; color: var(--muted-fg); }

/* Footer */
.site-footer {
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-fg);
}
.site-footer kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 4px;
  border: 1px solid var(--edge);
  border-radius: 4px;
}

/* Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  padding: 8px 12px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  font: 400 12.5px/1 var(--font-mono);
}

/* Native Command Menu */
dialog#cmdk {
  width: min(540px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 24px 48px -16px oklch(0 0 0 / 0.35);
}
dialog#cmdk:modal { overscroll-behavior: contain; }
dialog#cmdk::backdrop {
  background: oklch(0 0 0 / 0.4);
  overflow: hidden;
  overscroll-behavior: contain;
}
.cmdk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--edge);
  color: var(--muted-fg);
}
#cmdk-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: 400 14.5px/1.4 var(--font-sans);
}
.cmdk-esc {
  padding: 4px 7px;
  border: 1px solid var(--edge);
  border-radius: 5px;
  background: var(--muted-bg);
  color: var(--muted-fg);
  font: 500 11px/1 var(--font-mono);
  cursor: pointer;
}
.cmdk-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.cmdk-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13.5px;
}
.cmdk-list a:hover, .cmdk-list a:focus-visible { background: var(--muted-bg); outline: none; }

@media (max-width: 680px) {
  .shell { padding-inline: 0; }
  .container, .header-bar { border-inline: 0; }
  .site-nav { display: none; }
  .profile { grid-template-columns: 104px 1fr; }
  .avatar { width: 92px; height: 92px; }
  .overview-grid, .social-grid, .stack-groups, .telem-body { grid-template-columns: 1fr; }
  .telem-kpis { grid-template-columns: 1fr 1fr; }
  .telem-kpi:nth-child(2) { border-right: 0; }
  .telem-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--edge); }
  .telem-chart-col { border-right: 0; border-bottom: 1px solid var(--edge); }
  .social-grid li { border-right: 0; border-bottom: 1px solid var(--edge); }
  .social-grid li:last-child { border-bottom: 0; }
}
