/* Shiv Rajora — personal site
   Direction A "Datasheet": dark ground, monospace labels, faint 48px grid, one LED-green accent. */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #0e1114;
  --bg-raised: #13171b;
  --grid: #171b1f;
  --line: #262b30;
  --line-strong: #3a4148;
  --text: #e4e7e4;
  --text-strong: #f2f4f2;
  --text-body: #d0d5d2;
  --text-muted: #aab2b8;
  --text-dim: #8b949e;
  --text-faint: #4d565e;
  --accent: #6fe08a;
  --accent-ink: #0e1114;
  --code: #c9d1d9;

  --sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --gutter: clamp(20px, 4.5vw, 64px);
  --section: clamp(48px, 6vw, 72px);
  --max: 1440px;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, p, dl, dd, figure { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

.mono { font-family: var(--mono); }

/* Labels */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.eyebrow-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Page frame */
.site {
  max-width: var(--max);
  margin: 0 auto;
}
.section {
  padding: var(--section) var(--gutter);
  border-bottom: 1px solid var(--line);
}
.section:last-child { border-bottom: 0; }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.led {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  flex: none;
}
.led-small {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.site-nav {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  padding-top: clamp(56px, 7vw, 96px);
}
.hero-copy {
  grid-column: 1 / 9;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  text-wrap: pretty;
}
.hero-sub {
  max-width: 640px;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--text-muted);
}
.meta {
  grid-column: 10 / 13;
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.meta > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.meta dt { text-transform: uppercase; letter-spacing: 0.04em; }
.meta dd { color: var(--text); text-align: right; }
.meta dd.is-accent { color: var(--accent); }
.meta a { border-bottom: 1px solid var(--line-strong); }

/* Featured project */
.featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin-top: 32px;
}
.featured-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  padding: 40px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
}
.featured-figure svg { width: min(420px, 100%); height: auto; }
.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}
.featured-body h2 {
  font-family: var(--mono);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.featured-body .lede {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* Spec table */
.spec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
}
.spec dt, .spec dd {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.spec dt { color: var(--text-dim); border-right: 1px solid var(--line); }
.spec dd { display: flex; align-items: center; gap: 8px; }
.spec dt:nth-last-of-type(1), .spec dd:nth-last-of-type(1) { border-bottom: 0; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-primary:hover { background: #8aeaa0; border-color: #8aeaa0; color: var(--accent-ink); }
.btn svg { width: 16px; height: 16px; }

/* Project index */
.index {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 14px;
}
.index-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr) 140px 120px;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.index-row.is-reserved { border-bottom-style: dashed; color: var(--text-faint); }
.index-num { color: var(--text-dim); }
.index-name { font-size: 18px; font-weight: 600; }
.index-desc, .index-year { color: var(--text-muted); }
.index-status { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.is-reserved .index-name { font-weight: 400; }
.is-reserved .index-desc, .is-reserved .index-year { color: inherit; }
.index-row.is-upcoming { border-bottom-style: dashed; }
.is-upcoming .index-name { color: var(--text-muted); font-weight: 500; }
.is-upcoming .index-status { color: var(--text-dim); }
.led-small.is-off { background: transparent; border: 1px solid var(--text-dim); }

/* Capability list on a project page */
.caps {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.caps li {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
}
.caps li > span:first-child { font-family: var(--mono); font-size: 13px; color: var(--text-dim); padding-top: 3px; }
.caps li > span:last-child { color: var(--text-body); }

/* About */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: clamp(64px, 7vw, 96px);
}
.about .eyebrow { grid-column: 1 / 3; }
.about-body {
  grid-column: 3 / 9;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--text-body);
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.links a { border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }

/* Project page */
.project-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  padding-top: clamp(48px, 5vw, 72px);
}
.project-head .hero-copy { gap: 20px; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
}
.back svg { width: 14px; height: 14px; }
.project-head h1 {
  font-family: var(--mono);
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.project-head .hero-sub { max-width: 680px; font-size: clamp(18px, 1.5vw, 22px); }

.photo {
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}
.photo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(240px, 30vw, 420px);
  background: var(--bg-raised);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.photo-frame img { width: 100%; height: auto; }
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.placeholder svg { width: 40px; height: 40px; }

.project-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}
.sidebar {
  grid-column: 1 / 4;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-self: start;
  position: sticky;
  top: 24px;
}
.facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.facts dl {
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
}
.facts dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--text-dim); }
.facts dd { text-align: right; }

.main-col {
  grid-column: 5 / 13;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.prose {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.prose p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-body);
  text-wrap: pretty;
}

.log { display: flex; flex-direction: column; gap: 24px; }
.log-entry {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.log-entry.is-next { border-top-style: dashed; color: var(--text-faint); }
.log-date { font-family: var(--mono); font-size: 13px; color: var(--text-dim); }
.is-next .log-date { color: inherit; }
.log-body { display: flex; flex-direction: column; gap: 14px; }
.log-body h3 {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-strong);
  text-wrap: pretty;
}
.is-next h3 { color: inherit; }
.log-body p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}
.is-next p { color: inherit; }

pre {
  margin: 0;
  padding: 20px 24px;
  overflow-x: auto;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--code);
}
code { font-family: var(--mono); }

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 1100px) {
  .index-row { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) 120px; }
  .index-year { display: none; }
}

@media (max-width: 900px) {
  .hero-copy, .project-head .hero-copy { grid-column: 1 / -1; }
  .meta { grid-column: 1 / -1; max-width: 420px; }
  .featured { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .featured-figure { min-height: 0; padding: 32px; }
  .about .eyebrow, .about-body { grid-column: 1 / -1; }
  .sidebar { grid-column: 1 / -1; position: static; flex-direction: row; flex-wrap: wrap; gap: 32px; }
  .facts { flex: 1 1 260px; }
  .main-col { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .index-row { grid-template-columns: 40px minmax(0, 1fr); row-gap: 6px; }
  .index-desc { grid-column: 2; }
  .index-status { grid-column: 2; }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec dt { border-right: 0; padding-bottom: 4px; border-bottom: 0; }
  .spec dd { padding-top: 4px; }
  .spec dt:nth-last-of-type(1) { border-bottom: 0; }
  .log-entry { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .caps li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, a { transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease; }
}
