/* kaustubhtripathi.com — v1 design system */
:root {
  --bg: #ffffff;
  --bg-card: #f8f8f8;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e5e5;
  --code-bg: #f4f4f4;
  --font-sans: "Libre Franklin", system-ui, sans-serif;
  --font-serif: "Libre Baskerville", Georgia, serif;
  --max-width: 1100px;
  --content-width: 680px;
  --radius: 8px;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
}

[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #9a9a9a;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --border: #2a2a2a;
  --code-bg: #1e1e1e;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-section { opacity: 1 !important; transform: none !important; }
}
img { max-width: 100%; height: auto; }

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: padding 0.2s ease;
}
.site-header--slim .site-header__inner { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-title { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.95rem; font-weight: 600; margin: 0; }
.site-title a { color: var(--text); text-decoration: none; }
.site-title a:hover { color: var(--accent); }

#site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); }
.nav-disabled {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: not-allowed;
  opacity: 0.55;
}
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.about-hero {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 320px);
  gap: 2rem 3rem;
  align-items: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.about-hero__copy {
  min-width: 0;
}
.about-hero__photo {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  justify-self: end;
}
[data-theme="dark"] .about-hero__photo {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.about-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 0 0 1.25rem;
}
.btn--pill {
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
}
.about-hero .subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0 0 1rem;
}
.about-hero .bio { margin: 0 0 1rem; max-width: 42rem; }
.about-hero .philosophy {
  font-style: italic;
  color: var(--text-muted);
  margin: 1rem 0 0;
  font-size: 0.95rem;
}
.link-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }
.link-row a { font-weight: 600; text-decoration: none; }

@media (prefers-reduced-motion: no-preference) {
  .about-hero,
  .reveal-section {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .about-hero.is-visible,
  .reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

.section { margin-bottom: 2.75rem; }
.section h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  margin: 0 0 0.35rem;
}
.section-desc { color: var(--text-muted); margin: 0 0 1.25rem; font-size: 0.95rem; }
.section-more { margin-top: 1rem; font-size: 0.95rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
    border-color: var(--accent);
  }
  [data-theme="dark"] .project-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  }
}
.project-card h3 { font-family: var(--font-serif); font-size: 1.1rem; margin: 0 0 0.5rem; }
.project-card h3 a { color: inherit; text-decoration: none; }
.project-card h3 a:hover { color: var(--accent); }
.project-card p { margin: 0 0 1rem; font-size: 0.92rem; color: var(--text-muted); flex: 1; }
.components-theory { margin-top: 2.25rem; }
.components-theory h2 { font-family: var(--font-serif); margin: 0 0 1rem; }
.components-theory .comp-card h3 { font-size: 1rem; margin: 0 0 0.4rem; color: var(--accent); }
.components-theory .comp-card p { font-size: 0.88rem; color: var(--text-muted); margin: 0; line-height: 1.55; }
.components-theory .comp-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 1.1rem 1.2rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.85rem; }
.tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  background: var(--code-bg);
  color: var(--text-muted);
}
.tag--live { background: #d1e7dd; color: #0a4d2e; }
[data-theme="dark"] .tag--live { background: #1a3d2e; color: #86efac; }
.tag--lab { background: #dbeafe; color: #1e3a8a; }
[data-theme="dark"] .tag--lab { background: #1e2a4a; color: #93c5fd; }
.card-actions { margin-top: auto; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: #fff !important; }
.btn--primary:hover { background: var(--accent-hover); color: #fff !important; }
.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text) !important;
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent) !important; }

.sarkari-detail-dl {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}
.sarkari-detail-dl dt { font-weight: 600; color: var(--text-muted); margin: 0; }
.sarkari-detail-dl dd { margin: 0; }

.sarkari-page .sarkari-category {
  margin-bottom: 2rem;
  padding: 1.25rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sarkari-page .sarkari-category h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}
.sarkari-page .sarkari-category ul {
  margin: 0;
  padding-left: 1.25rem;
}
.sarkari-page .sarkari-category li { margin-bottom: 0.45rem; }
.sarkari-pending { color: var(--text-muted); }
.sarkari-date { font-size: 0.85rem; color: var(--text-muted); }
.sarkari-archive { border-style: dashed; }
.sarkari-archive-toggle {
  font: inherit;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  min-height: 44px;
  width: 100%;
  text-align: left;
}
.sarkari-archive-panel { margin-top: 0.75rem; }
.sarkari-archive-panel[hidden] { display: none !important; }

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.tech-grid span {
  padding: 0.25rem 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.linkedin-compact .post-row,
.linkedin-page .post-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  background: var(--bg-card);
}
.post-row h3, .post-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.post-row h3 a, .post-card h3 a { text-decoration: none; color: inherit; }
.post-meta { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.5rem; }
.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 4px;
}

.quote-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.quote-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
}
.quote-card__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.quote-card__body { padding: 0.85rem 1rem 1rem; }
.quote-text { margin: 0 0 0.5rem; font-size: 0.95rem; line-height: 1.5; }
.quote-text--placeholder { color: var(--text-muted); font-style: italic; }
.post-row--quote { display: flex; gap: 1rem; align-items: flex-start; }
.post-row__thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}
.blog-search-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}
.blog-search {
  flex: 1 1 220px;
  max-width: 420px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}
.blog-result-count {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.blog-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.tag-filter {
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
}
.tag-filter:hover { border-color: var(--accent); color: var(--accent); }
.tag-filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.blog-post-list { max-width: var(--content-width); }
.blog-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
}
.blog-card h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}
.blog-card h2 a { text-decoration: none; color: inherit; }
.blog-card h2 a:hover { color: var(--accent); }
.blog-excerpt { margin: 0 0 0.75rem; color: var(--text-muted); }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.card-tags .tag {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.page-header { margin-bottom: 2rem; }
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.5rem;
}

.content-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem;
  max-width: var(--content-width);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 2rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.footer-links { display: flex; gap: 1.25rem; margin: 0; }

.made-facts,
.link-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}
.made-facts li,
.link-list li { margin-bottom: 0.5rem; }
.made-entries .post-card { margin-bottom: var(--space-md); }

@media (max-width: 720px) {
  .about-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-hero__photo {
    margin: 0 auto;
    max-width: 240px;
    order: -1;
  }
  .hero-cta { justify-content: center; }
  .link-row { justify-content: center; }
  .link-row { justify-content: center; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 0.75rem;
  }
  .site-nav.is-open { display: flex; }
  #site-nav { flex-wrap: wrap; }
}
