/* Indra Reddy M — light-first personal brand */

:root {
  --bg: #fafaf9;
  --bg-muted: #f4f4f5;
  --surface: #ffffff;
  --text: #18181b;
  --text-muted: #52525b;
  --border: #e4e4e7;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --container: 1100px;
  --narrow: 720px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: var(--narrow);
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
  text-decoration: none;
}

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

.nav-link {
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-link.is-active {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.nav-link-cta {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.nav-link-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-link-cta.is-active {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.08);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
}

/* Main */
.main {
  min-height: 60vh;
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.5rem; margin: 0 0 0.75rem; }
h3, .h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }
.h4 { font-size: 1.05rem; }

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 42rem;
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.prose p {
  margin: 0 0 1rem;
}

.meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
}

.hero-intro {
  max-width: 36rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-muted {
  background: var(--bg-muted);
}

.page-header {
  padding: 3rem 0 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.text-link {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--accent);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.65;
  cursor: default;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body {
  padding: 1.25rem;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(13, 148, 136, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Blog */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 140px;
}

.post-card-body {
  padding: 1.25rem 1.25rem 1.25rem 0;
}

.post-preview-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-preview h3 {
  margin: 0.25rem 0;
}

.post-preview h3 a {
  color: var(--text);
  text-decoration: none;
}

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

.article-image {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.engagement-bar {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Comments */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.comment {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.comment time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.comment-form-card {
  padding: 1.5rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.form-input,
input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--surface);
}

.form-textarea,
textarea {
  resize: vertical;
  min-height: 120px;
}

.field-errors {
  color: #b91c1c;
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
  padding-left: 1rem;
}

form p {
  margin-bottom: 1rem;
}

form p label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent);
}

.tag-muted {
  background: var(--bg-muted);
  color: var(--text-muted);
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.about-photo {
  border-radius: var(--radius);
  width: 100%;
}

.about-meta {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.about-meta li {
  margin-bottom: 0.5rem;
}

.resume-card {
  padding: 1.5rem;
}

/* Messages */
.messages {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.message-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.message-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.message-info,
.message-warning {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}

.empty-state {
  color: var(--text-muted);
  font-style: italic;
}

.pagination {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
  font-size: 0.9rem;
}

.simple-list {
  padding-left: 1.25rem;
}

.mt-lg { margin-top: 2rem; }
.mt-md { margin-top: 1rem; }

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.75rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-card-body {
    padding: 1.25rem;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }
}

/* Post body (Markdown) */
.prose { line-height: 1.7; }
.prose h2, .prose h3, .prose h4 { margin: 2rem 0 0.75rem; line-height: 1.3; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }
.prose h4 { font-size: 1.05rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose li { margin: 0.25rem 0; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-hover); }
.prose blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
.prose pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: #18181b;
  color: #f4f4f5;
  border-radius: var(--radius);
  line-height: 1.5;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 0.875rem; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 0.5rem 0 1.25rem; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.prose th { background: var(--bg-muted); font-weight: 600; }

/* Spam honeypot: off-screen for humans, still in the DOM for bots */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
