/* tamilastronomy.com — shared stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Noto+Serif+Tamil:wght@400;600&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #f5e6c8;
  --ink-muted:  #a8899c;
  --ink-faint:  #6b5570;
  --gold:       #f0d078;
  --amber:      #c97b2c;
  --purple:     #9b7fd4;
  --deep:       #0d0522;
  --navy:       #1a0a3d;
  --mid:        #2d1055;
  --surface:    #1f0e3a;
  --border:     rgba(245,230,200,0.12);
  --border-mid: rgba(245,230,200,0.22);
  --serif:      'Playfair Display', Georgia, serif;
  --tamil:      'Noto Serif Tamil', serif;
  --sans:       'DM Sans', system-ui, sans-serif;
  --max:        1100px;
  --col:        680px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--deep);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}

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

img { max-width: 100%; display: block; }

/* ── Utility ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.serif     { font-family: var(--serif); }
.tamil     { font-family: var(--tamil); }
.gold      { color: var(--gold); }
.amber     { color: var(--amber); }
.purple    { color: var(--purple); }
.muted     { color: var(--ink-muted); }

/* ── Stars decoration ── */
.stars {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.star {
  position: absolute; border-radius: 50%; background: var(--gold);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%,100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.3); }
}

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,5,34,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 0;
  height: 58px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: auto;
}
.nav-logo-icon {
  width: 30px; height: 30px; background: var(--navy);
  border-radius: 50%; border: 1px solid var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  color: var(--ink); letter-spacing: -0.01em;
}
.nav-logo-text span { color: var(--amber); }
.nav-links {
  display: flex; gap: 2px; align-items: center;
}
.nav-links a {
  font-size: 12px; color: var(--ink-muted); padding: 6px 12px;
  border-radius: 20px; letter-spacing: 0.05em;
  text-transform: uppercase; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
  color: var(--ink); background: rgba(255,255,255,0.06);
  text-decoration: none;
}
.nav-subscribe {
  margin-left: 12px; padding: 7px 16px;
  border-radius: 20px; background: var(--amber);
  color: #fff; font-size: 12px; font-weight: 500;
  border: none; cursor: pointer; font-family: var(--sans);
  transition: opacity 0.2s;
}
.nav-subscribe:hover { opacity: 0.85; }

/* ── Hero (homepage) ── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--navy) 0%, var(--deep) 100%);
  padding: 72px 24px 60px;
  text-align: center; border-bottom: 0.5px solid var(--border);
}
.hero-eyebrow {
  display: inline-block; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--amber);
  border: 0.5px solid rgba(201,123,44,0.4); border-radius: 20px;
  padding: 4px 14px; margin-bottom: 20px;
}
.hero-title {
  font-family: var(--serif); font-size: clamp(34px,6vw,56px);
  font-weight: 700; color: var(--ink); line-height: 1.12;
  max-width: 720px; margin: 0 auto 10px; letter-spacing: -0.02em;
}
.hero-title em { color: var(--gold); font-style: italic; }
.hero-tamil-line {
  font-family: var(--tamil); font-size: 20px;
  color: var(--purple); margin-bottom: 18px; letter-spacing: 0.1em;
}
.hero-subtitle {
  font-size: 16px; color: var(--ink-muted);
  max-width: 540px; margin: 0 auto 32px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 24px; border-radius: 24px; font-size: 13px;
  font-weight: 500; font-family: var(--sans); cursor: pointer;
  border: none; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: #b86c22; text-decoration: none; color: #fff; }
.btn-ghost  {
  background: transparent; color: var(--ink);
  border: 0.5px solid var(--border-mid);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); text-decoration: none; }

/* ── Today Strip ── */
.today-strip {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  padding: 12px 24px;
}
.today-strip-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.today-badge {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  background: var(--amber); color: #fff; border-radius: 20px;
  padding: 3px 10px; white-space: nowrap; font-weight: 500; flex-shrink: 0;
}
.today-text { font-size: 13px; color: var(--ink-muted); flex: 1; }
.today-text strong { color: var(--ink); }
.today-read-link {
  font-size: 12px; color: var(--amber); white-space: nowrap; font-weight: 500;
}

/* ── Main grid ── */
.main-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 290px; gap: 0;
  padding: 0 24px;
}
@media(max-width:768px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar   { border-left: none !important; border-top: 0.5px solid var(--border); }
}

.feed   { padding: 36px 32px 48px 0; border-right: 0.5px solid var(--border); }
.sidebar{ padding: 36px 0 48px 28px; }

/* ── Section label ── */
.section-label {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500; margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::after {
  content: ''; flex: 1; height: 0.5px; background: var(--border);
}

/* ── Feature article card ── */
.feature-card {
  border: 0.5px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 40px;
  background: var(--surface);
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border-mid); }
.feature-visual {
  height: 200px;
  background: linear-gradient(135deg, var(--navy) 0%, #3d1a5e 60%, #5c2d6e 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.feature-orb {
  width: 120px; height: 120px; border-radius: 50%;
  border: 1px solid rgba(240,208,120,0.3);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.feature-orb::before {
  content: ''; position: absolute; inset: -16px;
  border-radius: 50%; border: 0.5px solid rgba(240,208,120,0.12);
}
.feature-orb-inner {
  font-family: var(--serif); font-size: 32px; color: var(--gold);
}
.feature-body  { padding: 22px 24px; }
.cat-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--purple); font-weight: 500; margin-bottom: 8px;
}
.feature-title {
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  line-height: 1.3; margin-bottom: 10px; color: var(--ink);
}
.feature-desc  {
  font-size: 14px; color: var(--ink-muted); line-height: 1.7; margin-bottom: 16px;
}
.meta-row { display: flex; align-items: center; gap: 10px; }
.meta-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-faint); flex-shrink: 0;
}
.meta-date { font-size: 12px; color: var(--ink-faint); }
.read-link {
  margin-left: auto; font-size: 12px; color: var(--amber); font-weight: 500;
}

/* ── Post list ── */
.post-list  { display: flex; flex-direction: column; }
.post-item  {
  padding: 18px 0; border-bottom: 0.5px solid var(--border);
  display: flex; gap: 16px; align-items: flex-start;
  transition: opacity 0.2s;
}
.post-item:hover { opacity: 0.8; }
.post-item:last-child { border-bottom: none; }
.post-num   {
  font-family: var(--serif); font-size: 28px; font-weight: 700;
  color: rgba(240,208,120,0.18); flex-shrink: 0; line-height: 1;
  min-width: 36px; margin-top: 2px;
}
.post-info  { flex: 1; }
.post-cat   {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--purple); font-weight: 500; margin-bottom: 4px;
}
.post-title {
  font-size: 15px; font-weight: 500; line-height: 1.45;
  color: var(--ink); margin-bottom: 6px;
}
.post-meta  { font-size: 12px; color: var(--ink-faint); }

/* ── Sidebar widgets ── */
.widget {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 22px;
}
.widget-dark {
  background: linear-gradient(135deg, var(--navy), var(--mid));
  border: 0.5px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 22px;
  padding: 18px;
}
.widget-header {
  background: var(--navy); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 0.5px solid var(--border);
}
.widget-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); }
.widget-body  { padding: 14px 16px; }

/* nakshatra widget */
.nak-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--purple); margin-bottom: 6px; }
.nak-name  { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--gold); line-height: 1.1; }
.nak-tamil { font-family: var(--tamil); font-size: 17px; color: #c9a6e8; margin: 4px 0 10px; }
.nak-desc  { font-size: 13px; color: var(--ink-muted); line-height: 1.6; }

/* calendar widget */
.cal-header  {
  background: var(--navy); padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.cal-month   { font-family: var(--serif); font-size: 15px; color: var(--gold); font-weight: 700; }
.cal-sub     { font-family: var(--tamil); font-size: 12px; color: var(--purple); }
.cal-body    { padding: 12px; }
.cal-grid-hd {
  display: grid; grid-template-columns: repeat(7,1fr);
  margin-bottom: 4px;
}
.cal-dh { font-size: 10px; text-align: center; color: var(--ink-faint); padding: 2px; }
.cal-grid    { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-cell    {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; border-radius: 50%; cursor: pointer; color: var(--ink-faint);
  transition: background 0.15s;
}
.cal-cell:hover   { background: rgba(255,255,255,0.08); }
.cal-cell.today   { background: var(--amber); color: #fff; font-weight: 500; }
.cal-cell.has-post{ color: var(--ink); }
.cal-cell.has-post::after {
  /* dot indicator */
}

/* topics pills */
.topics-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-pill  {
  display: inline-block; padding: 5px 12px; border-radius: 20px;
  font-size: 12px; cursor: pointer; border: 0.5px solid;
  transition: opacity 0.2s;
}
.topic-pill:hover { opacity: 0.75; }
.pill-purple { background: rgba(155,127,212,0.15); color: var(--purple); border-color: rgba(155,127,212,0.35); }
.pill-amber  { background: rgba(201,123,44,0.15);  color: var(--amber);  border-color: rgba(201,123,44,0.35);  }
.pill-gold   { background: rgba(240,208,120,0.12); color: var(--gold);   border-color: rgba(240,208,120,0.3);  }
.pill-teal   { background: rgba(29,158,117,0.15);  color: #4ecda4;       border-color: rgba(29,158,117,0.35);  }

/* ── Article page ── */
.article-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--deep) 70%);
  padding: 60px 24px 50px; border-bottom: 0.5px solid var(--border);
}
.article-cat {
  display: inline-block; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--purple); margin-bottom: 14px;
}
.article-headline {
  font-family: var(--serif); font-size: clamp(28px,5vw,46px);
  font-weight: 700; color: var(--ink); line-height: 1.15;
  max-width: 820px; margin-bottom: 14px; letter-spacing: -0.02em;
}
.article-headline em { color: var(--gold); font-style: italic; }
.article-deck {
  font-size: 18px; color: var(--ink-muted); max-width: 680px;
  line-height: 1.65; margin-bottom: 24px;
}
.article-byline {
  font-size: 13px; color: var(--ink-faint);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.article-byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }

/* ── Article body ── */
.article-layout {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 260px; gap: 0;
  padding: 0 24px;
}
@media(max-width:768px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { border-left: none !important; padding-left: 0 !important; padding-top: 24px; border-top: 0.5px solid var(--border); }
}
.article-body { padding: 44px 44px 60px 0; border-right: 0.5px solid var(--border); }
.article-sidebar { padding: 44px 0 60px 32px; }

/* prose */
.prose h2 {
  font-family: var(--serif); font-size: 26px; font-weight: 700;
  color: var(--ink); margin: 44px 0 16px; line-height: 1.25;
}
.prose h3 {
  font-family: var(--serif); font-size: 19px; font-weight: 700;
  color: var(--gold); margin: 32px 0 12px;
}
.prose p {
  font-size: 16px; line-height: 1.8; color: var(--ink-muted);
  margin-bottom: 20px; max-width: var(--col);
}
.prose p strong { color: var(--ink); font-weight: 500; }
.prose ul, .prose ol {
  margin: 0 0 20px 20px; max-width: var(--col);
}
.prose li { font-size: 16px; line-height: 1.8; color: var(--ink-muted); margin-bottom: 6px; }
.prose li strong { color: var(--ink); }

/* callout box */
.callout {
  background: var(--surface); border-left: 3px solid var(--amber);
  border-radius: 0 8px 8px 0; padding: 18px 22px;
  margin: 28px 0; max-width: var(--col);
}
.callout p { margin: 0; font-size: 15px; }

/* data table */
.data-table {
  width: 100%; border-collapse: collapse;
  margin: 28px 0; font-size: 14px; max-width: var(--col);
}
.data-table th {
  text-align: left; padding: 10px 14px;
  background: var(--navy); color: var(--gold);
  font-weight: 500; font-size: 12px;
  letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 14px; border-bottom: 0.5px solid var(--border);
  color: var(--ink-muted); vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.03); }

/* fact pill */
.fact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
  gap: 12px; margin: 28px 0; max-width: var(--col);
}
.fact-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: 10px; padding: 14px 16px; text-align: center;
}
.fact-num {
  font-family: var(--serif); font-size: 28px; font-weight: 700;
  color: var(--gold); line-height: 1.1;
}
.fact-label {
  font-size: 12px; color: var(--ink-faint); margin-top: 4px; line-height: 1.4;
}

/* article footer */
.article-footer-strip {
  background: var(--surface); border-top: 0.5px solid var(--border);
  padding: 32px 24px; margin-top: 0;
}
.article-footer-inner {
  max-width: var(--max); margin: 0 auto;
}
.article-footer-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-faint); margin-bottom: 18px;
}
.related-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 16px;
}
.related-card {
  background: var(--navy); border: 0.5px solid var(--border);
  border-radius: 10px; padding: 18px; transition: border-color 0.2s;
}
.related-card:hover { border-color: var(--border-mid); }
.related-card .cat-tag { margin-bottom: 6px; }
.related-card .post-title { font-size: 14px; }

/* ── Newsletter section ── */
.newsletter {
  background: linear-gradient(135deg, var(--navy), var(--mid));
  border: 0.5px solid var(--border); border-radius: 12px;
  padding: 24px; margin-bottom: 22px;
}
.newsletter h4 {
  font-family: var(--serif); font-size: 17px; color: var(--gold);
  margin-bottom: 6px;
}
.newsletter p { font-size: 13px; color: var(--ink-muted); margin-bottom: 14px; }
.nl-form { display: flex; flex-direction: column; gap: 8px; }
.nl-input {
  background: rgba(0,0,0,0.3); border: 0.5px solid var(--border-mid);
  border-radius: 8px; padding: 9px 12px; font-size: 13px;
  color: var(--ink); font-family: var(--sans); outline: none;
}
.nl-input:focus { border-color: var(--amber); }
.nl-input::placeholder { color: var(--ink-faint); }
.nl-btn {
  background: var(--amber); color: #fff; border: none;
  border-radius: 8px; padding: 9px 14px; font-size: 13px;
  font-weight: 500; cursor: pointer; font-family: var(--sans);
  transition: opacity 0.2s;
}
.nl-btn:hover { opacity: 0.85; }

/* ── Footer ── */
.footer {
  background: var(--navy); border-top: 0.5px solid var(--border);
  padding: 32px 24px;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo {
  font-family: var(--serif); font-size: 16px; color: var(--ink);
}
.footer-logo span { color: var(--amber); }
.footer-tagline { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--ink-faint); }
.footer-links a:hover { color: var(--ink); text-decoration: none; }
.footer-copy { font-size: 11px; color: var(--ink-faint); margin-top: 3px; }

/* ── Responsive nav ── */
@media(max-width:768px) {
  .nav-links { display: none; }
  .hero { padding: 48px 20px 44px; }
  .feed { padding: 28px 0 40px; border-right: none; }
  .article-body { padding: 28px 0 40px; border-right: none; }
  .article-byline { flex-direction: column; gap: 4px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
