/* Akshit Khandelwal — portfolio
   Typography-first, no JS, no webfonts, no build step.
   Fast load and clean semantics are the point; they are also the only
   frontend signal a backend engineer needs to send. */

:root {
  --bg: #fdfdfc;
  --surface: #f6f5f2;
  --text: #1a1a18;
  --muted: #6b6b64;
  --rule: #e3e2dd;
  --accent: #b45309;
  --accent-soft: #fdf3e7;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --surface: #1c1c17;
    --text: #e8e7e1;
    --muted: #9a998f;
    --rule: #2e2e27;
    --accent: #f59e0b;
    --accent-soft: #241c0c;
  }
}

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

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

body {
  margin: 0;
  padding: 0 1.5rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 4.5rem 0 6rem;
}

/* ---- Type ---- */

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

h2 {
  font-size: 0.8rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3.5rem 0 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1.1rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  background: var(--accent-soft);
}

.lede {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 40rem;
}

.tagline {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.muted {
  color: var(--muted);
}

/* ---- Header links ---- */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Project blocks ---- */

.project {
  margin-bottom: 3rem;
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.stack {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.5rem 0 0.9rem;
}

.project-links {
  font-family: var(--mono);
  font-size: 0.85rem;
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

figure {
  margin: 1.5rem 0;
}

figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* ---- Guarantee table ---- */

.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ---- Experience ---- */

.role {
  margin-bottom: 2rem;
}

.role-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.role-when {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

ul.tight {
  margin: 0;
  padding-left: 1.15rem;
}

ul.tight li {
  margin-bottom: 0.4rem;
}

/* ---- Writing list ---- */

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

.post-list li {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.post-list li:last-child {
  border-bottom: 0;
}

.post-list a {
  font-size: 1.05rem;
  font-weight: 500;
}

.post-list p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- Article ---- */

.back {
  font-family: var(--mono);
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 2.5rem;
}

article h2 {
  font-family: var(--sans);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  border-bottom: 0;
  padding-bottom: 0;
  margin: 2.5rem 0 0.8rem;
}

.dateline {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
}

@media (max-width: 34rem) {
  body {
    font-size: 16px;
    padding: 0 1.15rem;
  }
  .wrap {
    padding: 3rem 0 4rem;
  }
  h1 {
    font-size: 1.6rem;
  }
}
