/* ═══════════════════════════════════════════════════
   style.css — Uday Sharma personal website
   ═══════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=JetBrains+Mono:wght@400;500&display=swap");

/* ── Design Tokens ──────────────────────────────── */
:root {
  --bg: #f9f7f4;
  --bg-alt: #f2efe9;
  --fg: #111010;
  --muted: #5c5b57;
  --subtle: #9b9890;
  --accent: #c96442;
  --accent-dim: #e8cfc5;
  --border: #e5e2dc;
  --code-bg: #edebe6;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --max-w: 660px;
  --nav-h: 56px;
  --radius: 4px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ── Reset ──────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
ul,
ol {
  list-style: none;
}
a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--border);
  transition:
    color 0.15s var(--ease),
    text-decoration-color 0.15s var(--ease);
}
a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 48px);
}
.nav-name {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: 0.01em;
}
.nav-name:hover {
  color: var(--accent);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--fg);
}
.nav-links a.active {
  color: var(--fg);
  font-weight: 500;
}
.nav-links a.resume-link {
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.nav-links a.resume-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Container ───────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px clamp(20px, 5vw, 0px) 96px;
}

/* ── Section ─────────────────────────────────────── */
.section {
  margin-bottom: 56px;
}
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 20px;
  display: block;
}

/* ── About / Hero ────────────────────────────────── */
.about-hero {
  margin-bottom: 40px;
}
.about-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.about-tagline {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}
.about-tagline .accent {
  color: var(--accent);
  font-weight: 500;
}

.about-bio p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-bio p:last-child {
  margin-bottom: 0;
}
.about-bio a {
  color: var(--fg);
  text-decoration-color: var(--accent-dim);
}
.about-bio a:hover {
  color: var(--accent);
}

/* ── Currently ───────────────────────────────────── */
.currently {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 36px 0;
}
.currently-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 14px;
}
.currently-row:last-child {
  margin-bottom: 0;
}
.currently-key {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
  min-width: 76px;
  flex-shrink: 0;
}
.currently-val {
  color: var(--muted);
}
.currently-val strong {
  color: var(--fg);
  font-weight: 500;
}

/* ── Social ──────────────────────────────────────── */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 36px;
}
.social-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 5px 13px;
  border-radius: 20px;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Experience ──────────────────────────────────── */
.exp-item {
  margin-bottom: 38px;
}
.exp-item:last-child {
  margin-bottom: 0;
}
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
  gap: 12px;
}
.exp-title {
  font-size: 15px;
  font-weight: 500;
}
.exp-date {
  font-size: 12px;
  color: var(--subtle);
  white-space: nowrap;
}
.exp-org {
  font-size: 13.5px;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
  text-decoration: none;
}
.exp-org:hover {
  text-decoration: underline;
}
.exp-bullets {
}
.exp-bullets li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
  margin-bottom: 5px;
}
.exp-bullets li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--subtle);
}
.exp-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ── Tags ────────────────────────────────────────── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.tag {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 3px;
}
.tag.ml {
  background: #f2ece9;
  border-color: #dccfc9;
  color: #7a4535;
}
.tag.physics {
  background: #e8eef5;
  border-color: #c5d3e0;
  color: #2c4c6a;
}
.tag.nlp {
  background: #e8f0eb;
  border-color: #bed0c5;
  color: #2a5038;
}
.tag.sys {
  background: #f0edf4;
  border-color: #d0c8dc;
  color: #4a3860;
}

/* ── Publications ────────────────────────────────── */
.pub-item {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.pub-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.pub-num {
  font-size: 11.5px;
  color: var(--subtle);
  font-weight: 500;
  margin-bottom: 4px;
}
.pub-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 5px;
}
.pub-authors {
  font-size: 13px;
  color: var(--subtle);
  margin-bottom: 4px;
}
.pub-authors strong {
  color: var(--muted);
  font-weight: 600;
}
.pub-venue {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.pub-venue .status {
  font-style: normal;
  font-size: 11px;
  background: #fdeee9;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 1px 7px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 500;
}

/* ── Projects ────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.project-card {
  background: var(--bg);
  padding: 17px 18px;
  transition: background 0.15s;
}
.project-card:hover {
  background: var(--bg-alt);
}
.project-card a {
  text-decoration: none;
  display: block;
}
.project-card a:hover .project-name {
  color: var(--accent);
}
.project-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  transition: color 0.15s;
}
.project-stack {
  font-size: 11.5px;
  color: var(--subtle);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.project-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Blog listing ────────────────────────────────── */
.post-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--fg);
}
.post-item:first-child {
  border-top: 1px solid var(--border);
}
.post-item:hover .post-title {
  color: var(--accent);
}
.post-date {
  font-size: 12px;
  color: var(--subtle);
  min-width: 80px;
}
.post-meta {
  flex: 1;
}
.post-title {
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.15s;
  margin-bottom: 2px;
}
.post-desc {
  font-size: 13px;
  color: var(--subtle);
  line-height: 1.5;
}

/* ── Achievements ────────────────────────────────── */
.achievement-list li {
  font-size: 14px;
  color: var(--muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.achievement-list li:last-child {
  border-bottom: none;
}
.achievement-year {
  font-size: 12px;
  color: var(--subtle);
  flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 26px clamp(20px, 5vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer p {
  font-size: 12.5px;
  color: var(--subtle);
}
.footer-links {
  display: flex;
  gap: 18px;
}
.footer-links a {
  font-size: 12.5px;
  color: var(--subtle);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--accent);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links {
    gap: 16px;
  }
  .exp-header {
    flex-direction: column;
    gap: 2px;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .post-item {
    gap: 12px;
  }
}
@media (max-width: 420px) {
  .nav-links .resume-link {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════
   BLOG POST — Anthropic-inspired editorial layout
   ═══════════════════════════════════════════════════ */

.post-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 52px clamp(20px, 5vw, 0px) 96px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 36px;
  transition: color 0.15s;
}
.back-link:hover {
  color: var(--accent);
}

/* Post header */
.post-header {
  margin-bottom: 40px;
}
.post-header-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.post-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.post-subtitle {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 22px;
}
.post-header-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--subtle);
  padding-top: 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.post-header-meta .dot::before {
  content: "·";
  margin-right: 16px;
}

/* Post body */
.post-body {
  font-family: var(--font-serif);
  font-size: 17.5px;
  line-height: 1.82;
  color: var(--fg);
}
.post-body p {
  margin-bottom: 26px;
}
.post-body h2 {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 52px 0 20px;
}
.post-body h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 40px 0 14px;
}
.post-body h4 {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  margin: 30px 0 10px;
}
.post-body a {
  color: var(--fg);
  text-decoration-color: var(--accent);
}
.post-body a:hover {
  color: var(--accent);
}
.post-body strong {
  font-weight: 600;
}
.post-body em {
  font-style: italic;
}
.post-body ul,
.post-body ol {
  margin: 0 0 26px 22px;
}
.post-body ul {
  list-style: disc;
}
.post-body ol {
  list-style: decimal;
}
.post-body li {
  margin-bottom: 6px;
}
.post-body li::marker {
  color: var(--subtle);
}

/* Pull quote */
.post-body blockquote {
  margin: 36px 0;
  padding: 18px 22px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-body blockquote p {
  font-size: 17px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.65;
}

/* Code */
.post-body code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}
.post-body pre {
  background: #1c1b19;
  border-radius: 6px;
  padding: 20px 22px;
  margin: 28px 0;
  overflow-x: auto;
  border: 1px solid #2c2a26;
}
.post-body pre code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: none;
  border: none;
  padding: 0;
  color: #d4d0c8;
  line-height: 1.65;
}
/* syntax hint spans */
.post-body pre .kw {
  color: #cc99cd;
}
.post-body pre .str {
  color: #7ec699;
}
.post-body pre .num {
  color: #f08d49;
}
.post-body pre .cmt {
  color: #686763;
  font-style: italic;
}
.post-body pre .fn {
  color: #6bc5f8;
}
.post-body pre .cls {
  color: #e5c07b;
}

/* Figure */
.post-body figure {
  margin: 36px 0;
}
.post-body figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.post-body figcaption {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--subtle);
  text-align: center;
  margin-top: 9px;
}

/* Math block */
.math-block {
  font-family: var(--font-serif);
  text-align: center;
  padding: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 26px 0;
  overflow-x: auto;
  font-size: 17px;
  color: var(--muted);
}

/* Callout */
.callout {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  margin: 28px 0;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}
.callout.tip {
  border-color: var(--accent-dim);
  background: #faf0ec;
}
.callout strong {
  color: var(--fg);
}

/* Post footer */
.post-footer {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.post-footer p {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--subtle);
}
