/* ============================================================
   soumyakishormishra — personal site
   Single stylesheet. No JS. System fonts for instant load.
   ============================================================ */

:root {
  --bg:          oklch(0.992 0.004 95);
  --surface:     oklch(1 0 0);
  --fg:          oklch(0.24 0.012 264);
  --muted:       oklch(0.55 0.012 264);
  --faint:       oklch(0.70 0.010 264);
  --border:      oklch(0.92 0.006 264);
  --accent:      oklch(0.55 0.14 250);
  --accent-soft: oklch(0.55 0.14 250 / 0.10);
  --selection:   oklch(0.55 0.14 250 / 0.16);

  --maxw: 40rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code",
          Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          oklch(0.18 0.008 264);
    --surface:     oklch(0.21 0.009 264);
    --fg:          oklch(0.92 0.006 264);
    --muted:       oklch(0.66 0.012 264);
    --faint:       oklch(0.50 0.012 264);
    --border:      oklch(0.30 0.010 264);
    --accent:      oklch(0.74 0.125 250);
    --accent-soft: oklch(0.74 0.125 250 / 0.14);
    --selection:   oklch(0.74 0.125 250 / 0.22);
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
::selection { background: var(--selection); }

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 1.5rem 5rem;
}

/* ---------- links ---------- */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- headings / type ---------- */
h1, h2, h3 { line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; }

.head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.head-photo {
  flex-shrink: 0;
  width: clamp(3.4rem, 9vw, 4.4rem);
  height: clamp(3.4rem, 9vw, 4.4rem);
  border-radius: 50%;
  object-fit: cover;
}

.name {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  letter-spacing: -0.035em;
}
.role {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.lede { margin-top: 2rem; }
.lede p { color: var(--fg); text-wrap: pretty; }
.lede p:not(:first-child) { margin-top: 1.1rem; }

/* ---------- contact / links row ---------- */
.links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: 0.95rem;
}
.links a { color: var(--muted); display: inline-flex; align-items: center; gap: 0.4rem; }
.links a:hover { color: var(--accent); }

/* ---------- section heading ---------- */
.section-label {
  margin: 4rem 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ---------- certifications ---------- */
.certs {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.certs li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 7.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.certs li a:hover { color: var(--accent); text-decoration: none; }
.certs li img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
}

/* ---------- post list ---------- */
.posts { list-style: none; padding: 0; display: flex; flex-direction: column; }
.posts li { border-bottom: 1px solid var(--border); }

.post-link {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  padding: 1.25rem 0;
  color: inherit;
}
.post-link:hover { text-decoration: none; }
.post-link:hover .post-title { color: var(--accent); }

.post-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
  white-space: nowrap;
  padding-top: 0.15rem;
}
.post-body { min-width: 0; display: flex; flex-direction: column; }
.post-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.12s ease;
}
.post-desc {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-wrap: pretty;
}

@media (max-width: 34rem) {
  .post-link { grid-template-columns: 1fr; gap: 0.3rem; }
  .post-date { padding-top: 0; }
}

/* ---------- open-to-work callout ---------- */
.callout {
  margin-top: 4rem;
  padding: 1.75rem 1.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.callout .pill {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}
.callout-message {
  font-size: 1.0625rem;
  color: var(--fg);
  text-wrap: pretty;
}
.callout-links {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.callout-links a { color: var(--accent); }

/* ---------- footer ---------- */
.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ============================================================
   Article (blog post) pages
   ============================================================ */
.back {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.back:hover { color: var(--accent); }

.article-head { margin-top: 2.5rem; }
.article-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
  letter-spacing: 0.02em;
}
.article-title {
  margin-top: 0.75rem;
  font-size: clamp(1.7rem, 4.5vw, 2.25rem);
  letter-spacing: -0.03em;
}
.article-desc {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--muted);
  text-wrap: pretty;
}

.article {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.article p { text-wrap: pretty; }
.article h2 { font-size: 1.35rem; margin-top: 1.5rem; }
.article h3 { font-size: 1.1rem; margin-top: 1rem; }
.article ul, .article ol { padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.article li { padding-left: 0.25rem; }
.article blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--muted);
  font-style: italic;
}
.article code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--accent-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.article pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
}
.article pre code { background: none; padding: 0; }
.article hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.article a { text-decoration: underline; text-underline-offset: 3px; }

.article figure { display: flex; flex-direction: column; gap: 0.6rem; }
.article img {
  max-width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.article figcaption {
  font-size: 0.85rem;
  color: var(--faint);
  text-align: center;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.article th, .article td {
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.article th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article tbody tr:last-child td { border-bottom: none; }

.article kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
}
