/* =================================================================
   parth-panchal.in
   Palette derives from the existing site base (#0b0e26) and reads as
   a scheduler console: deep indigo field, amber signal light, mint
   for completed runs.
   ================================================================= */

:root {
  --ink:        #0b0e26;
  --ink-raised: #12163a;
  --rail:       #2a3068;
  --rail-soft:  #1c2150;
  --paper:      #e9eaf6;
  --muted:      #8b92c2;
  --signal:     #ffb454;   /* running / in flight */
  --ok:         #5fd4b0;   /* shipped */
  --dim:        #6a70a0;   /* archived */

  --display: "Archivo", system-ui, sans-serif;
  --body:    "Source Serif 4", Georgia, serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --edge:   clamp(1.25rem, 7vw, 6rem);
  --rail-x: 0px;          /* rail offset, set at breakpoint */
  --measure: 34rem;
}

@media (min-width: 720px) {
  :root { --rail-x: 2.25rem; }
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

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

/* ---------- shell + the rail (signature element) ---------------- */

.shell {
  max-width: 74rem;
  margin: 0;
  padding: 0 var(--gutter) 6rem var(--edge);
  position: relative;
}

.shell::before {
  content: "";
  position: absolute;
  left: calc(var(--edge) + var(--rail-x));
  top: 0;
  bottom: 6rem;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0,
    var(--rail) 3rem,
    var(--rail) calc(100% - 8rem),
    transparent 100%
  );
}

/* a docked block: sits to the right of the rail with a node marker */
.dock {
  position: relative;
  padding-left: calc(var(--rail-x) + 1.5rem);
  padding-top: 3.5rem;
}

.dock::before {
  content: "";
  position: absolute;
  left: calc(var(--rail-x) - 3px);
  top: 4rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid var(--rail);
}

.dock--live::before {
  background: var(--signal);
  border-color: var(--signal);
  box-shadow: 0 0 0 4px rgba(255, 180, 84, .12);
}

/* ---------- type ------------------------------------------------ */

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: -.015em;
  line-height: 1.08;
  margin: 0 0 .75rem;
}

h1 { font-size: clamp(2.1rem, 6.5vw, 3.6rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
h3 { font-size: 1.1rem; font-stretch: 108%; }

.lede {
  font-size: 1.15rem;
  color: var(--paper);
  max-width: var(--measure);
  margin: 0 0 1.5rem;
}

p, li { max-width: var(--measure); }
p { margin: 0 0 1.1rem; }

a { color: var(--paper); text-decoration-color: var(--rail); text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--signal); }

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

/* ---------- masthead + nav -------------------------------------- */

.masthead {
  padding: 2.25rem 0 0 calc(var(--rail-x) + 1.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.masthead__name {
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .01em;
  text-decoration: none;
}

.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.nav a {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav a:hover, .nav a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--signal);
}

/* ---------- run rows (projects + tools) ------------------------- */

.rows { list-style: none; margin: 0; padding: 0; }

.row {
  border-top: 1px solid var(--rail-soft);
  padding: 1.35rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .4rem;
}

.rows > .row:last-child { border-bottom: 1px solid var(--rail-soft); }

@media (min-width: 760px) {
  .row {
    grid-template-columns: 8.5rem 1fr;
    gap: .4rem 2rem;
    align-items: baseline;
  }
  .row__meta { grid-row: span 3; }
}

.row__meta {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--muted);
  letter-spacing: .04em;
  padding-top: .3rem;
}

.row__title {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0;
}

.row__title a { text-decoration: none; }
.row__title a:hover { text-decoration: underline; text-decoration-color: var(--signal); }

.row__note { margin: 0; color: var(--muted); font-size: .98rem; }

/* status chip — encodes run state, not decoration */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.chip--live     { color: var(--signal); }
.chip--shipped  { color: var(--ok); }
.chip--archived { color: var(--dim); }

.chip--live::before { animation: pulse 2.4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* ---------- stack tags ------------------------------------------ */

.stack { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; padding: 0; list-style: none; }

.stack li {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .04em;
  color: var(--muted);
  border: 1px solid var(--rail-soft);
  border-radius: 2px;
  padding: .15rem .45rem;
}

/* ---------- prose (project write-ups, resume) ------------------- */

.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; color: var(--paper); }
.prose ul, .prose ol { padding-left: 1.15rem; }
.prose li { margin-bottom: .4rem; }

.prose code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--ink-raised);
  border: 1px solid var(--rail-soft);
  border-radius: 2px;
  padding: .08em .32em;
}

.prose pre {
  background: var(--ink-raised);
  border: 1px solid var(--rail-soft);
  border-radius: 3px;
  padding: 1rem;
  overflow-x: auto;
  max-width: 100%;
}

.prose pre code { border: 0; background: none; padding: 0; }

.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--signal);
  color: var(--muted);
}

hr { border: 0; border-top: 1px solid var(--rail-soft); margin: 2.5rem 0; }

/* ---------- resume ---------------------------------------------- */

.cv__entry { margin-bottom: 2rem; }

.cv__head {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  max-width: var(--measure);
}

.cv__when {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--muted);
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ---------- buttons / form -------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--signal);
  padding: .6rem 1.1rem;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--rail);
}

.btn--ghost:hover { border-color: var(--signal); filter: none; }

.form { max-width: var(--measure); margin-top: 1.5rem; }

.form label {
  display: block;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.1rem 0 .35rem;
}

.form input, .form textarea {
  width: 100%;
  background: var(--ink-raised);
  border: 1px solid var(--rail-soft);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--body);
  font-size: 1rem;
  padding: .6rem .7rem;
}

.form input:focus, .form textarea:focus { border-color: var(--signal); outline: none; }
.form textarea { min-height: 8rem; resize: vertical; }
.form .btn { margin-top: 1.4rem; }

/* ---------- footer ---------------------------------------------- */

.foot {
  margin-top: 5rem;
  padding: 1.5rem 0 0 calc(var(--rail-x) + 1.5rem);
  border-top: 1px solid var(--rail-soft);
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
}

.foot a { color: var(--muted); }
.foot a:hover { color: var(--paper); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: .5rem;
  z-index: 10;
  background: var(--signal);
  color: var(--ink);
  padding: .5rem .8rem;
  font-family: var(--mono);
  font-size: .8rem;
}
