/* ---------------------------------------------------------------------------
   Aryaman Jeendgar — personal site styles
   --------------------------------------------------------------------------- */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5b5b5b;
  --border: #e6e3dc;
  --accent: #0a4d8c;
  --accent-hover: #073968;
  --accent-soft: rgba(10, 77, 140, 0.08);
  --code-bg: #f1efe9;
  --max-w: 760px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.04);
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas,
    monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* --- Layout ------------------------------------------------------------- */

#content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

#table-of-contents { display: none; }

/* --- Navigation --------------------------------------------------------- */

.site-nav {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text) !important;
  letter-spacing: -0.01em;
  text-decoration: none !important;
}
.brand:hover { color: var(--accent) !important; }

.nav-links {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 1.5px solid transparent;
}
.nav-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* --- Typography --------------------------------------------------------- */

h1, h2, h3, h4 {
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.25;
}

h1.title { display: none; }

h2 {
  font-size: 1.5rem;
  margin: 2.8rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.15rem;
  margin: 1.8rem 0 0.5rem;
}

h4 {
  font-size: 1rem;
  margin: 1.4rem 0 0.4rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

p { margin: 0.7rem 0; }

/* --- Hero --------------------------------------------------------------- */

.hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 1rem 0 2.5rem;
}

.hero-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.hero-text h1 {
  font-size: 2.2rem;
  margin: 0 0 0.35rem;
}

.hero-text .tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
}

.hero-text .role {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* --- Sections / Cards --------------------------------------------------- */

.section { margin: 0; }

.card {
  display: block;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
  text-decoration: none !important;
  color: inherit !important;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: #d8d4ca;
}
.card .card-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.card .card-desc {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.card-stack {
  display: grid;
  gap: 0.75rem;
}

/* --- News / Timeline ---------------------------------------------------- */

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
}
.news-list li {
  position: relative;
  margin: 0 0 1rem;
}
.news-list li::before {
  content: "";
  position: absolute;
  left: -1.7rem;
  top: 0.55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}
.news-date {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 5.5rem;
}

/* --- Publications ------------------------------------------------------- */

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-item:last-child { border-bottom: none; }
.pub-title {
  font-weight: 600;
  display: block;
  margin-bottom: 0.2rem;
}
.pub-authors {
  color: var(--text);
}
.pub-authors strong { color: var(--text); font-weight: 600; }
.pub-venue {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: block;
  margin-top: 0.2rem;
}
.pub-links {
  margin-top: 0.4rem;
  font-size: 0.88rem;
}
.pub-links a {
  margin-right: 0.85rem;
  color: var(--accent);
}

/* --- Blog post list ----------------------------------------------------- */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: none; }
.post-list .post-date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.2rem;
}
.post-list .post-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}
.post-list .post-excerpt {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-top: 0.25rem;
}

/* --- Tags / Pills ------------------------------------------------------- */

.tag {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  background: var(--code-bg);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 0.3rem;
}
.tag-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

/* --- CV ----------------------------------------------------------------- */

.cv-section { margin-bottom: 2.2rem; }

.cv-entry {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.cv-entry:last-child { border-bottom: none; }
.cv-when {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  padding-top: 0.15rem;
}
.cv-what strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.cv-what .cv-role {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}
.cv-what ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}
.cv-what li {
  margin: 0.15rem 0;
  font-size: 0.95rem;
}

/* --- Code --------------------------------------------------------------- */

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--code-bg);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  color: #2a2a2a;
}

pre {
  background: var(--code-bg);
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.5;
}
pre code {
  background: none;
  padding: 0;
}

/* --- Blockquote / callouts --------------------------------------------- */

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1rem 0;
  padding: 0.1rem 1rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Reading list ------------------------------------------------------- */

.reading-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: reading;
}
.reading-list li {
  counter-increment: reading;
  padding: 0.85rem 0 0.85rem 2.4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.reading-list li:last-child { border-bottom: none; }
.reading-list li::before {
  content: counter(reading);
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 1.7rem;
  height: 1.7rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  text-align: center;
  line-height: 1.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --- Misc inline elements ---------------------------------------------- */

.footnote-ref { font-size: 0.75em; vertical-align: super; }
.org-ul, .org-ol { padding-left: 1.4rem; }
.org-ul li, .org-ol li { margin: 0.25rem 0; }

/* Hide the default org-mode creator footer (already replaced by custom footer) */
#postamble .creator,
#postamble .validation { display: none; }

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 4rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-links { display: flex; gap: 1.1rem; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); text-decoration: none; }

.footer-note {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 620px) {
  #content { padding: 1.75rem 1.1rem 3rem; }
  .hero { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .hero-text h1 { font-size: 1.85rem; }
  .nav-inner { gap: 0.85rem; }
  .nav-links { gap: 1rem; margin-left: 0; width: 100%; }
  .cv-entry { grid-template-columns: 1fr; gap: 0.2rem; }
  .cv-when { font-size: 0.82rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* --- Print -------------------------------------------------------------- */

@media print {
  .site-nav, .site-footer { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}
