/* Amish Trivedi — amishjt.com
   Light, futuristic personal site. Plain CSS, no build step. */

:root {
  --bg: #f5f7fb;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --bg-card: #ffffff;
  --text: #0b0d12;
  --text-muted: #4a5568;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.16);
  --accent: #0066ff;
  --accent-hover: #0052cc;
  --accent-soft: rgba(0, 102, 255, 0.08);
  --accent-glow: rgba(0, 102, 255, 0.22);
  --violet: #6d28d9;
  --cyan: #06b6d4;
  --focus: #0066ff;
  --max-width: 42rem;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino,
    Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas,
    monospace;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --radius: 0.5rem;
  --radius-lg: 0.875rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04),
    0 4px 16px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.011em;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(0, 102, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 5%, rgba(109, 40, 217, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(6, 182, 212, 0.08), transparent 55%),
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    auto,
    48px 48px,
    48px 48px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.skip-link:focus {
  top: var(--space-sm);
}

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

a:hover {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Layout */
.site-header,
.site-footer,
.site-main {
  width: 100%;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(245, 247, 251, 0.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner,
.site-footer__inner,
.site-main {
  max-width: calc(var(--max-width) + 4rem);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-md);
  padding-block: var(--space-md);
}

.site-logo {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav a[aria-current="page"] {
  font-weight: 600;
  color: var(--accent);
}

.nav__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  padding-left: var(--space-sm);
  border-left: 1px solid var(--border-strong);
  margin-left: var(--space-xs);
}

@media (max-width: 36rem) {
  .nav__social {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    width: 100%;
  }
}

.site-main {
  flex: 1;
  padding-block: var(--space-xl) var(--space-lg);
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-footer__inner {
  padding-block: var(--space-md);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Typography */
h1,
h2 {
  font-family: var(--font-serif);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 var(--space-md);
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 500;
}

h2 {
  font-size: 1.375rem;
  margin-top: var(--space-lg);
  font-weight: 500;
}

p {
  margin: 0 0 var(--space-md);
  max-width: var(--max-width);
  color: var(--text);
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: var(--max-width);
}

.tagline {
  font-family: var(--font-sans);
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  max-width: var(--max-width);
  font-weight: 400;
}

.meta-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

/* CTAs / link list */
.cta-list {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: var(--max-width);
}

.cta-list a {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
}

.cta-list a:hover {
  border-color: rgba(0, 102, 255, 0.35);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-glow);
  transform: translateY(-1px);
}

.cta-list a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.cta-list .label {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  min-width: 4.5rem;
}

.cta-list .placeholder {
  opacity: 0.65;
}

.cta-list .todo {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* About draft marker */
.draft-banner {
  display: inline-block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid rgba(0, 102, 255, 0.25);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 0.2rem 0.5rem;
  margin-bottom: var(--space-md);
}

.prose p + p {
  margin-top: var(--space-md);
}

.experience-list {
  margin: 0 0 var(--space-lg);
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.experience-list li {
  margin-bottom: var(--space-sm);
}

.experience-list strong {
  color: var(--text);
  font-weight: 600;
}

.role-line {
  margin: 0 0 var(--space-sm);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  color: var(--accent);
  max-width: var(--max-width);
  font-weight: 500;
}

.intro {
  margin-top: var(--space-md);
}

.intro em {
  font-style: italic;
  color: var(--text);
}

.home-more {
  margin: var(--space-lg) 0 var(--space-md);
  font-size: 0.9875rem;
}

.home-more a {
  text-decoration: none;
  font-weight: 500;
}

.home-more a:hover {
  text-decoration: underline;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent),
    var(--cyan),
    var(--violet),
    transparent
  );
  opacity: 0.85;
}

.hero__text .tagline {
  margin-bottom: 0;
}

.home-page .hero h1 {
  max-width: 36rem;
  margin-bottom: var(--space-sm);
}

.home-page .hero .tagline {
  max-width: 36rem;
}

.home-page .hero__photo img {
  width: 7rem;
  height: 7rem;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-lg);
  font-size: 0.9375rem;
  font-weight: 600;
}

.home-actions a {
  text-decoration: none;
}

.home-actions a:hover,
.home-section > a:hover {
  text-decoration: underline;
}

.home-actions__primary {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
}

.home-actions__primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.home-section {
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.home-section h2 {
  margin: 0 0 var(--space-md);
}

.home-topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.home-topics h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
  line-height: 1.4;
}

.home-topics p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.home-section__intro {
  color: var(--text-muted);
  font-size: 0.9875rem;
}

.home-work-list {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
}

.home-work-list li {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border);
}

.home-work-list h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.home-work-list p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.home-ventures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.home-ventures > div {
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.home-ventures h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
}

.home-ventures p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.home-perspective {
  padding-left: var(--space-md);
  border-left: 2px solid var(--accent);
}

.home-section--narrative p,
.home-contact p {
  max-width: 38rem;
}

.home-section > a {
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.home-contact {
  border-bottom: 0;
}

@media (max-width: 40rem) {
  .home-topics {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .home-ventures {
    grid-template-columns: 1fr;
  }

  .home-work-list li {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
}

.hero__photo {
  margin: 0;
  flex-shrink: 0;
}

.hero__photo img,
.about-photo img {
  display: block;
  width: 8.5rem;
  height: 8.5rem;
  object-fit: cover;
  object-position: center top;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px var(--border-strong), 0 0 24px var(--accent-glow);
  background: var(--bg-card);
}

.hero__photo img {
  width: 9.5rem;
  height: 9.5rem;
}

.about-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.about-header h1 {
  margin: 0;
}

.about-photo {
  margin: 0;
}

.about-photo img {
  width: 5.5rem;
  height: 5.5rem;
}

@media (max-width: 40rem) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: var(--space-md);
  }

  .hero__photo {
    order: -1;
  }

  .hero__photo img {
    width: 7.5rem;
    height: 7.5rem;
  }
}

.prose {
  font-size: 1.125rem;
  line-height: 1.75;
}

.prose p {
  max-width: 38rem;
}

.tagline--hero {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.3;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

.post-list {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  max-width: 42rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.post-list li {
  border-top: 1px solid var(--border);
}

.post-list li:first-child {
  border-top: none;
}

.post-list a {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md);
  text-decoration: none;
  color: var(--text);
  align-items: baseline;
  transition: background 0.15s ease;
}

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

.post-list a:hover .post-title {
  color: var(--accent);
}

.post-list time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-list .post-title {
  font-size: 1.0625rem;
  line-height: 1.4;
  font-weight: 500;
}

.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.post-meta a {
  color: var(--text-muted);
  text-decoration: none;
}

.post-meta a:hover {
  color: var(--accent);
}

.post-source {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.post h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  max-width: 40rem;
}

.post-body {
  max-width: 40rem;
}

.post-body h2 {
  font-size: 1.25rem;
  margin-top: var(--space-xl);
}

.post-body ul,
.post-body ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.25rem;
  color: var(--text);
  max-width: 38rem;
}

.post-body li {
  margin-bottom: var(--space-xs);
}

.post-body strong {
  font-weight: 600;
}

/* Tables in posts */
.post-body table {
  width: 100%;
  max-width: 38rem;
  border-collapse: collapse;
  margin: 0 0 var(--space-md);
  font-size: 0.9375rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-body th,
.post-body td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.post-body th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--accent-soft);
}

.post-body tr:last-child td {
  border-bottom: none;
}

/* === Writing filters (tag + year) === */

.filters {
  max-width: 42rem;
  margin: 0 0 var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.filter-group__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-chip {
  appearance: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  line-height: 1.2;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.filter-chip:hover {
  border-color: rgba(0, 102, 255, 0.35);
  color: var(--accent);
  background: var(--accent-soft);
}

.filter-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.filters__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--border);
}

.filter-count {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: none;
}

.filter-clear {
  appearance: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.filter-clear:hover {
  color: var(--accent);
  border-color: rgba(0, 102, 255, 0.35);
  background: var(--accent-soft);
}

.filter-clear:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.filter-empty {
  max-width: 42rem;
  margin: 0 0 var(--space-md);
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.filter-empty[hidden] {
  display: none;
}

.post-list li.is-hidden {
  display: none;
}

.post-list__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 450;
  letter-spacing: 0.02em;
  line-height: 1.3;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}

.post-list a:hover .tag-pill {
  border-color: rgba(0, 102, 255, 0.3);
}

.tag-pill:hover {
  background: rgba(0, 102, 255, 0.14);
  border-color: rgba(0, 102, 255, 0.4);
}

/* Keep time | body columns; body stacks title + tags */
.post-list a {
  align-items: start;
}

.writing-featured {
  margin: var(--space-lg) 0 var(--space-xl);
}

.writing-featured__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-md);
}

.writing-featured__heading .role-line {
  margin-bottom: 0.25rem;
}

.writing-featured__heading h2 {
  margin: 0;
}

.writing-featured__heading > a {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.writing-featured__heading > a:hover {
  text-decoration: underline;
}

.writing-featured__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}

.writing-featured__grid > a {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: 100%;
  padding: var(--space-md);
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.writing-featured__grid > a:hover {
  border-color: rgba(0, 102, 255, 0.35);
  box-shadow: var(--shadow-md);
}

.writing-featured__grid strong {
  line-height: 1.35;
  font-size: 1rem;
}

.writing-featured__grid span:last-child {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.writing-featured__topic {
  color: var(--accent);
  font: 500 0.75rem var(--font-mono);
}

.writing-archive-title {
  margin: 0 0 var(--space-md);
}

@media (max-width: 36rem) {
  .writing-featured__grid {
    grid-template-columns: 1fr;
  }

  .post-list a {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .filters {
    padding: var(--space-sm) var(--space-md);
  }
}
