/* =========================================================
   ishitamishra.space — Global Stylesheet
   ========================================================= */

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

:root {
  --ground: #F9FAF9;
  --surface: #FFFFFF;
  --text: #18181B;
  --muted: #71717A;
  --faint: #A1A1AA;
  --accent: #0D9488;
  --accent-dark: #0F766E;
  --accent-light: #CCFBF1;
  --border: #E4E4E7;
  --tag-bg: #F4F4F5;

  --f-display: Georgia, 'Times New Roman', serif;
  --f-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, monospace;

  --radius: 8px;
  --nav-h: 60px;
  --max-w: 1100px;
  --content-w: 680px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--ground);
  color: var(--text);
  font-family: var(--f-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(249,250,249,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto; padding: 0 28px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 6px 13px; border-radius: var(--radius);
  font-size: .875rem; color: var(--muted);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--tag-bg); }
.nav-cta {
  background: var(--accent) !important; color: white !important;
}
.nav-cta:hover { background: var(--accent-dark) !important; }

/* ── SHARED BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500;
  transition: all .15s; cursor: pointer;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(13,148,136,.28);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--tag-bg); border-color: #D4D4D8; }

/* ── SHARED TAGS ── */
.tag {
  font-size: .7rem; padding: 2px 7px; border-radius: 999px;
  background: var(--tag-bg); color: var(--muted);
}
.tag.accent { background: var(--accent-light); color: var(--accent-dark); font-weight: 500; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 28px 28px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.footer-inner:last-child { padding-bottom: 28px; }
.footer-logo { font-family: var(--f-display); font-style: italic; font-size: .95rem; }
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: .82rem; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
  transition: color .15s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  width: 100%; font-size: .75rem; color: var(--faint);
  text-align: center;
  padding: 18px 0 20px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── HOMEPAGE: HERO ── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 96px 28px 88px;
  position: relative;
  overflow: hidden;
}
/* AESTHETIC RISK: giant italic initials as atmospheric watermark */
.hero::before {
  content: 'IM';
  position: absolute;
  right: 20px; top: 40px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(140px, 18vw, 240px);
  line-height: 1;
  color: var(--accent-light);
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.06em;
  z-index: 0;
}
.hero-eyebrow {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1) } 50% { opacity:.35; transform:scale(.8) } }
.hero-name {
  position: relative; z-index: 1;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  font-weight: normal;
  line-height: .94;
  letter-spacing: -0.045em;
  color: var(--text);
  margin-bottom: 30px;
}
.hero-desc {
  position: relative; z-index: 1;
  font-size: 1.075rem; color: var(--muted);
  max-width: 480px; line-height: 1.72;
  margin-bottom: 36px;
}
.hero-actions {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 10px;
}

/* ── HOMEPAGE: WRITING LIST ── */
.writing {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 28px 80px;
  border-top: 1px solid var(--border);
}
.writing-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--text);
  margin-bottom: 0;
}
.writing-title {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.05rem; font-weight: normal;
}
.writing-all {
  font-size: .82rem; color: var(--accent);
  display: inline-flex; align-items: center; gap: 3px;
}
.writing-all:hover { text-decoration: underline; }

.post-row {
  display: grid;
  grid-template-columns: 96px 1fr 64px;
  gap: 0 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  cursor: pointer;
  transition: background .1s;
  text-decoration: none;
  color: inherit;
}
.post-row:hover {
  background: var(--surface);
  margin: 0 -16px; padding-left: 16px; padding-right: 16px;
}
.post-row:last-of-type { border-bottom: none; }
.pr-date { font-size: .78rem; color: var(--faint); padding-top: 3px; }
.pr-title {
  font-family: var(--f-display);
  font-size: 1.03rem; font-weight: normal;
  letter-spacing: -0.01em; line-height: 1.35;
  margin-bottom: 4px;
}
.post-row:hover .pr-title { color: var(--accent); }
.pr-excerpt { font-size: .84rem; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
.pr-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.pr-meta { text-align: right; }
.pr-time { font-size: .75rem; color: var(--faint); display: block; padding-top: 3px; }
.pr-arrow { font-size: .85rem; color: var(--accent); display: block; margin-top: 8px; }

/* ── HOMEPAGE: ABOUT ── */
.about {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 28px 80px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.about-left h2 {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: normal;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.about-left h2 em { font-style: normal; color: var(--accent); }
.about-left p { color: var(--muted); line-height: 1.75; font-size: .975rem; margin-bottom: 14px; }
.about-left p:last-of-type { margin-bottom: 24px; }
.stat-cards { display: flex; flex-direction: column; gap: 12px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  display: flex; align-items: center; gap: 13px;
  transition: border-color .15s;
}
.stat-card:hover { border-color: var(--accent-light); }
.stat-icon {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.stat-label { font-size: .72rem; color: var(--faint); margin-bottom: 1px; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: .92rem; font-weight: 600; }

/* ── BLOG LISTING PAGE ── */
.page-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 28px 48px;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: normal;
  letter-spacing: -0.045em;
  margin-bottom: 10px;
}
.page-hero p { color: var(--muted); font-size: 1.025rem; }

.blog-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px 96px;
}

/* ── POST PAGE ── */
.post-container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 56px 28px 96px;
}
.post-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .875rem; color: var(--muted);
  margin-bottom: 48px;
  transition: color .15s;
}
.post-back:hover { color: var(--accent); }

.post-header { margin-bottom: 48px; }
.post-header-date {
  font-size: .75rem; color: var(--faint);
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px;
}
.post-header h1 {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: normal;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.post-header-subtitle {
  font-size: 1.075rem; color: var(--muted); line-height: 1.65;
  margin-bottom: 24px;
}
.post-header-meta {
  display: flex; align-items: center; gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: .84rem; color: var(--muted);
}
.post-author-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #14B8A6 100%);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: .72rem; font-weight: 700;
  flex-shrink: 0; letter-spacing: .02em;
}
.post-author-name { font-weight: 500; color: var(--text); }
.meta-sep { color: var(--border); }

/* ── POST BODY TYPOGRAPHY ── */
.post-body {
  font-size: 1.05rem; line-height: 1.82; color: #27272A;
}
.post-body > * + * { margin-top: 20px; }
.post-body h2 {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.55rem; font-weight: normal;
  letter-spacing: -0.035em; color: var(--text);
  margin-top: 48px; margin-bottom: 0;
}
.post-body h3 {
  font-size: 1.05rem; font-weight: 600; color: var(--text);
  margin-top: 32px; margin-bottom: 0;
}
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body li + li { margin-top: 5px; }
.post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 22px;
  margin: 32px 0;
}
.post-body blockquote p {
  color: var(--muted);
  font-style: italic;
  margin-top: 0;
}
.post-body code {
  font-family: var(--f-mono);
  font-size: .84em;
  background: var(--tag-bg);
  padding: 2px 5px; border-radius: 4px;
  color: #0F766E;
}
.post-body pre {
  background: #18181B; color: #E4E4E7;
  padding: 20px 24px; border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--f-mono);
  font-size: .875rem; line-height: 1.65;
}
.post-body pre code { background: none; color: inherit; padding: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero::before { display: none; }
  .hero, .writing, .about, .page-hero, .blog-section { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 72px; padding-bottom: 56px; }
  .post-row { grid-template-columns: 1fr; gap: 4px; }
  .pr-meta { text-align: left; }
  .pr-time { display: inline; padding-top: 0; }
  .pr-arrow { display: inline; margin: 0 0 0 6px; }
  .about { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
  .nav-inner { padding: 0 20px; }
  .footer-inner { padding-left: 20px; padding-right: 20px; }
  .post-container { padding: 40px 20px 72px; }
}
@media (max-width: 480px) {
  .hero-name { font-size: 2.75rem; }
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
  .writing-header { flex-wrap: wrap; gap: 6px; align-items: flex-start; }
  .footer-links { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-dot { animation: none; }
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}
